Skip to content

Commit

Permalink
fix for #2875 unit list in mapserver export plugin untranslatable
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@15475 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
rduivenvoorde committed Mar 14, 2011
1 parent fa92409 commit 0f51594
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion python/plugins/mapserver_export/mapserverexportdialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ def __init__(self):
self.ui = Ui_QgsMapserverExportBase()
self.ui.setupUi(self)

for unit in ["meters", "dd", "feet", "miles", "inches", "kilometers"]:
units = ["meters", "dd", "feet", "miles", "inches", "kilometers"]
# make them able to be translated
tr_units = [ QtGui.QApplication.translate("QgsMapserverExportBase", "meters", None, QtGui.QApplication.UnicodeUTF8), QtGui.QApplication.translate("QgsMapserverExportBase", "dd", None, QtGui.QApplication.UnicodeUTF8), QtGui.QApplication.translate("QgsMapserverExportBase", "feet", None, QtGui.QApplication.UnicodeUTF8), QtGui.QApplication.translate("QgsMapserverExportBase", "miles", None, QtGui.QApplication.UnicodeUTF8), QtGui.QApplication.translate("QgsMapserverExportBase", "inches", None, QtGui.QApplication.UnicodeUTF8), QtGui.QApplication.translate("QgsMapserverExportBase", "kilometers", None, QtGui.QApplication.UnicodeUTF8) ]
for unit in units:
self.ui.cmbMapUnits.addItem( QtGui.QApplication.translate("QgsMapserverExportBase", unit, None, QtGui.QApplication.UnicodeUTF8), QtCore.QVariant(unit) )

# TODO: set default unit. Is now the first value entered in the unit-list above
Expand Down

0 comments on commit 0f51594

Please sign in to comment.