Sophie

Sophie

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

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>Migrating Mozilla Translations to Firefox &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="Use Cases" href="index.html" />
    <link rel="next" title="Document translation" href="document_translation.html" />
    <link rel="prev" title="Creating Mozilla POT files" href="creating_mozilla_pot_files.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="../commands/index.html">Converters</a></li>
<li class="toctree-l1"><a class="reference internal" href="../commands/index.html#tools">Tools</a></li>
<li class="toctree-l1"><a class="reference internal" href="../commands/index.html#scripts">Scripts</a></li>
<li class="toctree-l1"><a class="reference internal" href="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="#">Migrating Mozilla Translations to Firefox</a><ul>
<li><a class="reference internal" href="#quick-start">Quick Start</a></li>
<li><a class="reference internal" href="#detailed-description">Detailed Description</a><ul>
<li><a class="reference internal" href="#make-sure-your-mozilla-is-in-po-format">Make sure your Mozilla is in PO format</a><ul>
<li><a class="reference internal" href="#get-the-correct-en-us-xpi">Get the correct en-US xpi</a></li>
<li><a class="reference internal" href="#create-mozilla-po-files-for-your-language">Create Mozilla PO files for your language</a></li>
</ul>
</li>
<li><a class="reference internal" href="#create-firefox-pot-files">Create Firefox POT files</a><ul>
<li><a class="reference internal" href="#getting-the-en-us-xpi">Getting the en-US.xpi</a></li>
<li><a class="reference internal" href="#create-the-pot-files">Create the POT files</a></li>
</ul>
</li>
<li><a class="reference internal" href="#migrate-the-mozilla-po-files-to-firefox">Migrate the Mozilla PO files to Firefox</a><ul>
<li><a class="reference internal" href="#how-does-it-do-the-migration">How does it do the migration?</a></li>
</ul>
</li>
<li><a class="reference internal" href="#begin-translating">Begin translating</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</ul>
</li>
            
            
              
  <li><a href="creating_mozilla_pot_files.html"
         title="previous chapter">&laquo; Creating Mozilla POT files</a></li>
  <li><a href="document_translation.html"
         title="next chapter">Document translation &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="migrating-mozilla-translations-to-firefox">
