> On June 12, 2014, 11:58 a.m., David Faure wrote:
> > Looks good; but I'm surprised that it works :) the code for using fallbacks 
> > must be in there somewhere already then? (if de_DE not present then use 
> > de). 
> > This patch is only about not skipping these two entries (de and de_CH), but 
> > how will it then pick the right one? Could it be that it works by chance, 
> > because the first one wins or something? (where first could mean "in the 
> > file" or worse "in some data structure"...)
> >
> 
> Martin Gräßlin wrote:
>     I think it works because it's the order in the file. I do not know 
> whether there are rules on how the order has to be in the file, I simply 
> assumed common sense which would list "de" before "de_DE" or "de_CH".
>     
>     From reading the code I didn't find anything which looked like a 
> fallback. It looked to me like a found value is overwritten when a translated 
> comes in. But I might have missed something.

I don't trust common sense, but "scripty" orders them indeed. Just possibly not 
people writing desktop files by hand (e.g. distros?)... I guess the "desktop 
entry spec" doesn't specify ordering.


- David


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


On June 12, 2014, 9:41 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 12, 2014, 9:41 a.m.)
> 
> 
> Review request for KDE Frameworks, David Faure and John Layt.
> 
> 
> 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/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
> 
>

_______________________________________________
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel

Reply via email to