1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138
|
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Translating — puddletag</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/bootstrap-sphinx.css" type="text/css" />
<script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js"></script>
<link rel="author" title="About these documents" href="../about.html" />
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<meta charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1'>
<meta name="apple-mobile-web-app-capable" content="yes">
<script type="text/javascript" src="../_static/js/jquery-1.11.0.min.js "></script>
<script type="text/javascript" src="../_static/js/jquery-fix.js "></script>
<script type="text/javascript" src="../_static/bootstrap-3.3.7/js/bootstrap.min.js "></script>
<script type="text/javascript" src="../_static/bootstrap-sphinx.js "></script>
</head><body>
<div id="navbar" class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<!-- .btn-navbar is used as the toggle for collapsed navbar content -->
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../index.html">puddletag</a>
</div>
<div class="collapse navbar-collapse nav-collapse">
<ul class="nav navbar-nav">
<li class="divider-vertical"></li>
<li><a href="../index.html">Home</a></li>
<li><a href="../download.html">Download</a></li>
<li><a href="../news.html">News</a></li>
<li><a href="../docs.html">Documentation</a></li>
<li><a href="https://github.com/puddletag/puddletag/issues">Issue Tracker</a></li>
<li><a href="../screenshots.html">Screenshots</a></li>
<li><a href="../about.html">About</a></li>
</ul>
<form class="navbar-form navbar-right" action="../search.html" method="get">
<div class="form-group">
<input type="text" name="q" class="form-control" placeholder="Search" />
</div>
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="body col-md-12 content" role="main">
<div class="section" id="translating">
<h1>Translating<a class="headerlink" href="#translating" title="Permalink to this headline">¶</a></h1>
<p>In order to translate puddletag you need Git, Qt Linguist, the PyQt5 translation tools (specifically pylupdate5) and the ability to copy/paste into the console.</p>
<p>In Ubuntu and Debian-based distros, Git is available in ‘git’ package, Qt Linguist in qttools5-dev-tools and pylupdate5 in pyqt5-dev-tools.</p>
<p>After installing the required tools, you’ll need to retrieve the latest development release. Open up a terminal and paste the following:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>git clone https://github.com/puddletag/puddletag.git
</pre></div>
</div>
<p>The dev version will downloaded into the puddletag directory. Change into the dev directory with:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="nb">cd</span> puddletag
</pre></div>
</div>
<p>Then run update_translation.py with your desired locale (eg en_ZA, rus, fr) like so:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>python update_translation.py your_locale
</pre></div>
</div>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>You can later update the dev version without downloading the whole thing again by using the following command in the downloaded puddletag dir:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>git pull origin master
</pre></div>
</div>
</div>
<p>A translation file will be created in <strong>puddlestuff/translations/puddletag_your_locale.ts</strong>. Open this file in <strong>Qt Linguist</strong> and translate to your heart’s content.</p>
<p>To test your translation, generate a .qm file using <strong>File->Release</strong> in Qt Linguist. puddletag_your_locale.qm will be generated in the directory the .ts file you opened is stored.</p>
<p>Copy the .qm to <strong>~/.config/puddletag/translations</strong> (you’ll need to create the translations dir). Next time you start puddletag you’ll have the option to switch to the language in <strong>Edit->Preferences</strong>.</p>
<p>Otherwise just run:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>puddletag --langfile /path/to/your_locale.qm
</pre></div>
</div>
<p>That being said, I recommend you run the dev version, because the strings used may differ from the latest release. To do so use:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="nb">cd</span> path/to/puddletag_dev_dir
python ./puddletag
</pre></div>
</div>
<p>Where <strong>path/to/puddletag_dev_dir</strong> is the path of the directory you downloaded the dev version of puddletag to.</p>
<p>When you’re done, create an issue on our <a class="reference external" href="https://github.com/puddletag/puddletag/issues">issue tracker</a> with your translation (the .ts file) and I’ll merge it in.</p>
</div>
</div>
</div>
</div>
<footer class="footer">
<div class="container">
<p class="pull-right">
<a href="#">Back to top</a>
</p>
<p>
This page and associated images are licensed under <a rel="license" href="http://www.apache.org/licenses/LICENSE-2.0">Apache Version 2.0</a>
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 3.4.3.<br/>
</p>
</div>
</footer>
</body>
</html>
|