Adopting AppData in KDE?

T.C. Hollingsworth tchollingsworth at gmail.com
Wed Nov 6 03:49:11 GMT 2013


On Tue, Nov 5, 2013 at 1:53 PM, Matthias Klumpp <matthias at tenstral.net> wrote:
> Hi!
> In order to solve the translation-issues: I think KDE could very well
> use Scripty to insert translations into the AppData files.

I wrote a draft patch to do this already:
http://lists.kde.org/?l=kde-i18n-doc&m=138353976230003&w=2

There's a bit of a problem though, that Yuri pointed on on kde-i18n-doc:

On Mon, Nov 4, 2013 at 11:34 PM, Yuri Chornoivan <yurchor at ukr.net> wrote:
> Using appdata.its from Richard's page [1] leads to translation by paragraph
> for multi paragraph descriptions, like this (I run it as "itstool -i
> appdata.its -j inkscape.appdata.xml -o translated.xml uk.mo")
>
> <description>
> <p>Something</p>
> <p xml:lang="uk">Blah-blah</p>
> </description>
>
> intltool translates this as
>
> <description>
> <p>Something</p>
> </description>
> <description xml:lang="uk">
> <p>Blah-blah</p>
> </description>

Unfortunately, the schema says the latter is invalid.  Is the schema
wrong or intltool wrong?

If we have to do it by paragraph, having scripty merge the
translations back into the original XML is going to be ugly...

> However, I
> am currently thinking about adding a new element to specify a
> gettext-domian to fetch trabslations from. The problem is that, in
> order for the AppStream generator to do the translation, the gettext
> files would have to be shipped with the same package, which might not
> always be the case, if you have language-packages.
> So I don't think this would work.

Definitely not for KDE, we ship all our translations separately from
the main package for stuff in the SC.

Could we just ship the .mo files in /usr/share/app-info/locale or so
and just have the extractors copy those files unconditionally (e.g.
regardless of the existence of a .desktop file) when trawling through
packages?

> Are there other suggestions on how to make trabslating AppData files
> easier for KDE?

-T.C.




More information about the kde-core-devel mailing list