[Kde-accessibility] Re: Translated strings for kttsd

Gary Cramblitt garycramblitt at comcast.net
Mon Jan 17 22:25:03 CET 2005


On Monday 17 January 2005 12:19 pm, Olaf Schmidt wrote:
> Hi!
>
> A recent discussing on kde-core-devel gave me an idea how to deal with the
> translated strings for speech synthesis in kttsd:
>
> We can add them to a .desktop file as:
> Name=If you hear this text, then KTTSD is configured correctly
>
> Then the text will will appear in the list of strings-to-be-translated,
> and translations will be semi-automatically added to the config file as:
> Name[de]=Wenn Sie diesen Text hören, dann ist KTTSD richtig konfiguriert.
>
> kttsd can then simply open and parse the .desktop file to receive the
> translated strings for languages that are different from the current user
> interface language.
>
> Olaf

Yes, but it does have to do the parsing itself.  KConfig will *always* give 
the user's desktop translation or default (if user's desktop setting is not 
available).  In other words, this does not work as one might expect:

  // The language code of the voice.
  languageCode = "en"
  // Retrieve test msg in language of the voice (not desktop language!)
  testMsg = config->readEntry("Name["+languageCode+"]");

Is hand-coded .desktop file parsing *really* the *only* way to do this?  If 
so, it would seem to be a major deficiency in the Qt/KDE libraries.

-- 
Gary Cramblitt (aka PhantomsDad)
KDE Text-to-Speech Maintainer
http://accessibility.kde.org/developer/kttsd/index.php


More information about the kde-accessibility mailing list