Lokalization for KDE AppStream AppData files

Matthias Klumpp matthias at tenstral.net
Sun Feb 23 16:09:05 GMT 2014


2014-02-23 16:43 GMT+01:00 Albert Astals Cid <aacid at kde.org>:
> El Diumenge, 23 de febrer de 2014, a les 16:31:37, Matthias Klumpp va
> escriure:
>> 2014-02-23 16:28 GMT+01:00 Kevin Krammer <krammer at kde.org>:
>> > On Sunday, 2014-02-23, 16:13:46, Matthias Klumpp wrote:
>> >> 2014-02-23 15:44 GMT+01:00 Albert Astals Cid <aacid at kde.org>:
>> >> > El Divendres, 21 de febrer de 2014, a les 16:48:01, Matthias Klumpp va
>> >> >
>> >> > escriure:
>> >> >> 2014-02-21 2:02 GMT+01:00 Aleix Pol <aleixpol at kde.org>:
>> >> >> > [...]
>> >> >>
>> >> >> I have a compromise to offer, which will be necessary anyway in a way,
>> >> >> since to-be-localized entries in our XML files would have to be
>> >> >> prefixed with an underscore, so merging stuff back into the original
>> >> >> file does not work (unless we duplicate data there, which is ugly).
>> >> >>
>> >> >> So, new suggestion:
>> >> >>  * Project author creates file project.appdata.xml.in, containing the
>> >> >>
>> >> >> raw data which has to be translated.
>> >> >>
>> >> >>  * Scripty processes that file and commits a project.appdata.xml file
>> >> >>
>> >> >> in the same directory where the previous one was, containing all
>> >> >> localizations. If one is already there, the file is updated.
>> >> >>
>> >> >>  * We simply install the localized file and keep the other one as
>> >> >>  template
>> >> >>
>> >> >> That solution would work, I would be happy with it and hopefully
>> >> >> Albert as well :-) If not, please make an alternative suggestion.
>> >> >
>> >> > Why do you need two files instead of one file like we do for .desktop
>> >> > files?
>> >>
>> >> All translatable items are prefixed with an underscore, for example:
>> >>     <_p>
>> >>
>> >>       Software allows you to find and install new applications and system
>> >>       extensions and remove existing installed applications.
>> >>
>> >>     </_p>
>> >
>> > Which part of the chain causes this requirement?
>> > Is the database builder looking for this to check which parts of the
>> > document it has to check for translations?
>>
>> It is used as fallback if there is no translation available for the
>> current language. If there is no localized description, the original
>> English one is added to the database instead.
>
> Which database? Who adds it to that database?
The data flow is like this:
Upstream (KDE!) writes an AppData file. The distributor extracts that
AppData file, together with the icon and desktop file and generates
AppStream XML out of that, or DEP-11 YAML or AppInstall data, which
gets shipped to the users. On the user's machine, a small PackageKit
plugin will generate a database out of that which in turn is used by
the Software Center applications to display application data.
Maybe thet will also get a bit easier to understand when looking at
these graphics:
https://gitorious.org/appstream/appstream/source/efbe92c92e62282a50f6d73a82dff3fca4f438fb:docs/sources/images/libappstream_architecture.png
https://gitorious.org/appstream/appstream/source/efbe92c92e62282a50f6d73a82dff3fca4f438fb:docs/sources/images/architecture.png

(AppData is - like a desktop file - a source of information about
upstream's aoolication in order to present more data in a software
center)

-- 
Debian Developer | Freedesktop-Developer
I welcome VSRE emails. See http://vsre.info/




More information about the kde-core-devel mailing list