5 changes: 1 addition & 4 deletions python/plugins/osm/OsmSaveDlg.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def showSaveFileDialog(self):
lastDir = settings.value("/OSM_Plugin/lastDir", QVariant(QString())).toString()

# display file open dialog and get absolute path to selected file
fileSelected = QFileDialog.getSaveFileName(self,"Choose an Open Street Map file",lastDir,"OSM Files (*.osm)");
fileSelected = QFileDialog.getSaveFileName(self, self.tr("Choose an Open Street Map file"),lastDir,self.tr("OSM Files (*.osm)") );
# insert OSM file path into line edit control
if not fileSelected.isNull():
self.OSMFileEdit.setText(fileSelected)
Expand Down Expand Up @@ -457,6 +457,3 @@ def onOK(self):
if self.outFile and self.outFile.exists():
self.outFile.close()
self.close()



2 changes: 0 additions & 2 deletions python/plugins/osm/OsmUndoRedoDW.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,5 +437,3 @@ def redo(self,standAlone=True):
if self.redoCounter>0:
self.redoButton.setEnabled(True)
self.plugin.dockWidget.redoButton.setEnabled(True)


34 changes: 17 additions & 17 deletions python/plugins/osm/OsmUploadDlg.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def __init__(self,plugin):
self.ur=plugin.undoredo

self.urlHost = "api.openstreetmap.org"
self.uploadButton = self.buttonBox.addButton("Upload", QDialogButtonBox.ActionRole)
self.uploadButton = self.buttonBox.addButton(self.tr("Upload"), QDialogButtonBox.ActionRole)

self.uploadChangesTable.setColumnCount(5)
self.uploadChangesTable.setColumnWidth(0,80)
Expand Down Expand Up @@ -1079,7 +1079,7 @@ def __httpNodeAdditionReqFinished(self, requestId, error):
del self.pseudoId_map[requestId]

if error:
self.cancelUpload("Node addition failed.")
self.cancelUpload( self.tr("Node addition failed.") )
return

newNodeIdStr=QString(self.http.readAll().data())
Expand Down Expand Up @@ -1119,7 +1119,7 @@ def __httpNodeUpdateReqFinished(self, requestId, error):
del self.featureId_map[requestId]

if error:
self.cancelUpload("Node update failed.")
self.cancelUpload(self.tr("Node update failed."))
return

newVersionIdStr=QString(self.http.readAll().data())
Expand Down Expand Up @@ -1158,7 +1158,7 @@ def __httpNodeDeletionReqFinished(self, requestId, error):
del self.featureId_map[requestId]

if error:
self.cancelUpload("Node deletion failed.")
self.cancelUpload(self.tr("Node deletion failed."))
return

self.dbm.removePointRecord(pointId)
Expand Down Expand Up @@ -1194,7 +1194,7 @@ def __httpWayAdditionReqFinished(self, requestId, error):
del self.pseudoId_map[requestId]

if error:
self.cancelUpload("Way addition failed.")
self.cancelUpload(self.tr("Way addition failed."))
return

newWayIdStr = QString(self.http.readAll().data())
Expand Down Expand Up @@ -1234,7 +1234,7 @@ def __httpWayUpdateReqFinished(self, requestId, error):
del self.featureId_map[requestId]

if error:
self.cancelUpload("Way update failed.")
self.cancelUpload(self.tr("Way update failed."))
return

newVersionIdStr=QString(self.http.readAll().data())
Expand Down Expand Up @@ -1273,7 +1273,7 @@ def __httpWayDeletionReqFinished(self, requestId, error):
del self.featureId_map[requestId]

if error:
self.cancelUpload("Way deletion failed.")
self.cancelUpload(self.tr("Way deletion failed."))
return

self.dbm.removeWayRecord(wayId)
Expand Down Expand Up @@ -1309,7 +1309,7 @@ def __httpRelationAdditionReqFinished(self, requestId, error):
del self.pseudoId_map[requestId]

if error:
self.cancelUpload("Relation addition failed.")
self.cancelUpload(self.tr("Relation addition failed."))
return

newRelIdStr=QString(self.http.readAll().data())
Expand Down Expand Up @@ -1348,7 +1348,7 @@ def __httpRelationUpdateReqFinished(self, requestId, error):
del self.featureId_map[requestId]

if error:
self.cancelUpload("Relation update failed.")
self.cancelUpload(self.tr("Relation update failed."))
return

newVersionIdStr=QString(self.http.readAll().data())
Expand Down Expand Up @@ -1386,7 +1386,7 @@ def __httpRelationDeletionReqFinished(self, requestId, error):
del self.featureId_map[requestId]

if error:
self.cancelUpload("Relation deletion failed.")
self.cancelUpload(self.tr("Relation deletion failed."))
return

self.dbm.removeRelationRecord(relId)
Expand Down Expand Up @@ -1417,7 +1417,7 @@ def __httpChangesetCreationReqFinished(self, requestId, error):
self.disconnect(self.http, SIGNAL("requestFinished(int, bool)"), self.__httpChangesetCreationReqFinished)

if error:
self.cancelUpload("Connection to OpenStreetMap server cannot be established. Please check your proxy settings, firewall settings and try again.")
self.cancelUpload(self.tr("Connection to OpenStreetMap server cannot be established. Please check your proxy settings, firewall settings and try again."))
return

del self.qhttp_map[requestId]
Expand Down Expand Up @@ -1448,7 +1448,7 @@ def __httpChangesetClosingReqFinished(self, requestId, error):
self.disconnect(self.http, SIGNAL("requestFinished(int, bool)"), self.__httpChangesetClosingReqFinished)

if error:
self.cancelUpload("Changeset closing failed.")
self.cancelUpload(self.tr("Changeset closing failed."))
return

# call the next upload step
Expand All @@ -1468,7 +1468,7 @@ def __readResponseHeader(self, responseHeader):

if responseHeader.statusCode() != 200:

self.cancelUpload(QString("Upload process failed. OpenStreetMap server response: %1 - %2.")
self.cancelUpload(self.tr("Upload process failed. OpenStreetMap server response: %1 - %2.")
.arg(responseHeader.reasonPhrase())
.arg(responseHeader.value("Error")))

Expand All @@ -1480,7 +1480,7 @@ def __authRequired(self,s,a,b):
We are really not interested in function parameters - we just cancel the connection.
"""

self.cancelUpload("Authentication failed. Please try again with correct login and password.")
self.cancelUpload(self.tr("Authentication failed. Please try again with correct login and password."))


def __setProxy(self):
Expand Down Expand Up @@ -1536,13 +1536,13 @@ def __examineResponse(self,requestId,error):
return

if requestId==self.reqSetHost:
self.cancelUpload("Setting host failed.")
self.cancelUpload(self.tr("Setting host failed."))

elif requestId==self.reqSetUser:
self.cancelUpload("Setting user and password failed.")
self.cancelUpload(self.tr("Setting user and password failed."))

elif requestId==self.reqSetProxy:
self.cancelUpload("Setting proxy failed.")
self.cancelUpload(self.tr("Setting proxy failed."))