1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 3. Distribution Metadata and Services</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta name="generator" content="publican 3.2.1" /><meta name="package" content="AppStream-AppStream-0.7-en-US-0.0-0" /><link rel="home" href="index.html" title="AppStream" /><link rel="up" href="index.html" title="AppStream" /><link rel="prev" href="sect-Metadata-InputMethod.html" title="2.5. Input Methods" /><link rel="next" href="sect-AppStream-IconCache.html" title="3.2. Icon Cache" /></head><body><p id="title"><a class="left" href="http://www.freedesktop.org/wiki/Distributions/AppStream/"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="http://www.freedesktop.org/software/appstream/docs/"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="sect-Metadata-InputMethod.html"><strong>Prev</strong></a></li><li class="home">AppStream</li><li class="next"><a accesskey="n" href="sect-AppStream-IconCache.html"><strong>Next</strong></a></li></ul><div class="chapter"><div class="titlepage"><div><div><h1 class="title"><a id="chap-DistroData"></a>Chapter 3. Distribution Metadata and Services</h1></div></div></div><div class="toc"><dl class="toc"><dt><span class="section"><a href="chap-DistroData.html#sect-AppStream-ASXML">3.1. AppStream distribution XML files</a></span></dt><dt><span class="section"><a href="sect-AppStream-IconCache.html">3.2. Icon Cache</a></span></dt></dl></div><div class="para">
AppStream provides an own Metadata format which gets shipped by the distributions and is read by the Xapian database generator or software centers directly.
</div><div class="para">
This chapter contains information about it.
</div><div class="section"><div class="titlepage"><div><div><h2 class="title"><a id="sect-AppStream-ASXML"></a>3.1. AppStream distribution XML files</h2></div></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="spec-asxml-introduction"></a>3.1.1. Introduction</h3></div></div></div><div class="para">
AppStream XML files are small textfiles describing all available applications in the distribution's package repositories. The XML files might be compressed with GZip.
</div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="spec-asxml-filenaming"></a>3.1.2. File naming and location</h3></div></div></div><div class="para">
The XML files must have an unique name, which is usually the distribution's name and version, combined with the name of the repository/origin. For example in Debian 8 (Jessie), the filename for the main repository component would be <code class="filename">debian-jessie-main.xml.gz</code>. For Fedora 20 (Heisenbug) updates it would be <code class="filename">fedora-20-updates.xml.gz</code>. 3rd-party repositories use a vendor name and repository-name combination, for example Ubuntu PPAs might get <code class="filename">ppa-ubuntu12.04-username-foobar.xml</code>.
</div><div class="para">
There are two valid locations to store AppStream XML data. <code class="filename">/usr/share/app-info/xmls</code> stores all AppStream data which has been installed via software packages, while <code class="filename">/var/cache/app-info/xmls</code> stores application data which was downloaded by the package manager or placed there by other tools (e.g. Listaller). The XML files can either be plain files or be compressed with gzip. It is always a good idea to compress the files, because they tend to become quite large.
</div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="spec-asxml-general"></a>3.1.3. General XML structure</h3></div></div></div><div class="para">
The XML starts with an <code class="code"><components></code> tag as root element. It has all the <code class="code"><component></code> tags of different <code class="literal">type</code> as children.
</div><div class="para">
Data to fill the different component elements is usually taken from their <a href="http://standards.freedesktop.org/desktop-entry-spec/latest/">Desktop files</a> and package data. However, if an upstream project ships metainfo files (see <a class="xref" href="chap-Metadata.html">Chapter 2, <em>Upstream Metadata</em></a>), values defined there should override data from any other source.
</div><div class="para">
All child elements of the <code class="code"><components></code> element, no matter of which type they are, must at least have an <code class="literal">id</code>, <code class="literal">name</code>, <code class="literal">summary</code> and <code class="literal">pkgname</code> tag. For applications, a <code class="literal">icon</code> tag is also required.
</div><div class="para">
The <code class="code"><components></code> root node has these properties, where the first two are required:
</div><div class="variablelist"><dl class="variablelist"><dt><span class="term">version</span></dt><dd><div class="para">
This property declares the AppStream spec version this file is based on (currently 0.6). The property is required.
</div></dd><dt><span class="term">origin</span></dt><dd><div class="para">
Defines the repository-id this AppStream XML file belongs to. This usually matches the filename without extension (see the explanation on how to pick a good filename above). It is also used to associate the right cached icons with AppStream metadata. This property is required.
</div></dd></dl></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="spec-asxml-tags"></a>3.1.4. Valid tags for all component types</h3></div></div></div><div class="para">
These tags can be applied to every component type (application, component, font, inputmethod) which is described in the AppStream metadata.
</div><div class="para">
Additionally to the <code class="literal">type</code> property, every <code class="literal"><component/></code> tag in AppStream distro data may have a <code class="literal">priority</code> property, defining the priority of this specific metadata over other metadata from different AppStream XML files (e.g. from a different repository) which have the same component-id. The value of this tag is an integer, if the property is missing, a value of <code class="code">"0"</code> is assumed.
</div><div class="variablelist"><dl class="variablelist"><dt><a id="tag-distro-component-id"></a><span class="term"><id/></span></dt><dd><div class="para">
The <code class="code"><id/></code> tag is a short unique and usually lower-cases identifier for the component. Depending on the component's type, different naming conventions apply.
</div></dd><dt><a id="tag-distro-pkgname"></a><span class="term"><pkgname/></span></dt><dd><div class="para">
The name of the package which needs to be installed in order to make this component available on the system.
</div><div class="para">
This tag can be defined multiple times, if a component is split across multiple packages.
</div><div class="important"><div class="admonition_header"><p><strong>Important</strong></p></div><div class="admonition"><div class="para">
The preferred way is to create metapackages containing the component metadata, and referncing them from the distribution metadata, and not to use multiple <code class="literal">pkgname</code> tags. They should only be used multiple times as a workaround or if there is no sensible way of creating a matching metapackage.
</div></div></div></dd><dt><a id="tag-distro-name"></a><span class="term"><name/></span></dt><dd><div class="para">
A human-readable name for this component.
</div><div class="para">
In case of a component of type <code class="literal">desktop</code>, the application name as defined in the application's <a href="http://standards.freedesktop.org/desktop-entry-spec/latest/">desktop file</a> is used.
</div></dd><dt><a id="tag-distro-project_license"></a><span class="term"><project_license/></span></dt><dd><div class="para">
The <code class="code"><project_license/></code> tag is indicating the license of the component. It should be a string in SPDX format. Licenses may be combined using <span class="emphasis"><em>and</em></span> and <span class="emphasis"><em>or</em></span> logic. Possible values include:
<div class="itemizedlist"><ul><li class="listitem"><div class="para">
GPL-2.0
</div></li><li class="listitem"><div class="para">
LGPL-3.0+ and GPL-3.0+
</div></li><li class="listitem"><div class="para">
MIT
</div></li><li class="listitem"><div class="para">
CC-BY-SA-2.0
</div></li><li class="listitem"><div class="para">
...
</div></li></ul></div>
A full list of recognized licenses and their identifiers can be found at the <a href="http://spdx.org/licenses/">SPDX OpenSource License Registry</a>.
</div></dd><dt><a id="tag-distro-summary"></a><span class="term"><summary/></span></dt><dd><div class="para">
The tag contains a short summary of the purpose and function of this component. In case the component is of type <code class="literal">desktop</code>, it is usually taken from a Desktop file, if the application does not ship an upstream metadata file.
</div><div class="para">
For more information about this tag, take a look at the tag's definition at <a class="xref" href="chap-Metadata.html#tag-summary"><summary/></a>.
</div></dd><dt><a id="tag-distro-description"></a><span class="term"><description/></span></dt><dd><div class="para">
A long description of the component. It is usually taken from the package descriptions or meta-info files, if they were provided. The description might use markup. Right now, only paragraph, ordered list and unordered list are supported. An example description element might look like this:
<pre class="programlisting">
<span class="perl_Keyword"><description></span>
<span class="perl_Keyword"><p></span>
Power Statistics is a program used to view historical and current battery
information and will show programs running on your computer using power.
<span class="perl_Keyword"></p></span>
<span class="perl_Keyword"><p></span>Example list:<span class="perl_Keyword"></p></span>
<span class="perl_Keyword"><ul></span>
<span class="perl_Keyword"><li></span>First item<span class="perl_Keyword"></li></span>
<span class="perl_Keyword"><li></span>Second item<span class="perl_Keyword"></li></span>
<span class="perl_Keyword"></ul></span>
<span class="perl_Keyword"><p></span>
You probably only need to install this application if you are having problems
with your laptop battery, or are trying to work out what programs are using
significant amounts of power.
<span class="perl_Keyword"></p></span>
<span class="perl_Keyword"></description></span>
</pre>
</div><div class="para">
As opposed to the by-paragraph translation used in meta-info files, this tag is translated "as a whole", meaning that the <code class="literal"><description/></code> tag itself has a language property and contain the translated paragraphs for the given language. This allows faster parsing of the Appstream XML file, and does not increase it's size much, as long as it is compressed.
</div><div class="para">
For more information about this tag, take a look at the tag's definition at <a class="xref" href="chap-Metadata.html#tag-description"><description/></a>.
</div></dd><dt><a id="tag-distro-url"></a><span class="term"><url/></span></dt><dd><div class="para">
Defines URLs for this component. This tag can be present multiple times.
</div><div class="para">
For a list of possible url types and what they are expected to do, take a look at the tag's description at <a class="xref" href="chap-Metadata.html#tag-url"><url/></a>.
</div></dd><dt><a id="tag-distro-project_group"></a><span class="term"><project_group/></span></dt><dd><div class="para">
The <code class="code"><project_group>
</code> tag identifies a project with a specific upstream umbrella project. Known values include <code class="literal">GNOME, KDE, XFCE, LXDE, Mozilla</code> and <code class="literal">MATE</code>, although other umbrella projects like <code class="literal">Yorba</code> would make sense too.
</div><div class="note"><div class="admonition_header"><p><strong>Note</strong></p></div><div class="admonition"><div class="para">
Components should only identify with an umbrella project if you use all their infrastructure and policies, for instance string freezes dates, bugtracker and source control instance.
</div></div></div></dd><dt><a id="tag-distro-icon"></a><span class="term"><icon/></span></dt><dd><div class="para">
The <code class="code"><icon/></code> tag describes the component icon. It is mostly used for GUI applications (component-type <code class="literal">desktop</code>). It can be of the type <code class="literal">stock</code>, <code class="literal">cached</code>, <code class="literal">local</code>, or <code class="literal">url</code>.
</div><div class="para">
<code class="literal">stock</code> icons are loaded from stock. The icon name should never include any file-extension or path.
</div><div class="para">
<code class="literal">cached</code> icons are loaded from the AppStream icon cache. The icon tag should contain the icon file name, including it's extension.
</div><div class="para">
<code class="literal">local</code> icons are reserved for AppStream data installed by local applications or via 3rd-party application installers, such as Listaller. They should specify a full file path.
</div><div class="para">
<code class="literal">remote</code> icons loaded from a remote URL. This is currently not implemented anywhere, but might be used in future.
</div><div class="para">
Examples of the different methods to specify an icon:
</div><pre class="programlisting">
<span class="perl_Keyword"><icon</span><span class="perl_Others"> type=</span><span class="perl_String">"stock"</span><span class="perl_Keyword">></span>gimp<span class="perl_Keyword"></icon></span>
<span class="perl_Keyword"><icon</span><span class="perl_Others"> type=</span><span class="perl_String">"cached"</span><span class="perl_Keyword">></span>firefox.png<span class="perl_Keyword"></icon></span>
<span class="perl_Keyword"><icon</span><span class="perl_Others"> type=</span><span class="perl_String">"local"</span><span class="perl_Keyword">></span>/usr/share/pixmaps/foobar.png<span class="perl_Keyword"></icon></span>
<span class="perl_Keyword"><icon</span><span class="perl_Others"> type=</span><span class="perl_String">"remote"</span><span class="perl_Keyword">></span>http://example.com/icons/foobar.png<span class="perl_Keyword"></icon></span>
</pre><div class="para">
Multiple <code class="code"><icon/>
</code> tags might be combined for one application, e.g. to define a <code class="literal">stock</code> icon and a <code class="literal">cached</code> icon. Software-Centers should always prefer the stock icon, if it is available, and fall back to the other icon types if they can not find it. The <span class="emphasis"><em>libappstream</em></span> library makes it easy to do that, if you are not accessing the Xapian database manually.
</div><div class="para">
The AppStream Xapian database generator will prefer <code class="literal">cached</code> over <code class="literal">local</code> over <code class="literal">remote</code> icons when setting the non-stock icon for the application.
</div></dd><dt><a id="tag-distro-mimetypes"></a><span class="term"><mimetypes/></span></dt><dd><div class="para">
This tag can contain one or more <code class="code"><mimetype>
</code> tags, describing the mime types this component supports. The data can usually be fetched from the Desktop files. Example:
</div><pre class="programlisting">
<span class="perl_Keyword"><mimetypes></span>
<span class="perl_Keyword"><mimetype></span>text/html<span class="perl_Keyword"></mimetype></span>
<span class="perl_Keyword"><mimetype></span>image/jpeg<span class="perl_Keyword"></mimetype></span>
<span class="perl_Keyword"><mimetype></span>application/rss+xml<span class="perl_Keyword"></mimetype></span>
<span class="perl_Keyword"></mimetypes></span>
</pre></dd><dt><a id="tag-distro-categories"></a><span class="term"><categories/></span></dt><dd><div class="para">
This tag can contain one or more <code class="code"><category>
</code> tags, describing the categories this application is located in. This tag is usually applied to components of type <code class="literal">desktop</code>, although it might be used by others later. This data is usually taken from Desktop files, a list of categories can be found in the <a href="http://standards.freedesktop.org/menu-spec/latest/apa.html">Freedesktop menu spec</a>. Example:
</div><pre class="programlisting">
<span class="perl_Keyword"><categories></span>
<span class="perl_Keyword"><category></span>GNOME<span class="perl_Keyword"></category></span>
<span class="perl_Keyword"><category></span>GTK<span class="perl_Keyword"></category></span>
<span class="perl_Keyword"><category></span>Network<span class="perl_Keyword"></category></span>
<span class="perl_Keyword"><category></span>Telephony<span class="perl_Keyword"></category></span>
<span class="perl_Keyword"></categories></span>
</pre><div class="note"><div class="admonition_header"><p><strong>Deprecated Tags</strong></p></div><div class="admonition"><div class="para">
The tag <code class="code"><appcategories>
</code> with its <code class="code"><appcategory>
</code> child elements is deprecated API. AppStream parsers should handle these tags just like the <code class="literal">category</code> tags, there is no difference except for the name.
</div></div></div></dd><dt><a id="tag-distro-keywords"></a><span class="term"><keywords/></span></dt><dd><div class="para">
This tag can contain one or more <code class="code"><keyword>
</code> tags, describing keywords for the component, to make it easier to find in a software center. In case of type <code class="literal">desktop</code> components, this data is taken from Desktop files. For <code class="literal">addon</code> components, the upstream metadata file usually provides this tag. Example:
</div><pre class="programlisting">
<span class="perl_Keyword"><keywords></span>
<span class="perl_Keyword"><keyword></span>IDE<span class="perl_Keyword"></keyword></span>
<span class="perl_Keyword"><keyword></span>development<span class="perl_Keyword"></keyword></span>
<span class="perl_Keyword"><keyword></span>programming<span class="perl_Keyword"></keyword></span>
<span class="perl_Keyword"></keywords></span>
</pre></dd><dt><a id="tag-distro-screenshots"></a><span class="term"><screenshots/></span></dt><dd><div class="para">
This tag can contain one or more <code class="code"><screenshot>
</code> tags, describing screenshots which are available for the application. A screenshot tag my have the attribute <code class="code">type="default"</code>, marking it as the application's default screenshot, which primarily represents it in a software center.
</div><div class="para">
Every <code class="code"><screenshot>
</code> is defined by several images of different sizes. All images should have their width and hight set as arguments. Also, one of the images shoukd be marked as <code class="code">type="source"</code>, indicating that it is the unscaled version of the screenshot. Images of <code class="code">type="thumbnail"</code> define thumbnails of the screenshot.
</div><div class="para">
Optionally, a screenshot can contain a <code class="code"><caption>
</code> tag, describing the screenshot's caption. This is usually what the user can see on the image shown. The tag is translatable.
</div><div class="para">
Every image should have a full remote url set, usually pointing to a cache of images maintained by the distributor. Example:
</div><pre class="programlisting">
<span class="perl_Keyword"><screenshots></span>
<span class="perl_Keyword"><screenshot</span><span class="perl_Others"> type=</span><span class="perl_String">"default"</span><span class="perl_Keyword">></span>
<span class="perl_Keyword"><caption></span>Foobar showing kitchen-sink functionality<span class="perl_Keyword"></caption></span>
<span class="perl_Keyword"><caption</span><span class="perl_Others"> xml:lang=</span><span class="perl_String">"si"</span><span class="perl_Keyword">></span>Foobar shoeewing kischän-sünk funzionality<span class="perl_Keyword"></caption></span>
<span class="perl_Keyword"><image</span><span class="perl_Others"> type=</span><span class="perl_String">"source"</span><span class="perl_Others"> width=</span><span class="perl_String">"800"</span><span class="perl_Others"> height=</span><span class="perl_String">"600"</span><span class="perl_Keyword">></span>http://www.example.org/en_US/main.png<span class="perl_Keyword"></image></span>
<span class="perl_Keyword"><image</span><span class="perl_Others"> type=</span><span class="perl_String">"thumbnail"</span><span class="perl_Others"> width=</span><span class="perl_String">"200"</span><span class="perl_Others"> height=</span><span class="perl_String">"150"</span><span class="perl_Keyword">></span>http://www.example.org/en_US/main-small.png<span class="perl_Keyword"></image></span>
<span class="perl_Keyword"></screenshot></span>
<span class="perl_Keyword"><screenshot></span>
....
<span class="perl_Keyword"></screenshot></span>
<span class="perl_Keyword"></screenshots></span>
</pre></dd><dt><a id="tag-distro-compulsory_for_desktop"></a><span class="term"><compulsory_for_desktop/></span></dt><dd><div class="para">
The <code class="code"><compulsory_for_desktop>
</code> tag indicates that the component which the metadata belongs to is essential for the functionality of the defined desktop environment. Examples for compulsory components are the <code class="literal">GNOME-Shell</code> by the GNOME-Project, or the <code class="literal">Plasma-Desktop</code> by KDE, as well as things like <code class="literal">iBus</code> or the desktop login manager.
</div><div class="para">
Software centers are expected to detect the running desktop environment and disable uninstallation for compulsory components of that desktop, so users will not be able to damage their currently running, primary desktop environment.
</div><div class="para">
Multiple occurrences of the <code class="code"><compulsory_for_desktop>
</code> tag are allowed, so a project can be essential for many desktops. The distributor decides which components should be made compulsory, however it is generally a good idea to follow upstream's recommendations on that matter.
</div><div class="para">
A list of all allowed values for this tag is defined in the <a href="http://standards.freedesktop.org/menu-spec/latest/apb.html">XDG Menu Specification</a>. Software center applications will only recognize these values.
</div></dd><dt><a id="tag-distro-provides"></a><span class="term"><provides/></span></dt><dd><div class="para">
This tag is described in detail at <a class="xref" href="chap-Metadata.html#sect-Metadata-GenericComponent">Section 2.1, “Generic Component”</a>.
</div><div class="para">
For generic component types, this tag has to be present. Distributors must ensure that all things described in this tag are present in the package referenced in the associated <code class="literal">pkgname</code> tag.
</div></dd><dt><a id="tag-distro-developer_name"></a><span class="term"><developer_name/></span></dt><dd><div class="para">
The <code class="code"><developer_name/></code> tag as described in the specification for a generic component. See <a class="xref" href="chap-Metadata.html#tag-developer_name"><developer_name/></a> for more information.
</div></dd><dt><a id="tag-distro-releases"></a><span class="term"><releases/></span></dt><dd><div class="para">
The <code class="code"><releases></code> tag contains <code class="code"><release/></code> child tags which describe some metainformation about the current release of the described software. The <code class="code"><release/></code> tag may be present multiple times (for older releases), but a tag for the current version must always be present. A <code class="literal">release</code> tag can have the properties <code class="literal">version</code> and <code class="literal">timestamp</code> which contain the version number and a release timestamp in form of a UNIX epoch.
</div><div class="para">
Examples for a valid releases tag:
</div><pre class="programlisting"><span class="perl_Keyword"><releases></span>
<span class="perl_Keyword"><release</span><span class="perl_Others"> version=</span><span class="perl_String">"1.2"</span><span class="perl_Others"> timestamp=</span><span class="perl_String">"1397253600"</span> <span class="perl_Keyword">/></span>
<span class="perl_Keyword"><release</span><span class="perl_Others"> version=</span><span class="perl_String">"1.0"</span><span class="perl_Others"> timestamp=</span><span class="perl_String">"1345932000"</span> <span class="perl_Keyword">/></span>
<span class="perl_Keyword"></releases></span>
</pre><div class="para">
In case a <code class="code"><release/></code> tag has a <code class="code"><description/></code> tag as parameter, describing the new release briefly, distributors are encouraged to provide 2-4 <code class="code"><release/></code> release tags for every component. If no description is provided, one tag is enough.
</div></dd><dt><a id="tag-distro-architectures"></a><span class="term"><architectures/></span></dt><dd><div class="para">
If the <code class="literal">architectures</code> tag is present, the component is not available on all architectures the distribution supports. Supported architectures for this component are specified as children using the <code class="literal">arch</code> tag.
</div><div class="para">
For example, this marks a component to only be available on i686:
</div><pre class="programlisting"><span class="perl_Keyword"><architectures></span>
<span class="perl_Keyword"><arch></span>i686<span class="perl_Keyword"></arch></span>
<span class="perl_Keyword"></architectures></span>
</pre></dd><dt><a id="tag-distro-languages"></a><span class="term"><languages/></span></dt><dd><div class="para">
This tag gives information about the translations a component provides, and to which extent the software is translated.
</div><div class="para">
The tag is allowed to only occur once per component, and contains multiple <code class="code"><lang/></code> child nodes, which have a <a href="https://www.gnu.org/software/gettext/manual/html_node/Language-Codes.html">language code</a> as value. Each <code class="code"><lang/></code> node may have a <code class="literal">percentage</code> property, which describes the percentage value to which a component has been translated.
</div><div class="para">
The language data is expected to be extracted by the AppStream XML generator, and is not provided upstream. Generators may obtain the information from processing GNU Gettext files, which should cover most translation methods.
</div><div class="para">
Tag example:
</div><pre class="programlisting">
<span class="perl_Keyword"><languages></span>
<span class="perl_Keyword"><lang</span><span class="perl_Others"> percentage=</span><span class="perl_String">"96"</span><span class="perl_Keyword">></span>gu<span class="perl_Keyword"></lang></span>
<span class="perl_Keyword"><lang</span><span class="perl_Others"> percentage=</span><span class="perl_String">"94"</span><span class="perl_Keyword">></span>ca@valencia<span class="perl_Keyword"></lang></span>
<span class="perl_Keyword"><lang</span><span class="perl_Others"> percentage=</span><span class="perl_String">"91"</span><span class="perl_Keyword">></span>de<span class="perl_Keyword"></lang></span>
<span class="perl_Keyword"><lang</span><span class="perl_Others"> percentage=</span><span class="perl_String">"93"</span><span class="perl_Keyword">></span>eo<span class="perl_Keyword"></lang></span>
<span class="perl_Keyword"></languages></span>
</pre></dd></dl></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="spec-asxml-example"></a>3.1.5. Example file</h3></div></div></div><div class="para">
This is an example AppStream metadata file:
</div><pre class="programlisting">
<span class="perl_Keyword"><?xml</span> version="1.0"<span class="perl_Keyword">?></span>
<span class="perl_Keyword"><components</span><span class="perl_Others"> version=</span><span class="perl_String">"0.6"</span><span class="perl_Keyword">></span>
<span class="perl_Keyword"><component</span><span class="perl_Others"> type=</span><span class="perl_String">"application"</span><span class="perl_Keyword">></span>
<span class="perl_Keyword"><id></span>firefox.desktop<span class="perl_Keyword"></id></span>
<span class="perl_Keyword"><pkgname></span>firefox-bin<span class="perl_Keyword"></pkgname></span>
<span class="perl_Keyword"><name></span>Firefox<span class="perl_Keyword"></name></span>
<span class="perl_Keyword"><name</span><span class="perl_Others"> lang=</span><span class="perl_String">"en_GB"</span><span class="perl_Keyword">></span>Firefoux<span class="perl_Keyword"></name></span>
<span class="perl_Keyword"><summary></span>Web browser<span class="perl_Keyword"></summary></span>
<span class="perl_Keyword"><summary</span><span class="perl_Others"> lang=</span><span class="perl_String">"fr_FR"</span><span class="perl_Keyword">></span>Navigateur web<span class="perl_Keyword"></summary></span>
<span class="perl_Keyword"><project_license></span>MPL-2<span class="perl_Keyword"></project_license></span>
<span class="perl_Keyword"><keywords></span>
<span class="perl_Keyword"><keyword></span>internet<span class="perl_Keyword"></keyword></span>
<span class="perl_Keyword"><keyword></span>web<span class="perl_Keyword"></keyword></span>
<span class="perl_Keyword"><keyword></span>browser<span class="perl_Keyword"></keyword></span>
<span class="perl_Keyword"><keyword</span><span class="perl_Others"> lang=</span><span class="perl_String">"fr_FR"</span><span class="perl_Keyword">></span>navigateur<span class="perl_Keyword"></keyword></span>
<span class="perl_Keyword"></keywords></span>
<span class="perl_Keyword"><icon</span><span class="perl_Others"> type=</span><span class="perl_String">"stock"</span><span class="perl_Keyword">></span>web-browser<span class="perl_Keyword"></icon></span>
<span class="perl_Keyword"><icon</span><span class="perl_Others"> type=</span><span class="perl_String">"cached"</span><span class="perl_Keyword">></span>firefox.png<span class="perl_Keyword"></icon></span>
<span class="perl_Keyword"><categories></span>
<span class="perl_Keyword"><category></span>network<span class="perl_Keyword"></category></span>
<span class="perl_Keyword"><category></span>web<span class="perl_Keyword"></category></span>
<span class="perl_Keyword"></categories></span>
<span class="perl_Keyword"><mimetypes></span>
<span class="perl_Keyword"><mimetype></span>text/html<span class="perl_Keyword"></mimetype></span>
<span class="perl_Keyword"><mimetype></span>text/xml<span class="perl_Keyword"></mimetype></span>
<span class="perl_Keyword"><mimetype></span>application/xhtml+xml<span class="perl_Keyword"></mimetype></span>
<span class="perl_Keyword"><mimetype></span>application/vnd.mozilla.xul+xml<span class="perl_Keyword"></mimetype></span>
<span class="perl_Keyword"><mimetype></span>text/mml<span class="perl_Keyword"></mimetype></span>
<span class="perl_Keyword"><mimetype></span>application/x-xpinstall<span class="perl_Keyword"></mimetype></span>
<span class="perl_Keyword"><mimetype></span>x-scheme-handler/http<span class="perl_Keyword"></mimetype></span>
<span class="perl_Keyword"><mimetype></span>x-scheme-handler/https<span class="perl_Keyword"></mimetype></span>
<span class="perl_Keyword"></mimetypes></span>
<span class="perl_Keyword"><url</span><span class="perl_Others"> type=</span><span class="perl_String">"homepage"</span><span class="perl_Keyword">></span>http://www.mozilla.com<span class="perl_Keyword"></url></span>
<span class="perl_Keyword"><screenshots></span>
<span class="perl_Keyword"><screenshot</span><span class="perl_Others"> type=</span><span class="perl_String">"default"</span><span class="perl_Keyword">></span>
<span class="perl_Keyword"><image</span><span class="perl_Others"> type=</span><span class="perl_String">"source"</span><span class="perl_Others"> width=</span><span class="perl_String">"800"</span><span class="perl_Others"> height=</span><span class="perl_String">"600"</span><span class="perl_Keyword">></span>http://www.awesomedistro.example.org/en_US/firefox.desktop/main.png<span class="perl_Keyword"></image></span>
<span class="perl_Keyword"><image</span><span class="perl_Others"> type=</span><span class="perl_String">"thumbnail"</span><span class="perl_Others"> width=</span><span class="perl_String">"200"</span><span class="perl_Others"> height=</span><span class="perl_String">"150"</span><span class="perl_Keyword">></span>http://www.awesomedistro.example.org/en_US/firefox.desktop/main-small.png<span class="perl_Keyword"></image></span>
<span class="perl_Keyword"></screenshot></span>
<span class="perl_Keyword"></screenshots></span>
<span class="perl_Keyword"><provides></span>
<span class="perl_Keyword"><binary></span>firefox<span class="perl_Keyword"></binary></span>
<span class="perl_Keyword"></provides></span>
<span class="perl_Keyword"></component></span>
<span class="perl_Keyword"><component></span>
<span class="perl_Keyword"><id></span>pulseaudio<span class="perl_Keyword"></id></span>
<span class="perl_Keyword"><name></span>PulseAudio<span class="perl_Keyword"></name></span>
<span class="perl_Keyword"><summary></span>The PulseAudio sound server<span class="perl_Keyword"></summary></span>
<span class="perl_Keyword"><url</span><span class="perl_Others"> type=</span><span class="perl_String">"homepage"</span><span class="perl_Keyword">></span>http://www.freedesktop.org/wiki/Software/PulseAudio/<span class="perl_Keyword"></url></span>
<span class="perl_Keyword"><project_license></span>GPLv2<span class="perl_Keyword"></project_license></span>
<span class="perl_Keyword"><provides></span>
<span class="perl_Keyword"><library></span>libpulse-simple.so.0<span class="perl_Keyword"></library></span>
<span class="perl_Keyword"><library></span>libpulse.so.0<span class="perl_Keyword"></library></span>
<span class="perl_Keyword"><binary></span>start-pulseaudio-kde<span class="perl_Keyword"></binary></span>
<span class="perl_Keyword"><binary></span>start-pulseaudio-x11<span class="perl_Keyword"></binary></span>
<span class="perl_Keyword"></provides></span>
<span class="perl_Keyword"><release</span><span class="perl_Others"> version=</span><span class="perl_String">"2.0"</span><span class="perl_Keyword">/></span>
<span class="perl_Keyword"></component></span>
<span class="perl_Keyword"><component</span><span class="perl_Others"> type=</span><span class="perl_String">"font"</span><span class="perl_Keyword">></span>
<span class="perl_Keyword"><id></span>LinLibertine_M.otf<span class="perl_Keyword"></id></span>
<span class="perl_Keyword"><name></span>Libertine<span class="perl_Keyword"></name></span>
<span class="perl_Keyword"><summary></span>Linux Libertine Open fonts<span class="perl_Keyword"></summary></span>
<span class="perl_Keyword"><font_classifier></span>Mono<span class="perl_Keyword"></font_classifier></span>
<span class="perl_Keyword"><font_parent></span>Libertine<span class="perl_Keyword"></font_parent></span>
<span class="perl_Keyword"></component></span>
<span class="perl_Comment"><!-- more components here! --></span>
<span class="perl_Keyword"></components></span>
</pre></div></div></div><ul class="docnav"><li class="previous"><a accesskey="p" href="sect-Metadata-InputMethod.html"><strong>Prev</strong>2.5. Input Methods</a></li><li class="up"><a accesskey="u" href="#"><strong>Up</strong></a></li><li class="home"><a accesskey="h" href="index.html"><strong>Home</strong></a></li><li class="next"><a accesskey="n" href="sect-AppStream-IconCache.html"><strong>Next</strong>3.2. Icon Cache</a></li></ul></body></html>
|