Sophie

Sophie

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

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>–rewrite=STYLE &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="posegment" href="posegment.html" />
    <link rel="prev" title="podebug" href="podebug.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="#">&#8211;rewrite=STYLE</a><ul>
<li><a class="reference internal" href="#xxx">xxx</a></li>
<li><a class="reference internal" href="#en">en</a></li>
<li><a class="reference internal" href="#blank">blank</a></li>
<li><a class="reference internal" href="#bracket">bracket</a></li>
<li><a class="reference internal" href="#chef">chef</a></li>
<li><a class="reference internal" href="#flipped">flipped</a></li>
<li><a class="reference internal" href="#unicode">unicode</a></li>
</ul>
</li>
</ul>
</ul>
</li>
            
            
              
  <li><a href="podebug.html"
         title="previous chapter">&laquo; podebug</a></li>
  <li><a href="posegment.html"
         title="next chapter">posegment &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="rewrite-style">
<span id="option-rewrite"></span><h1>&#8211;rewrite=STYLE<a class="headerlink" href="#rewrite-style" title="Permalink to this headline">¶</a></h1>
<p><a class="reference internal" href="podebug.html"><em>podebug</em></a> allows you to rewrite the output text in a number of ways.</p>
<div class="section" id="xxx">
<span id="option-rewrite-xxx"></span><h2>xxx<a class="headerlink" href="#xxx" title="Permalink to this headline">¶</a></h2>
<p>The target text is surrounded by <tt class="docutils literal"><span class="pre">xxx</span></tt> as follows</p>
<div class="highlight-po"><div class="highlight"><pre><span class="nv">msgid</span> <span class="s">&quot;English&quot;</span>
<span class="nv">msgstr</span> <span class="s">&quot;xxxEnglishxxx&quot;</span>
</pre></div>
</div>
<p>This is useful when you want to identify which text is localisable.  There
might be text in your application which you cannot localise this will allow you
to quickly identify that text.</p>
</div>
<div class="section" id="en">
<span id="option-rewrite-en"></span><h2>en<a class="headerlink" href="#en" title="Permalink to this headline">¶</a></h2>
<p>The source text is copied to the target</p>
<div class="highlight-po"><div class="highlight"><pre><span class="nv">msgid</span> <span class="s">&quot;English&quot;</span>
<span class="nv">msgstr</span> <span class="s">&quot;English&quot;</span>
</pre></div>
</div>
<p>In this way you can create translations that contain only the source text.
Useful if you are preparing a roundtrip test or want to start an English
derived translation such as British English.  It produces the same results as
<a class="reference external" href="http://linux.die.net/man/1/msgen">msgen</a> but with the advantage that you can add debug markers.</p>
</div>
<div class="section" id="blank">
<span id="option-rewrite-blank"></span><h2>blank<a class="headerlink" href="#blank" title="Permalink to this headline">¶</a></h2>
<p>This simply empties your current translations</p>
<div class="highlight-po"><div class="highlight"><pre><span class="nv">msgid</span> <span class="s">&quot;English&quot;</span>
<span class="nv">msgstr</span> <span class="s">&quot;&quot;</span>
</pre></div>
</div>
<p>When you have a set of translation files but no template this allows you to
essentially convert a PO into a POT file.  This mimics the <tt class="docutils literal"><span class="pre">--empty</span></tt>
functionality of <a class="reference external" href="http://linux.die.net/man/1/msghack">msghack</a>.</p>
</div>
<div class="section" id="bracket">
<span id="option-rewrite-bracket"></span><h2>bracket<a class="headerlink" href="#bracket" title="Permalink to this headline">¶</a></h2>
<p class="versionadded">
<span class="versionmodified">New in version 1.4.</span></p>
<p>Places brackets around the translated text.</p>
<div class="highlight-po"><div class="highlight"><pre><span class="nv">msgid</span> <span class="s">&quot;English&quot;</span>
<span class="nv">msgstr</span> <span class="s">&quot;[English]&quot;</span>
</pre></div>
</div>
<p>This can be used in the same way as <tt class="docutils literal"><span class="pre">xxx</span></tt> to check for translatability.  It
is also useful with very long strings as it allows you to check that the full
string in rendered and has not been cutoff by the application.</p>
</div>
<div class="section" id="chef">
<span id="option-rewrite-chef"></span><h2>chef<a class="headerlink" href="#chef" title="Permalink to this headline">¶</a></h2>
<p class="versionadded">
<span class="versionmodified">New in version 1.2.</span></p>
<p>Rewrites the source text using mock Swedish as popularised by the <a class="reference external" href="https://en.wikipedia.org/wiki/Swedish_Chef">Swedish Chef</a>.</p>
<div class="highlight-po"><div class="highlight"><pre><span class="nv">msgid</span> <span class="s">&quot;English&quot;</span>
<span class="nv">msgstr</span> <span class="s">&quot;Ingleesh&quot;</span>
</pre></div>
</div>
<p>This is probably only useful for some fun.  It&#8217;s not guaranteed that every
string will be rewritten as the mock Swedish rules might not apply thus its not
ideal for identifying untranslatable strings.</p>
</div>
<div class="section" id="flipped">
<span id="option-rewrite-flipped"></span><h2>flipped<a class="headerlink" href="#flipped" title="Permalink to this headline">¶</a></h2>
<p class="versionadded">
<span class="versionmodified">New in version 1.4.</span></p>
<p>Change the text into a version that uses equivalent Latin characters that are
upside down.</p>
<div class="highlight-po"><div class="highlight"><pre><span class="nv">msgid</span> <span class="s">&quot;English&quot;</span>
<span class="nv">msgstr</span> <span class="s">&quot;‮Ǝuƃʅısɥ&quot;</span>
</pre></div>
</div>
<p><tt class="docutils literal"><span class="pre">flipped</span></tt> can give an output that simulates RTL languages.  It inserts RTL
characters to try to achieve RTL-like results.  Its not perfect but will give
you some sense of whether your application can do RTL.  Or just use it for fun!</p>
<p>For really testing right-to-left GUIs, you want to make sure that the whole
application is shown in RTL, not just the strings. Test your pseudo-translated
file as a translation of an RTL language like Arabic or Hebrew. In case the
application relies on other files coming from libraries (like GTK+), you might
need to repeat the process for them, or at least ensure that you have the
Arabic/Hebrew .mo files for them installed.</p>
</div>
<div class="section" id="unicode">
<span id="option-rewrite-unicode"></span><h2>unicode<a class="headerlink" href="#unicode" title="Permalink to this headline">¶</a></h2>
<p class="versionadded">
<span class="versionmodified">New in version 1.2.</span></p>
<p>Rewrites the source text with Unicode characters that looks like the Latin
characters that they are replacing.</p>
<div class="highlight-po"><div class="highlight"><pre><span class="nv">msgid</span> <span class="s">&quot;English&quot;</span>
<span class="nv">msgstr</span> <span class="s">&quot;Ḗƞɠŀīşħ&quot;</span>
</pre></div>
</div>
<p>This allows a translator or programmer to test a programs ability to use
Unicode message strings. By using characters in the Unicode range but that are
related to the plain Latin characters that they replace we ensure that the
messages are still readable.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Before version 1.4, the rewrite rule will also rewrite variables
and XML tags, which would cause problems in some situations.
Run <a class="reference internal" href="pofilter.html"><em>pofilter</em></a> as a quick method to fix up incorrect changes, or
upgrade to version 1.4.</p>
</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>