Review Request 127275: Ki18n: Fallback to QLocale::system uiLanguages in language initalisation

Chusslove Illich caslav.ilic at gmx.net
Sat Mar 5 22:46:03 UTC 2016



> On Март 4, 2016, 4:01 по п., Chusslove Illich wrote:
> > src/klocalizedstring.cpp, line 368
> > <https://git.reviewboard.kde.org/r/127275/diff/1/?file=447946#file447946line368>
> >
> >     I would nevertheless ifdef it. It may be that some strange thing is intentionally done with locale variables (e.g. to test something or kill localization), and then the behavior would deviate from that documented for Gettext.
> 
> Andre Heinecke wrote:
>     I'm assuming that QLocale::system() is also changed accodingly in that case so I don't think its a problem. The code looks like it's using the same environment variables: http://code.qt.io/cgit/qt/qtbase.git/tree/src/corelib/tools/qlocale_unix.cpp#n104
>     We still have to look at the environment variables in ki18n first because of modifier / charset handling, imo otherwise we could just use QLocale here.
>     
>     For ifdef I would probably do an #infdef O_OS_UNIX instead of a Q_OS_WIN ? I'm not sure but I think this probably also makes sense on other platforms like android?

Regardless of modifier/charset handling, we cannot use QLocale, because in QLocale that is an implementation detail (Qt does not use Gettext), and in ki18n that is a behavioral guarantee (conforming to Gettext).

I'm also not sure what kind of ifdef would be the best, although #infdef O_OS_UNIX does sound better than #ifdef Q_OS_WIN to me as well.


- Chusslove


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/127275/#review93158
-----------------------------------------------------------


On Март 4, 2016, 3:53 по п., Andre Heinecke wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/127275/
> -----------------------------------------------------------
> 
> (Updated Март 4, 2016, 3:53 по п.)
> 
> 
> Review request for KDE Frameworks and Localization and Translation (l10n).
> 
> 
> Repository: ki18n
> 
> 
> Description
> -------
> 
> The intention for this patch is to fix the inital Language selection for Windows where the environment variables used in Ki18n are not set.
> This is not a fix for a regression in Ki18n, afaik this never worked on Windows, we had some hacks in Gpg4win to write the language into kdeglobals during installation in kde4 times.
> 
> I don't think this needs to be ifdefed because it only appends so previous language selection is not affected.
> 
> 
> Diffs
> -----
> 
>   src/klocalizedstring.cpp b24fe9b 
> 
> Diff: https://git.reviewboard.kde.org/r/127275/diff/
> 
> 
> Testing
> -------
> 
> Tested on a german Windows system and got a "de" localized application.
> 
> 
> Thanks,
> 
> Andre Heinecke
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20160305/69ea8c66/attachment.html>


More information about the Kde-frameworks-devel mailing list