[Bug 304320] german translation of %OADDRESSEESADDR is wrong

Burkhard Lueck lueck at hube-lueck.de
Fri Aug 10 15:28:57 UTC 2012


https://bugs.kde.org/show_bug.cgi?id=304320

--- Comment #25 from Burkhard Lueck <lueck at hube-lueck.de> ---
(In reply to comment #22)
> 
> In this version "To:" is already translated as "An:". 

Sure, but that does not matter. Message extraction is necessary, but not
sufficient to get the correct translation displayed in the GUI. 
In addition the catalog has to be loaded (early enough at runtime) and the
desired translation has to be the first hit in all loaded translation catalogs. 

libtemplateparser.po in the kde source tarballs for 4.8.[4|5] has:
#: templateparser.cpp:557 templateparser.cpp:558
msgid "To:"
msgstr "An:"

libtemplateparser.po in the kde 4.9 (released tarball + svn repo) has:
#: templateparser.cpp:564
msgctxt "@item:intext email To"
msgid "To:"
msgstr "An:"

Gettext uses the policy "First come, first served" and queries all loaded
catalogs for a translation. Translation catalogs are dictionaries - pairs of
unique Keys (per catalog) + Values.
Key is a hash value generated from msgtxt+msgid, that is one of the key points
here.

Each kde application first loads the translation catalog of the application
(kmail), then  the six system translation catalogs (libphonon, kio4, kdelibs4,
kdeqt, solid_qt, kdecalendarsystems - see
kdelibs/kdecore/localization/klocale_kde.cpp) automatically + in this special
case another 10 catalogs via kmail/kmstartup.cpp before the  libtemplateparser
catalog with the translation "To:"->"An:" is loaded.

With the libtemplateparser catalog from kde svn 4.9 branch "To:" is a unique
message in all translation catalogs due to the i18c context.

But with the catalogs from 4.8.x a translation of "To:" found in one of the
catalogs loaded before libtemplateparser is returned to the gettext query for
the translation of ."To:"

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the kde-i18n-de mailing list