Review Request 118692: Fix reading of entries for language/country combinations

Oswald Buddenhagen ossi at kde.org
Sat Jun 14 09:36:46 UTC 2014


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



autotests/kdesktopfiletest.cpp
<https://git.reviewboard.kde.org/r/118692/#comment41817>

    what about trying de_AT and seeing whether it correctly falls back?
    what about de_AT at tirol (or whatever)?



src/core/kconfigdata.h
<https://git.reviewboard.kde.org/r/118692/#comment41822>

    i didn't bother to re-read the whole code, so maybe that's why i can't claim to understand how that is supposed to work, given that you are clearly not explicitly comparing any such (sub)string.
    
    also, what modifiers are possible/useful? most of them relate to encodings, which are totally meaningless in our context, i'd think. though i seem to remember something like es_ES at valencia.



src/core/kconfigini.cpp
<https://git.reviewboard.kde.org/r/118692/#comment41821>

    this is slow. use indexOf on locale.


- Oswald Buddenhagen


On June 14, 2014, 8:24 a.m., Martin Gräßlin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/118692/
> -----------------------------------------------------------
> 
> (Updated June 14, 2014, 8:24 a.m.)
> 
> 
> Review request for KDE Frameworks, David Faure, John Layt, and Oswald Buddenhagen.
> 
> 
> Repository: kconfig
> 
> 
> Description
> -------
> 
> Fix reading of entries for language/country combinations
> 
> This fixes a regression introduced in
> 988f09bb051dca0437ecec431ee44ed5b4a560d8.
> 
> The mentioned commit ensures that if the locale is e.g. "de_DE" the
> entry "de" will be used. But this breaks if there is a translation
> for another country. E.g. for "de_CH" it would also pick the "de"
> entry.
> 
> This change now operates on both just the language code and the locale.
> If an entry with the language code is present it will be picked. If
> another entry with the exact locale is found it will be overwritten.
> 
> 
> Diffs
> -----
> 
>   autotests/kdesktopfiletest.cpp 6c3af4c2cd55b9140c0cd48526947431ceb7e798 
>   src/core/kconfig.cpp cfa6c2071a21a642833291c9de41060a7431b765 
>   src/core/kconfigdata.h e57becb24936865d009a700892893049b3e079f1 
>   src/core/kconfigdata.cpp 109063d65e97bcb7ba08cf6e5a6f3acb885fe845 
>   src/core/kconfigini.cpp df834f57fc44bbf9f4f28f1bc4eb5717e2ff1cee 
> 
> Diff: https://git.reviewboard.kde.org/r/118692/diff/
> 
> 
> Testing
> -------
> 
> unit tests still pass, but my knowledge about KConfig and locales is not sufficient to be sure that this is now 100 % correct.
> 
> 
> Thanks,
> 
> Martin Gräßlin
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20140614/8014fe31/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list