Lokalization for KDE AppStream AppData files

Kevin Krammer krammer at kde.org
Sun Feb 23 19:06:32 GMT 2014


On Sunday, 2014-02-23, 17:04:22, Matthias Klumpp wrote:
> 2014-02-23 16:37 GMT+01:00 Kevin Krammer <krammer at kde.org>:
> > On Sunday, 2014-02-23, 16:31:37, Matthias Klumpp wrote:

> >> >> 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.
> > 
> > I see.
> > If you don't mind, what was the reason for chosing this approach? Wouldn't
> > it have also been possible to fall back to the <p> sibling without the
> > lang attribute as a base instead?
> 
> Ah, I think we are talking about different things ;-)
> The process is:
>  1) Developer writes XML with some tags prefixed with an underscore
>  2) intltool scans the input-XML for stuff with an underscore,
> localizes the tag and adds both the localized tag as well as the
> original tag (without underscore!) to the output XML
> The result is a file which is localized. The underscore is just used
> in the template to select elements which are translated (because some
> aren't, for example the icon name).
> The database builder (or the AppStream data generator in that case)
> checks for the output file, not the template to generate it.

Ah, I see.

So that is actually not a requirement from anything in the processing chain 
after the files are shipped.
In which case it might not be relevant for the discussion here since the tool 
used for extraction and merging might be able to understand the format well 
enought to not require such hacks.

Cheers,
Kevin
-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20140223/bfc7ead2/attachment.sig>


More information about the kde-core-devel mailing list