Lokalization for KDE AppStream AppData files

Thomas Lübking thomas.luebking at gmail.com
Tue Feb 25 22:41:55 GMT 2014


On Dienstag, 25. Februar 2014 23:20:18 CEST, Matthias Klumpp wrote:
> No, it takes
> <p>foo bar</p>
> and turns that into
> <p>foo bar</p>
> <p lang="en">foo bar</p>
> <p lang="de">föö bär</p>
> <p lang="fr">le fó et la bàr</p>
> <p lang="es">el fobarro</p>

I thought, plain <p> would *not* to be translated?
However, same procedure.

>> That frankly sounds like an xmlstarlet one-liner... is that the problem?
> How would that look like? That would be really cool :-)
> (I never worked with xmlstarlet)

$ xml ed -d "//*/p[@lang!='x']" /path/to/appdata.xml
resp. (matches all elements, not just <p>)
$ xml ed -d "//*[@lang!='x']" /path/to/appdata.xml

This will delete all (p) elements that have a lang attribute which is not "x"

$ xml ed -d "//*[@lang]" /path/to/appdata.xml
deletes all elements with a lang attribute

You can also select subpaths (//* globs)
$ xml ed -d "//*/div[@align!='center']/*[@lang]" /path/to/appdata.xml


-- OT
> Given that Fedora wants to kick out all apps without AppData from
> their software center
You mean I should simply stress my point with a gun?
Seriously, i'd just ignore such attempts to threaten by "we will ship a crippled package manager that does not show your software".
It's not a very scary "threat" (they'll probably get bug reports), inacceptable style and certainly no base to start any discussion.

Cheers,
Thomas




More information about the kde-core-devel mailing list