Skip to content

Commit

Permalink
metainfo: Fix some xml snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
bbhtt committed Jan 17, 2025
1 parent 910b8d6 commit 3651419
Showing 1 changed file with 38 additions and 39 deletions.
77 changes: 38 additions & 39 deletions docs/02-for-app-authors/03-metainfo-guidelines/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -431,15 +431,15 @@ Console applications with no desktop file can define them in the Metainfo
file.

```xml
<categories>
<category>Development</category>
<category>Science</category>
</categories>
<categories>
<category>Development</category>
<category>Science</category>
</categories>

<keywords>
<keyword>IDE</keyword>
<keyword>development</keyword>
</keywords>
<keywords>
<keyword>IDE</keyword>
<keyword>development</keyword>
</keywords>
```

## Icons
Expand Down Expand Up @@ -651,7 +651,6 @@ The following tags can have translations: `name`, `name` child tag in
The `description` tag has to be translated by each `<p>` and `<li>` tags.

```xml

<name>App name</name>
<name xml:lang="de">Translated App name</name>

Expand Down Expand Up @@ -712,7 +711,7 @@ output devices an app supports.

The `requires` tag denotes an absolute requirement on the property
while the `recommends` and `supports` tag is a recommendation of a
non-essential requirement. Software stores uses this information to
non-essential requirement. Software stores use this information to
categorise apps and show device support information.

### Control
Expand All @@ -721,31 +720,31 @@ If the app supports and works on both desktop and touch devices, it
should have the below metadata.

```xml
<!-- Desktop AND mobile supported -->
<recommends>
<control>keyboard</control>
<control>pointing</control>
<control>touch</control>
</recommends>
<!-- Desktop AND mobile supported -->
<recommends>
<control>keyboard</control>
<control>pointing</control>
<control>touch</control>
</recommends>
```

If it only works on desktop devices, it should have

```
<!-- ONLY desktop supported -->
<requires>
<control>keyboard</control>
<control>pointing</control>
</requires>
```xml
<!-- ONLY desktop supported -->
<requires>
<control>keyboard</control>
<control>pointing</control>
</requires>
```

If it only works on touch devices it should have

```
<!-- ONLY mobile supported -->
<requires>
<control>touch</control>
</requires>
```xml
<!-- ONLY mobile supported -->
<requires>
<control>touch</control>
</requires>
```

Additionally, `tablet`, `gamepad`, and [other properties](https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-relations-control)
Expand All @@ -772,32 +771,32 @@ screen sizes, use any value `>=1` and `<=360` with the `ge`
relation.

```xml
<requires>
<!-- Mobile/tablet AND desktop supported -->
<display_length compare="ge">360</display_length>
</requires>
<requires>
<!-- Mobile/tablet AND desktop supported -->
<display_length compare="ge">360</display_length>
</requires>
```

To indicate support for _only_ desktop screen sizes, use any value
`>=361` with the `ge` relation. Usually `768` is used as a baseline
here.

```xml
<requires>
<!-- ONLY desktop supported -->
<display_length compare="ge">768</display_length>
</requires>
<requires>
<!-- ONLY desktop supported -->
<display_length compare="ge">768</display_length>
</requires>
```

To indicate support for _only_ mobile/tablet screen sizes use the
any value between `>=768` and `<=1279` with the `le` relation.
Usually `1279` is used as a baseline here.

```xml
<requires>
<!-- ONLY mobile/tablet supported -->
<display_length compare="le">1279</display_length>
</requires>
<requires>
<!-- ONLY mobile/tablet supported -->
<display_length compare="le">1279</display_length>
</requires>
```

## Manifest location
Expand Down

0 comments on commit 3651419

Please sign in to comment.