Re: AppData proposal



On Wed, 2013-08-21 at 12:25 +0100, Richard Hughes wrote:
Hi all,

I've written up a specification that I would like to get feedback on.
It's had a few iterations now, and soon I'd like to propose a GNOME
Goal on adding the required files to at least all the apps in our core
moduleset.

The proposal is http://people.freedesktop.org/~hughsient/temp/appdata/

All comments welcome, thanks.

    How do I translate this data?

    If you ship an .xml.in file rather than an .xml file, you can
    use a tool like intltool to extract the translatable strings
    and generate a .xml file with all the translations in at build
    time. Use something like @INTLTOOL_XML_RULE@ in Makefile.am to
    make it all magically work. Just change a few of the
    to-be-translated tags to something like this:

    <ul>
     <_li>Historical and current battery information</_li>
     <_li>Programs running on your computer using power</_li>
    </ul>

If you use itstool, you don't have to mangle your input XML. Regardless,
you really ought to specify at what level you expect to see translatable
elements repeated. Do you really want this:

<description>
  <p>Yelp is a help viewer.</p>
  <p xml:lang="de">Yelp ist ein Hilfe-Viewer.</p>
  <p>It's really cool.</p>
  <p xml:lang="de">Es ist echt toll.</p>
</description>

Or do you want this:

<description>
  <p>Yelp is a help viewer.</p>
  <p>It's really cool.</p>
</description>
<description xml:lang="de">
  <p>Yelp ist ein Hilfe-Viewer.</p>
  <p>Es ist echt toll.</p>
</description>

Also note that xml:lang is really supposed to take BCP 47 language tags,
not the gettext locales we tend to use.

    Why not just use the DOAP description?

    This is one file per-project and is not suitable when one tarball
    will install several applications. It's also not translated.

DOAP's concept of a project is pretty loose, and doesn't necessarily
have to correspond to a tarball or a repository. There's no reason a
package can't have one DOAP file for each application.

Also, DOAP can be translated. It's RDF, and all RDF properties can be
translated.

I'm not necessarily saying you should use DOAP. One reason not to is
that doing the kind of rich markup you have in the description element
is a pain in RDF.

    Why XML and not JSON/other?

    AppData is a subset of the AppStream schema, which is also XML.

I went to the AppStream wiki page but didn't see a schema. Do you have
more info yet?

Your friendly-neighborhood XML nerd,
Shaun




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]