<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="http://git.reviewboard.kde.org/r/111178/">http://git.reviewboard.kde.org/r/111178/</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 24th, 2013, 2:18 p.m. UTC, <b>Kevin Ottens</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="http://git.reviewboard.kde.org/r/111178/diff/2/?file=165134#file165134line44" style="color: black; font-weight: bold; text-decoration: underline;">staging/ki18n/src/klocalizedstring.cpp</a>
<span style="font-weight: normal;">
(Diff revision 2)
</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">44</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="k">static</span> <span class="kt">void</span> <span class="nf">initializeLanguages</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;">Wondering, would that be something for the QPA platform theme then? So that ki18n stays passive, and this code is only activated if the app runs inside a KDE workspace?
It would also avoid nicely ki18n dependency on kconfig (keeping then both tier1).</pre>
</blockquote>
<p>On June 24th, 2013, 5:53 p.m. UTC, <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;">Since the feature is on the application level, it should (?) still be
available when the application is not running inside KDE workspace. Thus I
mentioned that the framework providing the in-application language choice
should also do what is necessary for all expected translation systems.
ki18n also depends on KJS, and it needs to start depending on a locale
provider (for formatting string arguments), so on KLocale. Removing KConfig
dependency alone then wouldn't make it tier 1.
</pre>
</blockquote>
<p>On June 25th, 2013, 6:34 a.m. UTC, <b>Kevin Ottens</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;">Well, that's the thing I'm wondering... should it still be available outside a KDE workspace? I'm not so sure.
As for the framework providing the in-application language choice it's pretty much contained by KSwitchLanguageDialog and friends, so likely it has to do something about tr() too, but that's about it I think. I don't see people using more that tr and ki18n in practice.
As for ki18n any chance to make it use QtScript instead of KJS? And same question for the locale provider, shouldn't it be QLocale? (ok, I'm getting slightly off topic here, but there's already a patch attempting to use QLocale instead of KLocale)</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;">To be honest, as a user I'd be wildly confused if the menu item that says Help->Change Application Language, only works when in KDE Workspace</pre>
<br />
<p>- Albert</p>
<br />
<p>On June 22nd, 2013, 5:09 p.m. UTC, Aleix Pol Gonzalez wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://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.</div>
<div>By Aleix Pol Gonzalez.</div>
<p style="color: grey;"><i>Updated June 22, 2013, 5:09 p.m.</i></p>
<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;">While looking at the code, it seems clear that it was something we all knew we had to think about but it was being delayed.
Before I asked Andrea why he was stuck on so many tasks and one of them was the move of the KSwitchLanguageDialog (KLanguageButton epic).
What we did was to port the code in the dialog to read the values from QLocale, relying on KLocalizedStrings' hook to initialize QLocale properly.
So we added that hook that reads the configuration that knows what language should be used to override the settings that Qt will use, which is the LANGUAGE env var.
NOTE: we removed the code that, after saying that the application should be restarted, tries to change the language on the fly. It didn't work well (the new things were translated, but not the old things).
This is an important change, because:
- We use QLocale (thus $LANGUAGE env var) to define what language is being used
- We will have to make sure how to map from QLocale naming to KDE naming (see all_language.desktop).
- The languages KCM and KDE (kded, plasma, startkde... one of those) initialization will have to make sure that LANGUAGE will be correctly set in the KDE sessions
Thoughts?
Albert and Aleix</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;">not much</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>kdeui/dialogs/kswitchlanguagedialog_p.cpp <span style="color: grey">(7f5fe95)</span></li>
<li>staging/ki18n/src/CMakeLists.txt <span style="color: grey">(8a40160)</span></li>
<li>staging/ki18n/src/klocalizedstring.cpp <span style="color: grey">(f8b44b9)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/111178/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>