Sophie

Sophie

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

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>General Usage &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="moz2po" href="moz2po.html" />
    <link rel="prev" title="Converters" href="index.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="#">General Usage</a><ul>
<li><a class="reference internal" href="#input-output">Input &amp; Output</a></li>
<li><a class="reference internal" href="#error-reporting">Error Reporting</a></li>
<li><a class="reference internal" href="#templates">Templates</a></li>
<li><a class="reference internal" href="#source2target">source2target</a></li>
<li><a class="reference internal" href="#getting-help">Getting Help</a></li>
</ul>
</li>
</ul>
</ul>
</li>
            
            
              
  <li><a href="index.html"
         title="previous chapter">&laquo; Converters</a></li>
  <li><a href="moz2po.html"
         title="next chapter">moz2po &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="general-usage">
<span id="id1"></span><h1>General Usage<a class="headerlink" href="#general-usage" title="Permalink to this headline">¶</a></h1>
<p>The tools follow a general usage convention which is helpful to understand.</p>
<div class="section" id="input-output">
<span id="general-usage-input-output"></span><h2>Input &amp; Output<a class="headerlink" href="#input-output" title="Permalink to this headline">¶</a></h2>
<p>The last two arguments of your command are the input and output
files/directories:</p>
<div class="highlight-python"><pre>moz2po &lt;input&gt; &lt;output&gt;</pre>
</div>
<p>You can of course still us the <tt class="docutils literal"><span class="pre">-i</span></tt> and <tt class="docutils literal"><span class="pre">-o</span></tt> options which allows you
to reorder commands</p>
<div class="highlight-python"><pre>moz2po -o &lt;output&gt; -i &lt;input&gt;</pre>
</div>
</div>
<div class="section" id="error-reporting">
<span id="general-usage-error-reporting"></span><h2>Error Reporting<a class="headerlink" href="#error-reporting" title="Permalink to this headline">¶</a></h2>
<p>All tools accept the option <tt class="docutils literal"><span class="pre">--errorlevel</span></tt>.  If you find a bug, add this
option and send the traceback to the developers.</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">moz2po</span> <span class="o">&lt;</span><span class="n">other</span><span class="o">-</span><span class="n">options</span><span class="o">&gt;</span> <span class="o">--</span><span class="n">errorlevel</span><span class="o">=</span><span class="n">traceback</span>
</pre></div>
</div>
</div>
<div class="section" id="templates">
<span id="general-usage-templates"></span><h2>Templates<a class="headerlink" href="#templates" title="Permalink to this headline">¶</a></h2>
<p>If you are working with any file format and you wish to preserve comments and
layout then use your source file as a template.</p>
<div class="highlight-python"><pre>po2dtd -t &lt;source-file&gt; &lt;input&gt; &lt;output&gt;</pre>
</div>
<p>This will use the files in <tt class="docutils literal"><span class="pre">&lt;source-file&gt;</span></tt> as a template, merge the PO files
in <tt class="docutils literal"><span class="pre">&lt;input&gt;</span></tt>, and create new DTD files in <tt class="docutils literal"><span class="pre">&lt;output&gt;</span></tt></p>
<p>If you ran this without the templates you would get valid DTD files but they
would not preserve the layout or all the comments from the source DTD file</p>
<p>The same concept of templates is also used when you merge files.</p>
<div class="highlight-python"><pre>pomerge -t &lt;old&gt; &lt;fixes&gt; &lt;new&gt;</pre>
</div>
<p>This would take the <tt class="docutils literal"><span class="pre">&lt;old&gt;</span></tt> files merge in the <tt class="docutils literal"><span class="pre">&lt;fixes&gt;</span></tt> and output new PO
files, preserving formatting, into <tt class="docutils literal"><span class="pre">&lt;new&gt;</span></tt>.  You can use the same directory
for <tt class="docutils literal"><span class="pre">&lt;old&gt;</span></tt> and <tt class="docutils literal"><span class="pre">&lt;new&gt;</span></tt> if you want the merges to overwrite files in
<tt class="docutils literal"><span class="pre">&lt;old&gt;</span></tt>.</p>
</div>
<div class="section" id="source2target">
<span id="general-usage-source2target"></span><h2>source2target<a class="headerlink" href="#source2target" title="Permalink to this headline">¶</a></h2>
<p>The converters all follow this convention:</p>
<ul class="simple">
<li>source = the format from which you are converting e.g. in <a class="reference internal" href="oo2po.html"><em>oo2po</em></a> we are converting from OpenOffice.org SDF/GSI</li>
<li>target = the format into which you are converting e.g. in <a class="reference internal" href="oo2po.html"><em>oo2po</em></a> we are converting to Gettext PO</li>
</ul>
</div>
<div class="section" id="getting-help">
<span id="general-usage-getting-help"></span><h2>Getting Help<a class="headerlink" href="#getting-help" title="Permalink to this headline">¶</a></h2>
<p>The <tt class="docutils literal"><span class="pre">--help</span></tt> option will always list the available commands for the tool.</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">moz2po</span> <span class="o">--</span><span class="n">help</span>
</pre></div>
</div>
</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>