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

Andre Heinecke aheinecke at intevation.de
Fri Mar 4 15:36:26 UTC 2016



> On March 4, 2016, 3:01 p.m., 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.

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?


- Andre


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


On March 4, 2016, 2:53 p.m., Andre Heinecke wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/127275/
> -----------------------------------------------------------
> 
> (Updated March 4, 2016, 2:53 p.m.)
> 
> 
> 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/20160304/e6125c1b/attachment.html>


More information about the Kde-frameworks-devel mailing list