Translations in profile files?

David Edmundson david at davidedmundson.co.uk
Tue Jun 14 18:46:31 CEST 2011


On Mon, Jun 13, 2011 at 10:30 PM, George Kiagiadakis
<kiagiadakis.george at gmail.com> wrote:
> Hi,
>
> I just noticed we are shipping some .profile files for several
> protocols and there are some strings in those files that appear on the
> UI. For example, sofiasip-sip.profile has:
>
> <name>Voice over IP (VoIP/SIP)</name>
>
> My question is, how do these strings get translated? Afaik it is not
> allowed to show any text on the UI if it doesn't get through i18n(),
> even if it's some english-only protocol name.
>

In the accounts KCM almost all strings from telepathy are pushed
through dictionary.cpp which effectively runs

if (string=="Some Message") {
 return i18n("Some Message");
} else {
 return string;
}

(it's not quite like that, it's stored in a map)

I think every time you see a profile name, it will have gone through
this code. This was originally written for when we only had protocol
names, not profile files with the (English) human readable names.

BUT:

 1) It's a bit weird.
 2) This only happens in the accounts KCM. CL / Presence Applet don't
have access to this.
 3) Not all the profile names (if any) are actually in dictionary.cpp
so it doesn't really do anything. In fact there's line's in the code
that say "remove this when we have profiles"
 4) It defeats the point of human readable names in profiles.

Ideally we want to have translations in the profile files. Maybe we
should ask the telepathy ML?

At a second best option I guess we would need something like the
accounts dictionary in the KDE-TP library.


> Regards,
> George
> _______________________________________________
> KDE-Telepathy mailing list
> KDE-Telepathy at kde.org
> https://mail.kde.org/mailman/listinfo/kde-telepathy
>


More information about the KDE-Telepathy mailing list