<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/117132/">https://git.reviewboard.kde.org/r/117132/</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 28th, 2014, 4:43 p.m. CET, <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 wrong, QLocale looks at .ts/.qm files while we mostly use .po/.gmo files - different translation system.

Also doubly wrong because uiLanguages() returns the user preferences (e.g. for me "en, fr"), which has nothing to do with "how many languages are actually installed" (e.g. there could be about 54).</pre>
 </blockquote>




 <p>On March 28th, 2014, 7:50 p.m. CET, <b>Aleix Pol Gonzalez</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;">Then should we get a method to ask KLocalizedString what languages we have available for the application.

In any case entry.desktop files are installed at bulk by kde-runtime, so it's actually already broken in KDE4. Actually, I get to ask to switch language and then I get to only choose the one.</pre>
 </blockquote>





 <p>On April 7th, 2014, 9:13 p.m. CEST, <b>John Layt</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;">Yes, QLocale::uiLanguages() returns the list of user preferences, i.e. the LANGUAGE or LC_ALL or LC_MESSAGES or LANG envar on Linux (in order of preference).  The list of available KDE translations is different.  KLocalizedString has a new method for 5.0 availableApplicationTranslations(), but the docs state:

     * Get the languages for which there exists the translation catalog file
     * for the set application translation domain.
     *
     * The application domain is set by \c setApplicationDomain.
     * If the application domain was not set, empty set is returned.
     * If the application domain was set, the language set will always
     * contain at least the source code language (<tt>en_US</tt>).

I suspect as we want the languages the user can switch the application into then it should be the right method provided the application domain is set by the application.</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;">I missed that this patch is about translations available for a given application only. I switched to "globaly available languages" story, since it was again about entry.desktop files. And relying on them in this context was not very purposeful (i.e. Aleix's comment above).

Switching to KLocalizedString::availableApplicationTranslations here makes sense to me as well.
</pre>
<br />










<p>- Chusslove</p>


<br />
<p>On March 28th, 2014, 12:21 p.m. CET, Aleix Pol Gonzalez 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, Albert Astals Cid and Chusslove Illich.</div>
<div>By Aleix Pol Gonzalez.</div>


<p style="color: grey;"><i>Updated March 28, 2014, 12:21 p.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;">Instead of asking the file-system what languages the application is translated into, ask QLocale what languages we have available instead.</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/khelpmenu.cpp <span style="color: grey">(4f6ce7b)</span></li>

</ul>

<p><a href="https://git.reviewboard.kde.org/r/117132/diff/" style="margin-left: 3em;">View Diff</a></p>







  </td>
 </tr>
</table>








  </div>
 </body>
</html>