<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/118690/">https://git.reviewboard.kde.org/r/118690/</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, 11:06 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;">What's the use case? Didn't we have a different way for translating ui files?</pre>
 </blockquote>




 <p>On June 13th, 2014, 6:46 a.m. UTC, <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;">> What's the use case?

well as explained in the comment for translating dynamically loaded UI files. Where is that used? In KWin for the configuration of scripts and scripted effects (example: translucency effect).

> Didn't we have a different way for translating ui files?

I'm not aware of one and AFAIU ki18n it would need to have compiled sources which is not possible with the given use case.</pre>
 </blockquote>





 <p>On June 13th, 2014, 8:06 a.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;">(From private exchange with Martin.) In fact this situation is comparable with KXMLGui files, since they too are dynamically loaded. There the .rc file itself states the domain name (attribute to top tag) and KXMLGui library links to Ki18n and places the appropriate translation call. Since this does not make sense for Qt dynamically loaded UI files, I don't see conceptually a better solution. At most Qt could provide something to reduce the boilerplate elements (addContextToMonitor and language change events).</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 can understand the use case for dynamically loaded .ui files.

For static ones I thought we were using "uic -tr i18n", but are we? I can't find where we do it.</pre>
<br />










<p>- Albert</p>


<br />
<p>On June 12th, 2014, 8:55 a.m. UTC, 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, Aurélien Gâteau and Chusslove Illich.</div>
<div>By Martin Gräßlin.</div>


<p style="color: grey;"><i>Updated June 12, 2014, 8:55 a.m.</i></p>









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
ki18n
</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;">Introduce a KLocalizedTranslator

The KLocalizedTranslator is a QTranslator subclass which can delegate
to ki18n for translations. This class allows to translate text which
can only use Qt's translation system with ki18n.</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;">see added unit test and class already used in (and implemented for) KWin.</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/klocalizedstringtest.h <span style="color: grey">(52b6248270e7d117855cb96c5d3d8582d89a99b0)</span></li>

 <li>autotests/klocalizedstringtest.cpp <span style="color: grey">(e4e97ce92224f8886705c39091a5f07ea3a209d1)</span></li>

 <li>src/CMakeLists.txt <span style="color: grey">(09490e54ecd2126873482b187b17642c57ca7d28)</span></li>

 <li>src/klocalizedtranslator.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/klocalizedtranslator.cpp <span style="color: grey">(PRE-CREATION)</span></li>

</ul>

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







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








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