<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://git.reviewboard.kde.org/r/118692/">https://git.reviewboard.kde.org/r/118692/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On June 12th, 2014, 1:58 p.m. CEST, <b>David Faure</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">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"...)
</pre>
</blockquote>
<p>On June 12th, 2014, 2:04 p.m. CEST, <b>Martin Gräßlin</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">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.</pre>
</blockquote>
<p>On June 12th, 2014, 2:29 p.m. CEST, <b>David Faure</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">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.</pre>
</blockquote>
<p>On June 12th, 2014, 2:39 p.m. CEST, <b>Martin Gräßlin</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">the spec only specifies the parsing, but not the writing. In fact the only example is the other way around:
Name=Foo
Name[sr_YU]=...
Name[sr@Latn]=...
Name[sr]=...</pre>
</blockquote>
<p>On June 18th, 2014, 2:21 p.m. CEST, <b>Chusslove Illich</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">So... support for handling the language codes listed by David is simply gone in KF5, as it stands? More precisely, if the user has set glibc locale to sr_RS@latin, and a .desktop file contains Name[sr]= and Name[sr@latin]= (in any order), what will be read by the current implementation?
</pre>
</blockquote>
</blockquote>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">@latin gets removed by QLocale, so it would pick Name[sr]</pre>
<br />
<p>- Martin</p>
<br />
<p>On June 16th, 2014, 10:26 a.m. CEST, Martin Gräßlin wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for KDE Frameworks, David Faure, John Layt, and Oswald Buddenhagen.</div>
<div>By Martin Gräßlin.</div>
<p style="color: grey;"><i>Updated June 16, 2014, 10:26 a.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
kconfig
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">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.</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">unit tests still pass, but my knowledge about KConfig and locales is not sufficient to be sure that this is now 100 % correct.</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>autotests/kdesktopfiletest.cpp <span style="color: grey">(6c3af4c2cd55b9140c0cd48526947431ceb7e798)</span></li>
<li>src/core/kconfig.cpp <span style="color: grey">(a2598f8e8fce91a8de3f34b272e15a6c280a50db)</span></li>
<li>src/core/kconfigdata.h <span style="color: grey">(fdec85dc90467560bd312b72266ef0b3f243d076)</span></li>
<li>src/core/kconfigdata.cpp <span style="color: grey">(109063d65e97bcb7ba08cf6e5a6f3acb885fe845)</span></li>
<li>src/core/kconfigini.cpp <span style="color: grey">(a882ee31150658f3e5cfb036362ff0583f71cbd9)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/118692/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>