Review Request 112292: Make KLocalizedString::isApplicationTranslatedInto and QLocale::uiLanguages compatible
Albert Astals Cid
aacid at kde.org
Tue Aug 27 09:23:14 UTC 2013
> On Aug. 26, 2013, 6:25 p.m., Albert Astals Cid wrote:
> > if you want to see the language codes we have, they are listed in http://websvn.kde.org/trunk/l10n-kde4/
> >
> > To be honest i don't see why we need conversion between uiLanguages and here since uiLanguages returns what we is set in LANGUAGE ./corelib/tools/qlocale_unix.cpp:231: case UILanguages:
> >
> > which we do set in KCatalog
> >
> > So basically should be returning "our stuff", no?
> >
> >
>
> Vishesh Handa wrote:
> It does return $LANGUAGE, but it changes the format by adding a '-' instead of '_'. Do you think qlocale_unix should be patched up instead? Because it is inconsistent with QLocale::name() which uses '_'
>
> So Qt code like this would fail -
>
> QLocale locale;
> locale.uiLanguages().contains(locale.name()); // <---- will return false!
>
> Kevin Ottens wrote:
> You could try to discuss that with the Qt guys. You indeed have a compelling argument for changing the format.
You can quote http://linux.about.com/library/cmd/blcmdl3_setlocale.htm with
A locale name is typically of the form language[_territory][.codeset][@modifier], where language is an ISO 639 language code, territory is an ISO 3166 country code, and codeset is a character set or encoding identifier like ISO-8859-1 or UTF-8. For a list of all supported locales, try "locale -a", cf. locale(1).
- Albert
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/112292/#review38687
-----------------------------------------------------------
On Aug. 26, 2013, 2:48 p.m., Vishesh Handa wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/112292/
> -----------------------------------------------------------
>
> (Updated Aug. 26, 2013, 2:48 p.m.)
>
>
> Review request for KDE Frameworks, Albert Astals Cid, Aleix Pol Gonzalez, and Chusslove Illich.
>
>
> Description
> -------
>
> Make KLocalizedString::isApplicationTranslatedInto & QLocale::uiLanguages compatible
>
> QLocale::uiLanguages returns "lang-script-country" whereas KCatalog
> expects the format to be "lang_countr at script". We need to convert the
> format before checking if the corresponding catalog exists.
>
>
> Diffs
> -----
>
> staging/ki18n/src/klocalizedstring.cpp eab9216
>
> Diff: http://git.reviewboard.kde.org/r/112292/diff/
>
>
> Testing
> -------
>
> Limited testing done. My QLocale::uiLanguages() returns "en-US" which is correctly converted to "en_US". I haven't tested it with anything else. Any tips on how I should go about testing this?
>
>
> Thanks,
>
> Vishesh Handa
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20130827/08aefe83/attachment.html>
More information about the Kde-frameworks-devel
mailing list