Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > f9d20baf2d42bbb9f9c5746dba0abad5 > files > 215

python-translate-doc-1.10.0-3.mga4.noarch.rpm


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>podebug &mdash; Translate Toolkit 1.9.0 documentation</title>
    
    <link rel="stylesheet" href="../_static/basic.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    <link rel="stylesheet" href="../_static/bootstrap.css" type="text/css" />
    <link rel="stylesheet" href="../_static/bootstrap-sphinx.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../',
        VERSION:     '1.9.0',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <script type="text/javascript" src="../_static/bootstrap.js"></script>
    <script type="text/javascript" src="../_static/bootstrap-sphinx.js"></script>
    <link rel="top" title="Translate Toolkit 1.9.0 documentation" href="../index.html" />
    <link rel="up" title="Converters" href="index.html" />
    <link rel="next" title="–rewrite=STYLE" href="option_rewrite.html" />
    <link rel="prev" title="pocount" href="pocount.html" /> 
  </head>
  <body>
  <div id="navbar" class="navbar navbar-fixed-top">
    <div class="navbar-inner">
      <div class="container-fluid">
        <a class="brand" href="../index.html">Translate Toolkit</a>
        <span class="navbar-text pull-left"><b>1.9.0</b></span>
          <ul class="nav">
            <li class="divider-vertical"></li>
            
              <li class="dropdown">
  <a href="#" class="dropdown-toggle" data-toggle="dropdown">Site <b class="caret"></b></a>
  <ul class="dropdown-menu globaltoc"><ul class="simple">
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../features.html">Features</a></li>
<li class="toctree-l1"><a class="reference internal" href="../installation.html">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="index.html">Converters</a></li>
<li class="toctree-l1"><a class="reference internal" href="index.html#tools">Tools</a></li>
<li class="toctree-l1"><a class="reference internal" href="index.html#scripts">Scripts</a></li>
<li class="toctree-l1"><a class="reference internal" href="../guides/index.html">Use Cases</a></li>
<li class="toctree-l1"><a class="reference internal" href="../formats/index.html">Supported formats</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../styleguide.html">Translate Styleguide</a></li>
<li class="toctree-l1"><a class="reference internal" href="../styleguide.html#documentation">Documentation</a></li>
<li class="toctree-l1"><a class="reference internal" href="../development/building.html">Building</a></li>
<li class="toctree-l1"><a class="reference internal" href="../development/contributing.html">Contributing</a></li>
<li class="toctree-l1"><a class="reference internal" href="../development/developers.html">Translate Toolkit Developers Guide</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../api/index.html">API</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../changelog.html">Important Changes</a></li>
<li class="toctree-l1"><a class="reference internal" href="../history.html">History of the Translate Toolkit</a></li>
<li class="toctree-l1"><a class="reference internal" href="../license.html">License</a></li>
</ul>
</ul>
</li>
              
<li class="dropdown">
  <a href="#" class="dropdown-toggle" data-toggle="dropdown">Page <b class="caret"></b></a>
  <ul class="dropdown-menu localtoc"><ul>
<li><a class="reference internal" href="#">podebug</a><ul>
<li><a class="reference internal" href="#usage">Usage</a></li>
<li><a class="reference internal" href="#formats">Formats</a></li>
<li><a class="reference internal" href="#rewriting-style">Rewriting (style)</a></li>
<li><a class="reference internal" href="#ignoring-messages">Ignoring messages</a></li>
<li><a class="reference internal" href="#hashing">Hashing</a></li>
<li><a class="reference internal" href="#usings-podebug">Usings podebug</a></li>
</ul>
</li>
</ul>
</ul>
</li>
            
            
              
  <li><a href="pocount.html"
         title="previous chapter">&laquo; pocount</a></li>
  <li><a href="option_rewrite.html"
         title="next chapter">&#8211;rewrite=STYLE &raquo;</a></li>
            
            
              
            
          </ul>
          
            
<form class="navbar-search pull-right" action="../search.html" method="get">
  <input type="text" name="q" placeholder="Search" />
  <input type="hidden" name="check_keywords" value="yes" />
  <input type="hidden" name="area" value="default" />
</form>
          
          </ul>
        </div>
      </div>
    </div>
  </div>

<div class="container content">
   
  <div class="section" id="podebug">
<span id="id1"></span><h1>podebug<a class="headerlink" href="#podebug" title="Permalink to this headline">¶</a></h1>
<p>Insert <a class="reference external" href="https://en.wikipedia.org/wiki/Pseudolocalization">pseudo translations</a> or debug markers into
target text in XLIFF, Gettex PO and other localization files.</p>
<p>The pseudo translation or debug markers make it easy to reference and locate
strings when your translated application is running.</p>
<p>Use it to:</p>
<ul class="simple">
<li><em>Target your translations</em>: see what files are being referenced for string
appearing in your programs.</li>
<li><em>Debug translations</em>: if you know in what file the message occurs then you
can quickly find it and fix it.</li>
<li><em>Check that everything is translatable</em>: any English only text needs to be
analysed so that it can be localised.</li>
<li><em>Check for Unicode compliance</em>: by inserting Unicode text outside of the
Latin range it allows you to check that your program can handle non-Latin
correctly.</li>
</ul>
<div class="section" id="usage">
<span id="podebug-usage"></span><h2>Usage<a class="headerlink" href="#usage" title="Permalink to this headline">¶</a></h2>
<div class="highlight-python"><pre>podebug [options] &lt;in&gt; &lt;out&gt;</pre>
</div>
<p>Where:</p>
<table border="1" class="docutils">
<colgroup>
<col width="10%" />
<col width="90%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>&lt;in&gt;</td>
<td>is an input directory or localisation file file</td>
</tr>
<tr class="row-even"><td>&lt;out&gt;</td>
<td>is an output directory or localisation file, if missing output
will be to standard out.</td>
</tr>
</tbody>
</table>
<p>Options:</p>
<table class="docutils option-list" frame="void" rules="none">
<col class="option" />
<col class="description" />
<tbody valign="top">
<tr><td class="option-group">
<kbd><span class="option">--version</span></kbd></td>
<td>show program&#8217;s version number and exit</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-h</span>, <span class="option">--help</span></kbd></td>
<td>show this help message and exit</td></tr>
<tr><td class="option-group">
<kbd><span class="option">--manpage</span></kbd></td>
<td>output a manpage based on the help</td></tr>
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--progress=<var>PROGRESS</var></span></kbd></td>
</tr>
<tr><td>&nbsp;</td><td>show progress as: <a class="reference internal" href="option_progress.html"><em>dots, none, bar, names,
verbose</em></a></td></tr>
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--errorlevel=<var>ERRORLEVEL</var></span></kbd></td>
</tr>
<tr><td>&nbsp;</td><td>show errorlevel as: <a class="reference internal" href="option_errorlevel.html"><em>none, message, exception,
traceback</em></a></td></tr>
<tr><td class="option-group" colspan="2">
<kbd><span class="option">-i<var>INPUT</var></span>, <span class="option">--input=<var>INPUT</var></span></kbd></td>
</tr>
<tr><td>&nbsp;</td><td>read from INPUT in po, pot formats</td></tr>
<tr><td class="option-group" colspan="2">
<kbd><span class="option">-x<var>EXCLUDE</var></span>, <span class="option">--exclude=<var>EXCLUDE</var></span></kbd></td>
</tr>
<tr><td>&nbsp;</td><td>exclude names matching EXCLUDE from input paths</td></tr>
<tr><td class="option-group" colspan="2">
<kbd><span class="option">-o<var>OUTPUT</var></span>, <span class="option">--output=<var>OUTPUT</var></span></kbd></td>
</tr>
<tr><td>&nbsp;</td><td>write to OUTPUT in po, pot formats</td></tr>
<tr><td class="option-group">
<kbd><span class="option">--psyco=<var>MODE</var></span></kbd></td>
<td>use psyco to speed up the operation, modes: <a class="reference internal" href="option_psyco.html"><em>none,
full, profile</em></a></td></tr>
<tr><td class="option-group">
<kbd><span class="option">-P</span>, <span class="option">--pot</span></kbd></td>
<td>output PO Templates (.pot) rather than PO files (.po)</td></tr>
<tr><td class="option-group" colspan="2">
<kbd><span class="option">-f<var>FORMAT</var></span>, <span class="option">--format=<var>FORMAT</var></span></kbd></td>
</tr>
<tr><td>&nbsp;</td><td>specify format string</td></tr>
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--rewrite=<var>STYLE</var></span></kbd></td>
</tr>
<tr><td>&nbsp;</td><td>the translation rewrite style: <a class="reference internal" href="option_rewrite.html"><em>xxx, en, blank,
chef  (v1.2), unicode (v1.2)</em></a></td></tr>
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--ignore=<var>APPLICATION</var></span></kbd></td>
</tr>
<tr><td>&nbsp;</td><td>apply tagging ignore rules for the given application:
kde, gtk, openoffice, mozilla</td></tr>
<tr><td class="option-group">
<kbd><span class="option">--hash=<var>LENGTH</var></span></kbd></td>
<td>add an md5 hash to translations (only until version
1.3.0 &#8211; see %h below)</td></tr>
</tbody>
</table>
</div>
<div class="section" id="formats">
<span id="podebug-formats"></span><h2>Formats<a class="headerlink" href="#formats" title="Permalink to this headline">¶</a></h2>
<p>A format string can have these various options:</p>
<table border="1" class="docutils">
<colgroup>
<col width="5%" />
<col width="95%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>f</td>
<td>full filename including directory</td>
</tr>
<tr class="row-even"><td>F</td>
<td>as %f but with .po file extension</td>
</tr>
<tr class="row-odd"><td>b</td>
<td>base of filename</td>
</tr>
<tr class="row-even"><td>B</td>
<td>base of filename with .po file extension</td>
</tr>
<tr class="row-odd"><td>d</td>
<td>directory name</td>
</tr>
<tr class="row-even"><td>s</td>
<td>preset OpenOffice.org modifier</td>
</tr>
<tr class="row-odd"><td>c</td>
<td>use only consonants</td>
</tr>
<tr class="row-even"><td>h</td>
<td>hash value (since version 1.4 &#8211; see notes below)</td>
</tr>
<tr class="row-odd"><td>N</td>
<td>a set number of characters</td>
</tr>
</tbody>
</table>
<p>A format string may look like this:</p>
<ul class="simple">
<li><tt class="docutils literal"><span class="pre">%cf</span></tt> &#8211; the full filename without vowels</li>
<li><tt class="docutils literal"><span class="pre">[%10cb]&nbsp;</span></tt> &#8211; the first ten character after compressing the base of the
filename and place it in square brackets with a space before the real message</li>
<li><tt class="docutils literal"><span class="pre">[%5cd</span> <span class="pre">-</span> <span class="pre">%cB]&nbsp;</span></tt> &#8211; the first 5 consonants of the directory, followed by a
dash then the consonants of the filename with a .po extension.  All
surrounded by square brackets with a space before the translations.</li>
<li><tt class="docutils literal"><span class="pre">%4h.</span></tt> &#8211; insert a hash value of length 4</li>
</ul>
<p>Complex format strings may make it too difficult to actually read the
translation, so you are probably best served using as short a string as
possible.</p>
</div>
<div class="section" id="rewriting-style">
<span id="podebug-rewriting-style"></span><h2>Rewriting (style)<a class="headerlink" href="#rewriting-style" title="Permalink to this headline">¶</a></h2>
<p>The rewriting options are designed to change the target text in various ways
(c.f. the various <a class="reference internal" href="option_rewrite.html"><em>rewriting styles</em></a> available).  This is
mostly valuable for debugging English text.  The &#8216;xxx&#8217; rewriter is useful in
that it allows you to identify text that has not localisable as that text will
lack the xxx characters.</p>
<p>The &#8216;en&#8217; rewriter can be used to prepare English hashed (see below) files for
quickly finding strings that have spelling or other errors.  It can also be
used to create a translated English file which can then be used for other
purposes such as British English translation.</p>
</div>
<div class="section" id="ignoring-messages">
<span id="podebug-ignoring-messages"></span><h2>Ignoring messages<a class="headerlink" href="#ignoring-messages" title="Permalink to this headline">¶</a></h2>
<p>In some applications their are translations that should not be translated
(usually these are configuration options).  If you do translate them then the
application will fail to compile or run.</p>
<p>The <tt class="docutils literal"><span class="pre">--ignore</span></tt> option allows you to specify the application for which you
are producing PO debug files.  In this case it will then not mark certain of
the PO entries with debug messages.</p>
<p>In Mozilla we do not mark lone <tt class="docutils literal"><span class="pre">.accesskey</span></tt>, <tt class="docutils literal"><span class="pre">.width</span></tt>, <tt class="docutils literal"><span class="pre">.height</span></tt>, etc
since these can really be thought of as configuration options.</p>
</div>
<div class="section" id="hashing">
<span id="podebug-hashing"></span><h2>Hashing<a class="headerlink" href="#hashing" title="Permalink to this headline">¶</a></h2>
<p>Sometimes you find an error in a string.  But it is difficult to search for the
occurance of the error.  In order to make it easy to find a string in your
files we can produce a hash on the strings location and other data.  This
produces unique alphanumeric sequences which are prepended to the target text.
Thus now in your application you have your translated text and a alphanumeric
value.  Its is then easy to search for that value and find your problem string.</p>
</div>
<div class="section" id="usings-podebug">
<span id="podebug-more-reading"></span><h2>Usings podebug<a class="headerlink" href="#usings-podebug" title="Permalink to this headline">¶</a></h2>
<p>Here are some more examples in a <a class="reference external" href="http://translate.org.za/blogs/friedel/en/content/pseudolocalisation-podebug-1">series</a>
<a class="reference external" href="http://translate.org.za/blogs/friedel/en/content/pseudolocalisation-podebug-2">of</a>
<a class="reference external" href="http://translate.org.za/blogs/friedel/en/content/pseudolocalisation-podebug-3-interview-rail-aliev">blog posts</a>.</p>
</div>
</div>


</div>
<hr>

<footer class="footer">
  <div class="container">
    <p class="pull-right"><a href="#">Back to top ↑</a></p>
    <ul class="unstyled muted">
      <li><small>
        &copy; 2012, Translate.org.za.<br/>
      </small></li>
      <li><small>
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
      </small></li>
    </ul>
  </div>
</footer>
  </body>
</html>