[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-i18n-doc
Subject:    Re: Review Request 7107: New script: generate-en-po
From:       Aurélien Gâteau <agateau () kde ! org>
Date:       2014-04-26 10:56:05
Message-ID: 20140426105605.3536.68672 () probe ! kde ! org
[Download RAW message or body]

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://svn.reviewboard.kde.org/r/7107/
-----------------------------------------------------------

(Updated April 26, 2014, 10:56 a.m.)


Review request for Localization and Translation (l10n) and Albert Astals Cid.


Changes
-------

This new version integrates with extract-tr-strings, as discussed with Albert during \
the KF5 sprint.

Right now it requires the environment variable $enpodir to be defined and to point to \
the directory which is going to contain the en.po file, something like \
en/messages/<module>/. We could also deduce the value of $enpodir from $podir by \
replacing "templates" in $podir with "en". Would this work?


Repository: kde


Description
-------

This script generates en.po files for Qt-translated code. It expects code to be \
formatted like this:

//~ singular %n file
//~ plural %n files
t = tr("%n file(s)", "", n);

It complains and exits with 1 if a plural tr() does not come with the necessary \
comments.

It works similarly to other extract scripts: you pass it a list of source files and a \
"-o" option to specify where to write the resulting en.po. I hope this is good enough \
to integrate this in scripty. Let me know if you prefer another way to invoke it.


Diffs (updated)
-----

  trunk/l10n-kf5/scripts/extract-tr-strings 1385323 
  trunk/l10n-kf5/scripts/generate-en-po PRE-CREATION 

Diff: https://svn.reviewboard.kde.org/r/7107/diff/


Testing
-------

Tested with code from git@git.kde.org:scratch/gateau/qmpluraltest


Thanks,

Aurélien Gâteau


[Attachment #3 (text/html)]

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




<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('https://svn.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 Localization and Translation (l10n) and Albert Astals \
Cid.</div> <div>By Aurélien Gâteau.</div>


<p style="color: grey;"><i>Updated April 26, 2014, 10:56 a.m.</i></p>



<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Changes</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;">This new version integrates with extract-tr-strings, as discussed with \
Albert during the KF5 sprint.

Right now it requires the environment variable $enpodir to be defined and to point to \
the directory which is going to contain the en.po file, something like \
en/messages/&lt;module&gt;/. We could also deduce the value of $enpodir from $podir \
by replacing &quot;templates&quot; in $podir with &quot;en&quot;. Would this work? \
</pre>  </td>
 </tr>
</table>







<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
kde
</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;">This script generates en.po files for Qt-translated code. It expects \
code to be formatted like this:

//~ singular %n file
//~ plural %n files
t = tr(&quot;%n file(s)&quot;, &quot;&quot;, n);

It complains and exits with 1 if a plural tr() does not come with the necessary \
comments.

It works similarly to other extract scripts: you pass it a list of source files and a \
&quot;-o&quot; option to specify where to write the resulting en.po. I hope this is \
good enough to integrate this in scripty. Let me know if you prefer another way to \
invoke it.</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;">Tested with code from git@git.kde.org:scratch/gateau/qmpluraltest</pre>  \
</td>  </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> \
(updated)</h1> <ul style="margin-left: 3em; padding-left: 0;">

 <li>trunk/l10n-kf5/scripts/extract-tr-strings <span style="color: \
grey">(1385323)</span></li>

 <li>trunk/l10n-kf5/scripts/generate-en-po <span style="color: \
grey">(PRE-CREATION)</span></li>

</ul>

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







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




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



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic