<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>You can just use the pylupdate5 script, its in
%OSGeo4Win%\apps\Python37\Scripts</p>
<p>It loads your .pro file and creates the .ts files which you can
open in QtLinguist. After translating you release within
QtLinguist to a .qm file.</p>
<p>See:
<a class="moz-txt-link-freetext" href="https://docs.qgis.org/testing/en/docs/pyqgis_developer_cookbook/plugins.html?highlight=plugin#ts-file">https://docs.qgis.org/testing/en/docs/pyqgis_developer_cookbook/plugins.html?highlight=plugin#ts-file</a></p>
<p><br>
</p>
<p>jonas<br>
</p>
<p><br>
</p>
<div class="moz-cite-prefix">On 19.06.2019 20:01, C Hamilton wrote:<br>
</div>
<blockquote type="cite"
cite="mid:%3CCABPxTTrRUEoJv4upe0t8usHMO6gcsfRfh_WvP1ez=8b_uOkVmQ@mail.gmail.com%3E">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div>I am also interested in how you do this on Windows because
I had a request to add translation ability to the Shape Tools
plugin, but these instructions don't seem to include anything
for Windows.</div>
<div><br>
</div>
<div>Thanks,</div>
<div><br>
</div>
<div>Calvin<br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Wed, Jun 19, 2019 at 2:24
AM matteo <<a href="mailto:matteo.ghetta@gmail.com"
moz-do-not-send="true">matteo.ghetta@gmail.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi
Roberta,<br>
<br>
well the process is pretty easy and straightforward.<br>
<br>
I use the Makefile to manage all the process [0].<br>
<br>
Basically the steps are:<br>
<br>
* adding a list to locales in the Makefile, like: LOCALES = en
it nl<br>
* always in the Makefile add all the paths to the files that
contains<br>
the string you want to translate (managed by the <a
href="http://self.tr" rel="noreferrer" target="_blank"
moz-do-not-send="true">self.tr</a>() method):<br>
<br>
SOURCES = \<br>
__init__.py \<br>
plugin.py plugin_dialog.py<br>
<br>
UI_FILES = plugin_base.ui<br>
<br>
* now you can use make transup to create the ts file in all
the languages<br>
* translate using the software you prefer<br>
* compile the ts in qm using make transcompile<br>
<br>
That's it. Whenever you add/change something in the files/UI
you have to<br>
run make transup again, translate, recompile<br>
<br>
Cheers<br>
<br>
Matteo<br>
<br>
<br>
<br>
[0]<br>
<a
href="https://docs.qgis.org/testing/en/docs/pyqgis_developer_cookbook/plugins.html#translate-using-makefile"
rel="noreferrer" target="_blank" moz-do-not-send="true">https://docs.qgis.org/testing/en/docs/pyqgis_developer_cookbook/plugins.html#translate-using-makefile</a><br>
_______________________________________________<br>
QGIS-Developer mailing list<br>
<a href="mailto:QGIS-Developer@lists.osgeo.org"
target="_blank" moz-do-not-send="true">QGIS-Developer@lists.osgeo.org</a><br>
List info: <a
href="https://lists.osgeo.org/mailman/listinfo/qgis-developer"
rel="noreferrer" target="_blank" moz-do-not-send="true">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
Unsubscribe: <a
href="https://lists.osgeo.org/mailman/listinfo/qgis-developer"
rel="noreferrer" target="_blank" moz-do-not-send="true">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a></blockquote>
</div>
</blockquote>
</body>
</html>