<span id="migrating-to-firefox"></span><span id="id1"></span><h1>Migrating Mozilla Translations to Firefox<a class="headerlink" href="#migrating-mozilla-translations-to-firefox" title="Permalink to this headline">¶</a></h1>
<p>This quickstart shows you how to migrate your existing translations of the
Mozilla suite to the Firefox web-browser.  The same instructions can be used to
migrate Thunderbird§.</p>
<p>Note: This guide assumes that you are or will be using PO files.</p>
<p>FIXME this page needs to be rewriten now that Mozilla is using CSV.  The steps
are more or less the same.  Look at <a class="reference internal" href="creating_mozilla_pot_files.html"><em>Creating Mozilla POT files</em></a> which
talks about creating POT file from CVS. Then the process is mostly the same
except swap any reference to XPI to be the translations in Mozilla CVS.</p>
<div class="section" id="quick-start">
<span id="migrating-to-firefox-quick-start"></span><h2>Quick Start<a class="headerlink" href="#quick-start" title="Permalink to this headline">¶</a></h2>
<ol class="arabic simple">
<li><a class="reference internal" href="../commands/moz2po.html"><em>moz2po</em></a> -t mozilla-1.7.3-langenus.xpi langXXYY.xpi xxYY-1.7.3</li>
<li><a class="reference internal" href="../commands/moz2po.html"><em>moz2po</em></a> -P firefox-1.0-en-US.xpi templates-ff-1.0</li>
<li><a class="reference internal" href="../commands/pomigrate2.html"><em>pomigrate2</em></a> xxYY-1.7.3 xxYY-ff-1.0 templates-ff-1.0</li>
</ol>
</div>
<div class="section" id="detailed-description">
<span id="migrating-to-firefox-detailed-description"></span><h2>Detailed Description<a class="headerlink" href="#detailed-description" title="Permalink to this headline">¶</a></h2>
<div class="section" id="make-sure-your-mozilla-is-in-po-format">
<span id="migrating-to-firefox-make-sure-your-mozilla-is-in-po-format"></span><h3>Make sure your Mozilla is in PO format<a class="headerlink" href="#make-sure-your-mozilla-is-in-po-format" title="Permalink to this headline">¶</a></h3>
<p>If you are not currently using PO files to do your translations then you can
migrate an existing XPI to PO format.</p>
<div class="section" id="get-the-correct-en-us-xpi">
<span id="migrating-to-firefox-get-the-correct-en-us-xpi"></span><h4>Get the correct en-US xpi<a class="headerlink" href="#get-the-correct-en-us-xpi" title="Permalink to this headline">¶</a></h4>
<p>Firstly make sure you have an XPI for your language then download a Mozilla
English (US) XPI for the same release:</p>
<div class="highlight-python"><pre>ftp://ftp.mozilla.org/pub/mozilla.org/mozilla/releases/mozilla1.7.3/linux-xpi/langenus.xpi</pre>
</div>
<p>Change 1.7.3 to the release that you need.  Note: Linux and Windows
langenus.xpi are the same so no need to worry about that.</p>
</div>
<div class="section" id="create-mozilla-po-files-for-your-language">
<span id="migrating-to-firefox-create-mozilla-po-files-for-your-language"></span><h4>Create Mozilla PO files for your language<a class="headerlink" href="#create-mozilla-po-files-for-your-language" title="Permalink to this headline">¶</a></h4>
<p>Now create the Mozilla PO files for your language using your existing XPI and
the en-US XPI.</p>
<div class="highlight-python"><pre>moz2po -t mozilla-1.7.3-langenus.xpi langXXYY.xpi xxYY-1.7.3</pre>
</div>
<p>Where:</p>
<ul class="simple">
<li>mozilla-1.7.3-langenus.xpi is the langenus.xpi downloaded above</li>
<li>langXXYY.xpi is your existing translated XPI with the same version and the
en-US one downloaded.</li>
<li>xxYY-1.7.3 is an output directory for the PO files</li>
</ul>
</div>
</div>
<div class="section" id="create-firefox-pot-files">
<span id="migrating-to-firefox-create-firefox-pot-files"></span><h3>Create Firefox POT files<a class="headerlink" href="#create-firefox-pot-files" title="Permalink to this headline">¶</a></h3>
<p>You need to create a set of Firefox PO Template files that you will use as
templates when you migrate your Mozilla translations.  Template files are
simply blank PO files.</p>
<div class="section" id="getting-the-en-us-xpi">
<span id="migrating-to-firefox-getting-the-en-us-xpi"></span><h4>Getting the en-US.xpi<a class="headerlink" href="#getting-the-en-us-xpi" title="Permalink to this headline">¶</a></h4>
<p>Rumour has it that the en-US XPI files for Firefox are different for Windows
and Linux.</p>
<ul class="simple">
<li>Linux &#8211; Firefox 1.0:
<a class="reference external" href="ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/1.0/linux-i686/xpi/en-US.xpi">ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/1.0/linux-i686/xpi/en-US.xpi</a></li>
<li>Windows &#8211; Firefox 1.0:
<a class="reference external" href="ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/1.0/win32/xpi/en-US.xpi">ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/1.0/win32/xpi/en-US.xpi</a></li>
</ul>
</div>
<div class="section" id="create-the-pot-files">
<span id="migrating-to-firefox-create-the-pot-files"></span><h4>Create the POT files<a class="headerlink" href="#create-the-pot-files" title="Permalink to this headline">¶</a></h4>
<div class="highlight-python"><pre>moz2po -P firefox-1.0-en-US.xpi templates-ff-1.0</pre>
</div>
<p>Where:</p>
<ul class="simple">
<li><em>-P</em> specifies that you want to create POT files instead of PO files</li>
<li><em>firefox-1.0-en-US.xpi</em> is an en-US.xpi for Firefox downloaded earlier</li>
<li><em>templates-ff-1.0</em> is the new directory that will contain the POT files</li>
</ul>
</div>
</div>
<div class="section" id="migrate-the-mozilla-po-files-to-firefox">
<span id="migrating-to-firefox-migrate-the-mozilla-po-files-to-firefox"></span><h3>Migrate the Mozilla PO files to Firefox<a class="headerlink" href="#migrate-the-mozilla-po-files-to-firefox" title="Permalink to this headline">¶</a></h3>
<p>We will now take the existing Mozilla PO files and migrate them to Firefox.
Note that this tool only works on Linux (or an operating environment with bash
and the gettext tools).  If you need help ask at
<a class="reference external" href="mailto:translate-devel&#37;&#52;&#48;lists&#46;sourceforge&#46;net">translate-devel<span>&#64;</span>lists<span>&#46;</span>sourceforge<span>&#46;</span>net</a>.</p>
<div class="highlight-python"><pre>pomigrate2 xxYY-1.7.3 xxYY-ff-1.0 templates-ff-1.0</pre>
</div>
<p>Where:</p>
<ul class="simple">
<li><em>xxYY-1.7.3</em> contains your Mozilla PO files</li>
<li><em>xxYY-ff-1.0</em> will contain your new Firefox files</li>
<li><em>templates-ff-1.0</em> contains the Firefox template files</li>
</ul>
<div class="section" id="how-does-it-do-the-migration">
<span id="migrating-to-firefox-how-does-it-do-the-migration"></span><h4>How does it do the migration?<a class="headerlink" href="#how-does-it-do-the-migration" title="Permalink to this headline">¶</a></h4>
<p>Things that are fully automated scare most people and justifiably so!  The
migration will do the following:</p>
<ol class="arabic simple">
<li>For each Firefox PO Template file<ul>
<li>If there is one in your Mozilla folder<ul>
<li>If there is only one file with that name<ul>
<li>copy it to the correct Firefox PO location</li>
</ul>
</li>
<li>Else<ul>
<li>combine all the copies you find and then copy them to the Firefox PO
location</li>
</ul>
</li>
</ul>
</li>
<li>Else<ul>
<li>Initialise a blank PO file</li>
</ul>
</li>
</ul>
</li>
<li>Create a compendium file of all Mozilla PO files</li>
<li>Update all Firefox PO files optionally using the compendium</li>
</ol>
<p>The result is that all Firefox files are at least initialised.  Many of them
are populated with conflicting entries clearly highlighted and ready for you to
fix.</p>
</div>
</div>
<div class="section" id="begin-translating">
<span id="migrating-to-firefox-begin-translating"></span><h3>Begin translating<a class="headerlink" href="#begin-translating" title="Permalink to this headline">¶</a></h3>
<p>Your PO files are ready.  Begin translating with any of your usual PO editing
tools.</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>