On Wed, 2013-08-21 at 14:49 +0100, Richard Hughes wrote: > On 21 August 2013 13:47, Shaun McCance <sha...@gnome.org> wrote: > > If you use itstool, you don't have to mangle your input XML. > > I discounted itstool as I didn't want *all* the elements translated.
That's why itstool uses ITS. <its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0"> <its:translateRule translate="no" selector="/application"/> <its:translateRule translate="yes" selector="/application/name | /application/summary | /application/description"/> </its:rules> > > 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> > > This, I guess, although I'm open for ideas. Here's the rub: When you have an element that can occur multiple times, it becomes difficult to reliably figure out which ones to show. <p>Paragraph 1</p> <p xml:lang="pt">Paragraph 1 in Portugese</p> <p xml:lang="pt-br">Paragraph 1 in Brazilian Portugese</p> <p>Paragraph 2</p> <p xml:lang="pt">Paragraph 2 in Portugese</p> <p>Paragraph 3 is only available in English</p> <p xml:lang="en">Paragraph 4 has xml:lang set for some reason</p> <p>Paragraph 5</p> <p xml:lang="pt-br">Paragraph 5 in Brazilian Portugese</p> You first have to figure out which are the source elements, then which translated elements correspond to which source elements. It's just very unpleasant to deal with repeated translated elements when they're used in a document-like markup, as opposed to an informational markup. > > I went to the AppStream wiki page but didn't see a schema. Do you have > > more info yet? > > I think this might help; > http://gitorious.org/appstream/appstream-core/trees/master/docs Perfect, thanks. -- Shaun _______________________________________________ desktop-devel-list mailing list desktop-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/desktop-devel-list