TRANSLATION_DOMAIN not to be used for app code

Thomas Eschenbacher Thomas.Eschenbacher at gmx.de
Tue Oct 11 06:00:33 BST 2016


Albert Astals Cid wrote:
> [...]
>>>> What breaks exactly?
>>>
>>> Anything using KLocalizedString::applicationDomain()
>>>
>>> https://lxr.kde.org/search?_filestring=&_string=KL.*%3AapplicationDoma
>>
>> The XMLGUI ones though only fallback to that if the rc file has no domain
>> tag set, so there one would be safe (unless missing the tag, but that is
>> also needed with libs).
>>
>> But kcheckaccelerators testing and KTipDialog seems to indeed rely on that
>> property, was not on my radar, thanks for the info. Guess I simply never
>> used them, so did not affect me.
> 
> You're also missing the "Translators" tab in the application about dialog if 
> you don't set your application domain properly.
> [...]

Yes, I can confirm what Albert says. I did some research, so for your
reference:
bug #345320 was releated to this.
I needed to add the call to setApplicationDomain(...) to get
translations in the Help/About plugin (and AFAIR also i18n in the
plugins) working.

regards,
   Thomas




More information about the kde-core-devel mailing list