[Qgis-developer] plugin translation
Matthias Kuhn
matthias at opengis.ch
Tue Mar 22 03:11:10 PDT 2016
Hi Matteo,
I was never very happy with qmake/.pro and try to avoid it, but this may
be a subjective thing. I'm normally using the scripts/update-strings.sh
script with a Makefile.
Here is also something to read regarding pylupdate
http://pyqt.sourceforge.net/Docs/PyQt4/i18n.html#internationalisation-of-pyqt4-applications
Matthias
On 03/22/2016 10:54 AM, matteo wrote:
> Hi Matthias,
>
> the last week I have updated the pyqgis cookbook with the the
> translation chapter
>
> http://docs.qgis.org/testing/en/docs/pyqgis_developer_cookbook/plugins.html#translation
>
> that should describe all the steps you described..
>
> It seems the problem is that the strings "marked" with the tr() function
> are not read by lupdate..
>
>
> # mark the "Program &Locations" as translatable
> self.actionProgramLocations = QAction( self.tr("&Program &Locations"),
> self.iface.mainWindow())
>
>
> # run lupdate
> lupdate my_plugin.pro
>
> but in Qt Lingust "Program &Locations" is not there.. I also looked
> inside the file with a text editor but the string isn't there either..
>
> Am I missing something?
>
> Thanks Matthias for your time
>
> Matteo
>
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
--
Matthias Kuhn
OPENGIS.ch - https://www.opengis.ch
Spatial • (Q)GIS • PostGIS • Open Source
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20160322/9f830e05/attachment.sig>
More information about the Qgis-developer
mailing list