From 9b2bc6393de241c979a63c62abde102823c1eb85 Mon Sep 17 00:00:00 2001 From: Jakob Schnell Date: Tue, 29 Oct 2024 08:13:36 +0100 Subject: [PATCH] feat: extend german translation (#280) --- ORStools/gui/ORStoolsDialog.py | 37 +++++++++------- ORStools/i18n/orstools_de.ts | 78 ++++++++++++++++++++++++++++++++++ 2 files changed, 100 insertions(+), 15 deletions(-) diff --git a/ORStools/gui/ORStoolsDialog.py b/ORStools/gui/ORStoolsDialog.py index 06c38c8..a2d16aa 100644 --- a/ORStools/gui/ORStoolsDialog.py +++ b/ORStools/gui/ORStoolsDialog.py @@ -293,12 +293,14 @@ def run_gui_control(self) -> None: if not self.dlg.routing_fromline_list.count(): QMessageBox.critical( self.dlg, - "Missing Waypoints", - """ + self.tr("Missing Waypoints"), + self.tr( + """ Did you forget to set routing waypoints?

Use the 'Add Waypoint' button to add up to 50 waypoints. - """, + """ + ), ) return @@ -308,13 +310,15 @@ def run_gui_control(self) -> None: ): QMessageBox.critical( self.dlg, - "Missing API key", - """ + self.tr("Missing API key"), + self.tr( + """ Did you forget to set an API key for openrouteservice?

If you don't have an API key, please visit https://openrouteservice.org/sign-up to get one.

Then enter the API key for openrouteservice provider in Web ► ORS Tools ► Provider Settings or the - settings symbol in the main ORS Tools GUI, next to the provider dropdown.""", + settings symbol in the main ORS Tools GUI, next to the provider dropdown.""" + ), ) return @@ -351,11 +355,12 @@ def run_gui_control(self) -> None: if len(params["jobs"]) <= 1: # Start/end locations don't count as job QMessageBox.critical( self.dlg, - "Wrong number of waypoints", - """At least 3 or 4 waypoints are needed to perform routing optimization. + self.tr("Wrong number of waypoints"), + self.tr(""" + At least 3 or 4 waypoints are needed to perform routing optimization. Remember, the first and last location are not part of the optimization. - """, + """), ) return response = clnt.request("/optimization", {}, post_json=params) @@ -396,13 +401,15 @@ def run_gui_control(self) -> None: ): QMessageBox.warning( self.dlg, - "Empty layer", - """ + self.tr("Empty layer"), + self.tr( + """ The specified avoid polygon(s) layer does not contain any features. Please add polygons to the layer or uncheck avoid polygons. - """, + """ + ), ) - msg = "The request has been aborted!" + msg = self.tr("The request has been aborted!") logger.log(msg, 0) self.dlg.debug_text.setText(msg) return @@ -422,7 +429,7 @@ def run_gui_control(self) -> None: # if provider.get('ENV_VARS'): # self.dlg.quota_text.setText(self.get_quota(provider) + ' calls') except exceptions.Timeout: - msg = "The connection has timed out!" + msg = self.tr("The connection has timed out!") logger.log(msg, 2) self.dlg.debug_text.setText(msg) return @@ -552,7 +559,7 @@ def _save_vertices_to_layer(self) -> None: self._iface.mapCanvas().refresh() self._iface.messageBar().pushMessage( - "Success", "Vertices saved to layer.", level=Qgis.MessageLevel.Success + self.tr("Success"), self.tr("Vertices saved to layer."), level=Qgis.MessageLevel.Success ) def _on_prov_refresh_click(self) -> None: diff --git a/ORStools/i18n/orstools_de.ts b/ORStools/i18n/orstools_de.ts index 83af637..40f7a2e 100644 --- a/ORStools/i18n/orstools_de.ts +++ b/ORStools/i18n/orstools_de.ts @@ -353,6 +353,16 @@ Duplikate entfernen oder Wegpunktoptimierung abwählen. Close Schließen + + + Success + Erfolg + + + + Vertices saved to layer. + Punkte in Layer gespeichert. + ORStoolsDialogBase @@ -742,5 +752,73 @@ Duplikate entfernen oder Wegpunktoptimierung abwählen. The request has been aborted! Die Anfrage wurde abgebrochen! + + + Missing Waypoints + Fehlende Wegpunkte + + + + + Did you forget to set routing waypoints?<br><br> + + Use the 'Add Waypoint' button to add up to 50 waypoints. + + Haben Sie vergessen, Wegpunkte zu setzen?<br><br> Nutzen Sie den "Wegpunkt hinzufügen"-Knopf um bis zu 50 Wegpunkte hinzuzufügen. + + + + Missing API key + Fehlender API-Key + + + + + Did you forget to set an <b>API key</b> for openrouteservice?<br><br> + + If you don't have an API key, please visit https://openrouteservice.org/sign-up to get one. <br><br> + Then enter the API key for openrouteservice provider in Web ► ORS Tools ► Provider Settings or the + settings symbol in the main ORS Tools GUI, next to the provider dropdown. + Haben Sie einen <b>API-Key</b> für den openrouteservice gesetzt?<br><br> + +Wenn Sie keinen API-Key haben, besuchen Sie https://openrouteservice.org/sign-up für einen Key.<br><br> +Geben Sie den API-Key dann unter Web ► ORS Tools ► Provider Settings für den openrouteservice ein oder +nutzen Sie das Einstellungen-Symbol in der Oberfläche der ORS Tools, neben der Anbieter-Auswahl. + + + + Wrong number of waypoints + Falsche Anzahl an Wegpunkten + + + + + At least 3 or 4 waypoints are needed to perform routing optimization. + +Remember, the first and last location are not part of the optimization. + + Mindestens 3 bis 4 Wegpunkte werden für die Wegpunktoptimierung benötigt. + +Achtung, der erste und letzte Wegpunkt ist kein Teil der Optimierung. + + + + Empty layer + Leerer Layer + + + + +The specified avoid polygon(s) layer does not contain any features. +Please add polygons to the layer or uncheck avoid polygons. + + Der angegebene Polygon-Layer enthalten keine Features. +Bitte fügen Sie den Layern Polygone hinzu oder "Avoid Polygons" abwählen. + + + + The connection has timed out! + Zeitüberschreitung der Verbindung! +