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





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On October 15th, 2016, 5:40 p.m. UTC, <b>Friedrich W. H. Kossebau</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 you are the first to add translation features to karchive. So some more things are needed to get translations working:
a) adding a script which enables e.g. the bot "scripty" on the KDE i18n server to extract the strings to translate from the sources, to feed them into the database used by the translators for their work
b) adding code which loads the matching translations at runtime into the Qt translation system, so any calls to tr() will be properly resolved.
c) adding logic to the buildsystem to install any translation files, if existing (added during packaging builds)</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">For background information see https://techbase.kde.org/Development/Tutorials/Localization/i18n_Build_System and especially the section https://techbase.kde.org/Development/Tutorials/Localization/i18n_Build_Systems#Qt5-only:_Code_using_Qt_translation_system</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">To get you started, for a) you might want to simply copy from the kcodecs repo the file src/Messages.sh into the same position in karchive. And for b) see the link above and https://api.kde.org/ecm/module/ECMPoQmTools.html which should give you an idea what to do.
For c) you add code like this to the toplevel CMakeLists.txt, compare again to how kcodecs does it:</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>if (IS_DIRECTORY "<span style="color: #BC7A00">${</span>CMAKE_CURRENT_SOURCE_DIR<span style="color: #BC7A00">}</span>/po")
    ecm_install_po_files_as_qm(po)
endif()
</pre></div>
</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;">Thanks for the info. I'll work on it when I have the time.</p></pre>
<br />










<p>- Romário</p>


<br />
<p>On October 15th, 2016, 3:08 a.m. UTC, Romário Rios 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.</div>
<div>By Romário Rios.</div>


<p style="color: grey;"><i>Updated Oct. 15, 2016, 3:08 a.m.</i></p>









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
karchive
</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;">This method is similar to <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">QIODevice::errorString()</code>. I added a public <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">errorString()</code> method and a protected <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">setErrorString()</code> method, to allow <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">KArchive</code>'s subclasses to implement their own error messages. I also implemented most error messages from most subclasses.</p></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;">I added <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">QVERIFY</code> calls after all errors in <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">karchivetests.cpp</code>. Perhaps we'll need more tests, but I'm not sure how to make an archive to fail in some specific way aside from the very basics ("file not found", etc.).</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>autotests/karchivetest.cpp <span style="color: grey">(d0fbf41)</span></li>

 <li>src/k7zip.cpp <span style="color: grey">(692b1db)</span></li>

 <li>src/kar.cpp <span style="color: grey">(7204fb1)</span></li>

 <li>src/karchive.h <span style="color: grey">(b528a4a)</span></li>

 <li>src/karchive.cpp <span style="color: grey">(a1a160a)</span></li>

 <li>src/karchive_p.h <span style="color: grey">(256620d)</span></li>

 <li>src/krcc.cpp <span style="color: grey">(1947dd6)</span></li>

 <li>src/ktar.cpp <span style="color: grey">(f70b155)</span></li>

 <li>src/kzip.cpp <span style="color: grey">(94d4276)</span></li>

</ul>

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






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







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