<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://git.reviewboard.kde.org/r/127136/">https://git.reviewboard.kde.org/r/127136/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On February 22nd, 2016, 9:55 a.m. UTC, <b>Albert Astals Cid</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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I'd prefer if you could fix this at the Qt level, why would nativeLanguageName ever return empty?</p></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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I've just checked. It's a Windows thing. qlocale_win calls windows API getLocaleInfo(LOCALE_SNATIVELANGUAGENAME) ( https://msdn.microsoft.com/en-us/library/windows/desktop/dd373863%28v=vs.85%29.aspx ). So Qt Developers would probably (and rightly) say "This is a Windows bug" and Indeed this might be fixed at some point in the far Future in Windows.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">But my Observation is Qt does not (and for Windows apparently can not) guarantee that QLocale::nativeLanguageName is not Empty. So KXmlGui should try to handle this. As I don't know how this is for other platforms and it only adds a tiny overhead I also don't think this should be Ifdefed for Windows.</p></pre>
<br />
<p>- Andre</p>
<br />
<p>On February 22nd, 2016, 9:52 a.m. UTC, Andre Heinecke wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: 1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
<tr>
<td>
<div>Review request for KDE Frameworks.</div>
<div>By Andre Heinecke.</div>
<p style="color: grey;"><i>Updated Feb. 22, 2016, 9:52 a.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
kxmlgui
</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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">While packaging Kleopatra's translations for Gpg4win I've noticed that there were blank entries in the Switchlanguagedialog.
Apperantly QLocale::nativeLanguageName can return an Empty string (Qt 5.5 on Windows).</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">This patch handles this and uses the non native QLocale::languageToString as a fallback. The idea is that a non native Name is better then no name (and a blank entry in the dialog) at all.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Ideally every language would have a native name but until this is the case I think this fallback makes sense.</p></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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">See attached screenshots of Kleopatra's switchlanguage dialog before and after the patch. Low German is an example where the native name was empty.</p></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>src/kswitchlanguagedialog_p.cpp <span style="color: grey">(039daea)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/127136/diff/" style="margin-left: 3em;">View Diff</a></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">File Attachments </h1>
<li><a href="https://git.reviewboard.kde.org/media/uploaded/files/2016/02/22/a6a31417-1ad6-432e-bee9-65a367fac28d__languages_before.png">Dialog before the patch</a></li>
<li><a href="https://git.reviewboard.kde.org/media/uploaded/files/2016/02/22/762062c5-ff18-47da-aeb0-93b16ca28883__languages_after.png">Dialog after the patch</a></li>
</ul>
</td>
</tr>
</table>
</div>
</body>
</html>