Sophie

Sophie

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

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>pogrep &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="pomerge" href="pomerge.html" />
    <link rel="prev" title="Descriptions of all pofilter tests" href="pofilter_tests.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="#">pogrep</a><ul>
<li><a class="reference internal" href="#usage">Usage</a></li>
<li><a class="reference internal" href="#example">Example</a></li>
<li><a class="reference internal" href="#notes">Notes</a><ul>
<li><a class="reference internal" href="#unicode-normalization">Unicode normalization</a></li>
</ul>
</li>
<li><a class="reference internal" href="#further-reading">Further reading</a></li>
</ul>
</li>
</ul>
</ul>
</li>
            
            
              
  <li><a href="pofilter_tests.html"
         title="previous chapter">&laquo; Descriptions of all pofilter tests</a></li>
  <li><a href="pomerge.html"
         title="next chapter">pomerge &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="pogrep">
<span id="id1"></span><h1>pogrep<a class="headerlink" href="#pogrep" title="Permalink to this headline">¶</a></h1>
<p>The pogrep tool extracts messages that match a regular expression into a new
set of PO files that can be examined, edited and corrected.  These corrections
can then be merged using <a class="reference internal" href="pomerge.html"><em>pomerge</em></a>.</p>
<div class="section" id="usage">
<span id="pogrep-usage"></span><h2>Usage<a class="headerlink" href="#usage" title="Permalink to this headline">¶</a></h2>
<div class="highlight-python"><pre>pogrep [options] &lt;in&gt; &lt;out&gt;</pre>
</div>
<p>Where:</p>
<table border="1" class="docutils">
<colgroup>
<col width="16%" />
<col width="84%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>&lt;in&gt;/&lt;out&gt;</td>
<td><em>In</em> and <em>out</em> are either directories or files.  <em>Out</em> will
contain PO/XLIFF files with only those messages that match
the regular expression that was you searched for.</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, xlf formats (XLIFF since version 1.0)</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, xlf formats (XLIFF since version 1.0)</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" colspan="2">
<kbd><span class="option">--search=<var>SEARCHPARTS</var></span></kbd></td>
</tr>
<tr><td>&nbsp;</td><td>searches the given parts (source, target, notes, locations)</td></tr>
<tr><td class="option-group" colspan="2">
<kbd><span class="option">-I</span>, <span class="option">--ignore-case</span></kbd></td>
</tr>
<tr><td>&nbsp;</td><td>ignore case distinctions</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-e</span>, <span class="option">--regexp</span></kbd></td>
<td>use regular expression matching</td></tr>
<tr><td class="option-group" colspan="2">
<kbd><span class="option">-v</span>, <span class="option">--invert-match</span></kbd></td>
</tr>
<tr><td>&nbsp;</td><td>select non-matching lines</td></tr>
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--accelerator=<var>ACCELERATORS</var></span></kbd></td>
</tr>
<tr><td>&nbsp;</td><td>ignores the given <a class="reference internal" href="option_accelerator.html"><em>accelerator characters</em></a> when matching</td></tr>
</tbody>
</table>
</div>
<div class="section" id="example">
<span id="pogrep-example"></span><h2>Example<a class="headerlink" href="#example" title="Permalink to this headline">¶</a></h2>
<div class="highlight-python"><pre>pogrep --accelerator="_" --search msgid -I -e "software|hardware" only-zu only-zu-check</pre>
</div>
<p>Search for the words &#8220;software&#8221; or &#8220;hardware&#8221; in the msgid field.  Ignore case
(<tt class="docutils literal"><span class="pre">-I</span></tt>) and treat the underscore (_) character as an accelerator key.
Search through all PO files in the directory &#8220;only-zu&#8221; and place any matches in
PO files in the directory &#8220;only-zu-check&#8221;.  This would be useful to run if you
know that the word for software and hardware has been changed during the course
of translation and you want to check and correct all these instances.</p>
<div class="highlight-python"><pre>pogrep --search=msgid -e '^\w+(\s+\w+){0,3}$' -i templates -o short-words</pre>
</div>
<p>Find all messages in the <em>templates</em> directory that have between 1 and 4 words
and place them in <em>short-words</em>.  Use this if you want to see quick results by
translating messages that are most likely menu entries or dialogue labels.</p>
<div class="highlight-python"><pre>pogrep --search=msgstr -I -e "Ifayile" zu zu-check</pre>
</div>
<p>Search all translations for the occurrence of <em>Ifayile</em>.  You would use this to
check if words have been used correctly.  Useful if you find problematic use of
the same word for different concepts.  You can use <a class="reference internal" href="pocompendium.html"><em>pocompendium</em></a> to find
these conflicts.</p>
</div>
<div class="section" id="notes">
<span id="pogrep-notes"></span><h2>Notes<a class="headerlink" href="#notes" title="Permalink to this headline">¶</a></h2>
<div class="section" id="unicode-normalization">
<span id="pogrep-unicode-normalization"></span><h3>Unicode normalization<a class="headerlink" href="#unicode-normalization" title="Permalink to this headline">¶</a></h3>
<p>pogrep will normalize Unicode strings.  This allows you to search for strings
that contain the same character but that are using precomposed Unicode
characters or which are composed using another composition recipe.  While an
individual user will in all likelihood only compose characters in one way,
normalization ensures that data created in a team setting can be shared.</p>
</div>
</div>
<div class="section" id="further-reading">
<span id="pogrep-further-reading"></span><h2>Further reading<a class="headerlink" href="#further-reading" title="Permalink to this headline">¶</a></h2>
<p>Here is a blog post explaining how pogrep can be used to do more targeted
localisation of GNOME:
<a class="reference external" href="http://translate.org.za/blogs/friedel/en/content/better-lies-about-gnome-localisation">http://translate.org.za/blogs/friedel/en/content/better-lies-about-gnome-localisation</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>