<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/120353/">https://git.reviewboard.kde.org/r/120353/</a>
     </td>
    </tr>
   </table>
   <br />





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On September 24th, 2014, 12:42 p.m. UTC, <b>Sebastian Kügler</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 wonder if it's enough to just have a file with the i18n("City") in there, so it sends up in the .po file, and then wrap the untranslated city name into it. This way, we can avoid putting a huge Hash into the .cpp file, and just get everything from the .po file. As long as the same catalog is used, we don't actually have to have every single string in the code. This could reduce the size of the binary by quite a bit.</p></pre>
 </blockquote>




 <p>On September 24th, 2014, 1:14 p.m. UTC, <b>Martin Klapetek</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;">Dunno, it could work. Let's hear from someone from i18n team.</p></pre>
 </blockquote>





 <p>On September 24th, 2014, 1:32 p.m. UTC, <b>Martin Klapetek</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;">(also for the record, the difference in the binary is exactly 53 629 bytes, ie. 52 kB)</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;">Hm, that's pretty significant. Would be nice if we could save that.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I suppose the i18n could even go into a file that isn't built, javascript, or cpp-not-mentioned-in-cmake, so it doesn't even affect build time.</p></pre>
<br />







<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On September 24th, 2014, 12:42 p.m. UTC, <b>Sebastian Kügler</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/120353/diff/1/?file=315266#file315266line418" style="color: black; font-weight: bold; text-decoration: underline;">applets/digital-clock/plugin/timezonesi18n.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">418</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="p">{</span><span class="s">"UTC+00:00"</span><span class="p">,</span> <span class="n">i18n</span><span class="p">(</span><span class="s">"UTC+00:00"</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;">Does it really make sense to have translations added for UTC offsets, and UTC itself?</p></pre>
 </blockquote>



 <p>On September 24th, 2014, 1:13 p.m. UTC, <b>Martin Klapetek</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 thought for some localizations it could be useful...like we put i18n around names in KAboutData.</p></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;">Which ones do you have in mind? I don't know of any translation for UTC, but I'm not that well-informed.</p></pre>
<br />




<p>- Sebastian</p>


<br />
<p>On September 24th, 2014, 12:02 p.m. UTC, Martin Klapetek 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 Localization and Translation (l10n) and Plasma.</div>
<div>By Martin Klapetek.</div>


<p style="color: grey;"><i>Updated Sept. 24, 2014, 12:02 p.m.</i></p>









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
plasma-workspace
</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;">So in Plasma 5 we're adding support for timezones into the clock applet. It's based on QTimeZone and that uses IDs which are consisting of "Continent/City". Qt has no accessor methods for getting the city of the given timezone so we're parsing the timezone ID and using the part after "/" as the city and we display that in the UI.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">We want those cities translated however so it can display eg. "Praha" instead of "Prague" for Czech users. So I've created this helper class which has a dictionary of timezone-id-city<-->i18n(city) and this is then used in the UI. I'm not sure where exactly to put it, I'd prefer KI18n framework but as we would like to have this in Plasma 5.1 release, I put it together with the applet as Plasma 5.1 does not (and probably will not) depend on KI18n 5.3.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I'm adding the l10n group to the reviewers - guys can you please comment/+1 this?</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">If this is deemed good enough, I'd like to also add the country and continent i18n functions into that class afterwards.</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>applets/digital-clock/plugin/timezonemodel.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>applets/digital-clock/plugin/timezonesi18n.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>applets/digital-clock/plugin/timezonesi18n.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>applets/digital-clock/package/contents/ui/DigitalClock.qml <span style="color: grey">(614e172)</span></li>

 <li>applets/digital-clock/plugin/CMakeLists.txt <span style="color: grey">(0590e6e)</span></li>

 <li>applets/digital-clock/plugin/digitalclockplugin.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>applets/digital-clock/plugin/timezonemodel.h <span style="color: grey">(PRE-CREATION)</span></li>

</ul>

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






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








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