<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/123131/">https://git.reviewboard.kde.org/r/123131/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On March 25th, 2015, 9:54 p.m. UTC, <b>Lukáš Tinkl</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
<thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
<a href="https://git.reviewboard.kde.org/r/123131/diff/1/?file=356605#file356605line242" style="color: black; font-weight: bold; text-decoration: underline;">man/kio_man.cpp</a>
<span style="font-weight: normal;">
(Diff revision 1)
</span>
</th>
</tr>
</thead>
<tbody>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">242</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">QStringList</span> <span class="n">languages</span> <span class="o">=</span> <span class="n">QLocale</span><span class="p">().</span><span class="n">uiLanguages</span><span class="p">();</span></pre></td>
</tr>
</tbody>
</table>
<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;">Not correct, this returns only user configured list of languages, whereas it previously returned the full list.</p></pre>
</blockquote>
<p>On March 25th, 2015, 10:30 p.m. UTC, <b>Nick Shaforostoff</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;">please see https://projects.kde.org/projects/kde/kdesdk/lokalize/repository/revisions/master/entry/src/common/languagelistmodel.cpp for the ways to get a list of all languages (there is a KDE-way and Qt-way)</p></pre>
</blockquote>
<p>On March 25th, 2015, 11:30 p.m. UTC, <b>Alex Richardson</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;">So if I parse this correctly the KDE way is: <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">KConfig(QLatin1String("locale/kf5_all_languages"), KConfig::NoGlobals, QStandardPaths::GenericDataLocation).groupList()</code>?
Should there be something in KI18n or is this sufficiently rare that we can just add "@deprecated use <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">KConfig(QLatin1String("locale/kf5_all_languages"), KConfig::NoGlobals, QStandardPaths::GenericDataLocation).groupList()</code> instead" to KLocale::languageList()?</p></pre>
</blockquote>
<p>On April 4th, 2015, 8:49 a.m. UTC, <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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Sounds to me like it should be a method in ki18n, it's a bit too arcane to be maintainable.</p></pre>
</blockquote>
<p>On April 4th, 2015, 1:10 p.m. UTC, <b>Alex Richardson</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;">Seems like it's not the right replacement:</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">No special env vars set:</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;"><div class="codehilite" style="background: #f8f8f8"><pre style="line-height: 125%"><span></span>KLocale::global()->languageList() ("de", "en_US")
KLocalizedString::availableApplicationTranslations() = ("pt_BR", "nds", "kk", "ga", "mr", "km", "ko", "en_US", "ca", "gl", "is", "it", "el", "nb", "tr", "ro", "pl", "es", "et", "en_GB", "eu", "ja", "ru", "nl", "cs", "nn", "pt", "ar", "ug", "hi", "lt", "da", "lv", "uk", "zh_CN", "zh_TW", "fi", "de", "sk", "hr", "sl", "hu", "bg", "fr", "ca@valencia", "sv")
QLocale().uiLanguages() = ("de-DE")
KConfig(kf5_all_languages).groupsList() = ("ca@valencia", "ln", "de", "tw", "lo", "ty", "lt", "lv", "ug", "uk", "pt_BR", "dz", "mg", "mh", "mi", "ur", "mk", "ml", "mn", "mo", "uz", "mr", "ms", "mt", "el", "en", "crh", "eo", "my", "be@latin", "es", "et", "eu", "vi", "na", "nb", "nd", "ne", "vo", "ng", "fa", "nl", "nn", "csb", "nr", "fi", "fj", "sr@ijekavian", "nv", "wa", "fo", "ny", "fr", "oc", "fy", "wo", "ga", "sr@latin", "hne", "om", "gd", "or", "os", "gl", "uz@cyrillic", "gn", "gu", "xh", "gv", "zh_HK", "pa", "nso", "pi", "ha", "pl", "he", "hi", "mai", "ps", "pt", "ho", "hr", "hu", "yi", "hy", "hz", "yo", "ia", "id", "ie", "aa", "ik", "ab", "qu", "ae", "za", "io", "af", "nds", "is", "ven", "it", "iu", "zh", "am", "ar", "as", "ja", "sr@ijekavianlatin", "x-test", "ay", "zu", "az", "rn", "ro", "en_US", "ba", "ru", "be", "rw", "bg", "bh", "bi", "jv", "bn", "sa", "bo", "sc", "sd", "br", "se", "bs", "sg", "si", "ka", "sk", "sl", "zh_CN", "sm", "ast", "sn", "so", "sq", "ki", "sr", "bn_IN", "ca", "ss", "kk", "st", "kl", "su", "km", "sv", "kn", "ce", "sw", "ko", "ch", "ks", "rom", "ku", "kv", "kw", "ta", "co", "ky", "zh_TW", "te", "cs", "tg", "cu", "th", "cv", "ti", "hsb", "la", "lb", "tk", "cy", "tn", "to", "en_GB", "li", "tr", "da", "ts", "tt", "dsb")
</pre></div>
</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">With LANGUAGE="de_DE"</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;"><div class="codehilite" style="background: #f8f8f8"><pre style="line-height: 125%"><span></span>KLocale::global()->languageList() ("de", "en_US")
KLocalizedString::availableApplicationTranslations() = ("sv", "pt_BR", "ca@valencia", "kk", "ga", "mr", "km", "ko", "en_US", "nds", "ca", "gl", "is", "it", "el", "nb", "tr", "ro", "en_GB", "pl", "es", "et", "eu", "ja", "ru", "nl", "cs", "nn", "pt", "ar", "ug", "hi", "lt", "da", "zh_CN", "zh_TW", "lv", "uk", "fi", "de", "sk", "hr", "sl", "hu", "bg", "fr")
QLocale().uiLanguages() = ("de-DE")
KConfig(kf5_all_languages).groupsList() = (...)
</pre></div>
</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">With LANGUAGE="en_GB:de_DE"</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;"><div class="codehilite" style="background: #f8f8f8"><pre style="line-height: 125%"><span></span>KLocale::global()->languageList() ("en_GB", "de", "en_US")
KLocalizedString::availableApplicationTranslations() = ("ga", "nds", "kk", "mr", "km", "ko", "ca", "gl", "pt_BR", "is", "it", "el", "nb", "tr", "ro", "en_US", "pl", "es", "et", "eu", "ja", "ru", "nl", "cs", "nn", "pt", "ar", "en_GB", "ug", "hi", "lt", "da", "lv", "uk", "fi", "de", "sk", "hr", "sl", "hu", "bg", "fr", "ca@valencia", "zh_CN", "zh_TW", "sv")
QLocale().uiLanguages() = ("en-GB", "de-DE")
</pre></div>
</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">With LANGUAGE="de_DE:en_GB"</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;"><div class="codehilite" style="background: #f8f8f8"><pre style="line-height: 125%"><span></span>KLocale::global()->languageList() ("en_GB", "de", "en_US")
KLocalizedString::availableApplicationTranslations() = ("mr", "km", "ko", "nds", "en_GB", "ca", "gl", "is", "it", "el", "nb", "tr", "ro", "pl", "es", "et", "eu", "ja", "ru", "nl", "cs", "nn", "zh_CN", "zh_TW", "pt", "ar", "ca@valencia", "ug", "hi", "lt", "da", "lv", "uk", "fi", "de", "sk", "hr", "sl", "hu", "bg", "pt_BR", "fr", "sv", "en_US", "ga", "kk")
QLocale().uiLanguages() = ("de-DE", "en-GB")
KConfig(kf5_all_languages).groupsList() = (...)
</pre></div>
</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">This one is very confusing, why is en_GB still the highest priority according to KLocale::global()->languageList()? Maybe it is reading some config file where I set that?</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">With LANGUAGE="fr_FR"</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;"><div class="codehilite" style="background: #f8f8f8"><pre style="line-height: 125%"><span></span>KLocale::global()->languageList() ("de", "en_US")
KLocalizedString::availableApplicationTranslations() = ("et", "eu", "ja", "ru", "nl", "cs", "nn", "pt", "en_GB", "ar", "ca@valencia", "ug", "hi", "lt", "da", "lv", "uk", "fi", "de", "sk", "hr", "sl", "zh_CN", "zh_TW", "hu", "bg", "fr", "sv", "nds", "ga", "kk", "mr", "km", "ko", "pt_BR", "ca", "gl", "en_US", "is", "it", "el", "nb", "tr", "ro", "pl", "es")
QLocale().uiLanguages() = ("fr-FR")
</pre></div>
</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Even more confusion, LANGUAGE now has no effect on KLocale::global()->languageList()</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">With LANG=fr_FR</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;"><div class="codehilite" style="background: #f8f8f8"><pre style="line-height: 125%"><span></span>KLocale::global()->languageList() ("fr", "en_US")
KLocalizedString::availableApplicationTranslations() = ("sk", "hr", "sl", "hu", "bg", "pt_BR", "fr", "sv", "en_US", "kk", "ga", "km", "mr", "ko", "en_GB", "ca", "gl", "is", "it", "el", "nb", "tr", "ro", "pl", "es", "et", "eu", "ja", "ru", "nl", "cs", "nn", "zh_CN", "zh_TW", "pt", "ar", "ca@valencia", "nds", "ug", "hi", "lt", "da", "lv", "uk", "fi", "de")
QLocale().uiLanguages() = ("fr-FR")
</pre></div>
</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">LANG seems to work where LANGUAGE doesn't.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I have no idea what's going on here, I need some feedback from someone with more I18N experience.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">However, QLocale().uiLanguages() seems to be almost the right replacement if we append en_US and convert it from de-DE to de_DE. However, the order is not the same...</p></pre>
</blockquote>
<p>On April 4th, 2015, 6:03 p.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;">Given kf5_all_languages is part of kdelibs4support, making code in ki18n breaks tiering, so a -1 from my side to David's comment.</p></pre>
</blockquote>
<p>On April 5th, 2015, 9:08 a.m. UTC, <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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Ah, then another implementation is needed. Proving even more that ki18n should provide a way to list available translations, since it's definitely not a trivial issue.</p></pre>
</blockquote>
<p>On April 5th, 2015, 1:22 p.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;">ki18n already has such method (availableApplicationTranslations), i'm not sure that is what we want here though.
Can someone clarify what we exactly want in here? all languages? all languages this ki18n-using application is translated too?</pre>
</blockquote>
</blockquote>
<pre style="margin-left: 1em; 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;">What we want here in kio_man is to display the man page a user can read, which includes his preferred language(s) and the untranslated original man page, since this is the true reference.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Therefore the code loops over the user selected languages and does not use all system installed translation dirs.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I'd say QLocale().uiLanguages() is the way to go, including the "-" -> "_" replacement</p></pre>
<br />
<p>- Martin</p>
<br />
<p>On March 25th, 2015, 9:17 p.m. UTC, Alex Richardson 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, Plasma and Martin Koller.</div>
<div>By Alex Richardson.</div>
<p style="color: grey;"><i>Updated March 25, 2015, 9:17 p.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
kio-extras
</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;">Port kio_man away from kdelibs4support</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;">man view in kdevelop5 works</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Not sure about the <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">KLocale::global()->languageList();</code> -> <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">QLocale().uiLanguages();</code> change though so I would like some feedback.</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>CMakeLists.txt <span style="color: grey">(02ae89f2524324f758450ad368f64849e39b2f7d)</span></li>
<li>man/CMakeLists.txt <span style="color: grey">(cb4585a289d3f69b8a16429ce87bfce115d1cc27)</span></li>
<li>man/kio_man.cpp <span style="color: grey">(e8cf2d70c50c4c20adbb5a81a6213175d397b76e)</span></li>
<li>man/kmanpart.cpp <span style="color: grey">(3af7fc182806e8b89297e8de884ce611c827e881)</span></li>
<li>man/man2html.cpp <span style="color: grey">(3c493ba334bce890b450d7b11ab00c6e783708d4)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/123131/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>