You can just use the pylupdate5 script, its in
%OSGeo4Win%\apps\Python37\Scripts
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.
See:
https://docs.qgis.org/testing/en/docs/pyqgis_developer_cookbook/plugins.html?highlight=plugin#ts-file
jonas
On 19.06.2019 20:01, C Hamilton wrote:
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.
Thanks,
Calvin
On Wed, Jun 19, 2019 at 2:24 AM matteo <[email protected]
<mailto:[email protected]>> wrote:
Hi Roberta,
well the process is pretty easy and straightforward.
I use the Makefile to manage all the process [0].
Basically the steps are:
* adding a list to locales in the Makefile, like: LOCALES = en it nl
* always in the Makefile add all the paths to the files that contains
the string you want to translate (managed by the self.tr
<http://self.tr>() method):
SOURCES = \
__init__.py \
plugin.py plugin_dialog.py
UI_FILES = plugin_base.ui
* now you can use make transup to create the ts file in all the
languages
* translate using the software you prefer
* compile the ts in qm using make transcompile
That's it. Whenever you add/change something in the files/UI you
have to
run make transup again, translate, recompile
Cheers
Matteo
[0]
https://docs.qgis.org/testing/en/docs/pyqgis_developer_cookbook/plugins.html#translate-using-makefile
_______________________________________________
QGIS-Developer mailing list
[email protected] <mailto:[email protected]>
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
_______________________________________________
QGIS-Developer mailing list
[email protected]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer