Skip to content

Commit

Permalink
feat: extend german translation (#280)
Browse files Browse the repository at this point in the history
  • Loading branch information
koebi authored Oct 29, 2024
1 parent 7cf2825 commit 9b2bc63
Show file tree
Hide file tree
Showing 2 changed files with 100 additions and 15 deletions.
37 changes: 22 additions & 15 deletions ORStools/gui/ORStoolsDialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -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?<br><br>
Use the 'Add Waypoint' button to add up to 50 waypoints.
""",
"""
),
)
return

Expand All @@ -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 <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.""",
settings symbol in the main ORS Tools GUI, next to the provider dropdown."""
),
)
return

Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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:
Expand Down
78 changes: 78 additions & 0 deletions ORStools/i18n/orstools_de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,16 @@ Duplikate entfernen oder Wegpunktoptimierung abwählen.</translation>
<source>Close</source>
<translation>Schließen</translation>
</message>
<message>
<location filename="../gui/ORStoolsDialog.py" line="561"/>
<source>Success</source>
<translation>Erfolg</translation>
</message>
<message>
<location filename="../gui/ORStoolsDialog.py" line="561"/>
<source>Vertices saved to layer.</source>
<translation>Punkte in Layer gespeichert.</translation>
</message>
</context>
<context>
<name>ORStoolsDialogBase</name>
Expand Down Expand Up @@ -742,5 +752,73 @@ Duplikate entfernen oder Wegpunktoptimierung abwählen.</translation>
<source>The request has been aborted!</source>
<translation>Die Anfrage wurde abgebrochen!</translation>
</message>
<message>
<location filename="../gui/ORStoolsDialog.py" line="294"/>
<source>Missing Waypoints</source>
<translation>Fehlende Wegpunkte</translation>
</message>
<message>
<location filename="../gui/ORStoolsDialog.py" line="294"/>
<source>
Did you forget to set routing waypoints?&lt;br&gt;&lt;br&gt;

Use the &apos;Add Waypoint&apos; button to add up to 50 waypoints.
</source>
<translation>Haben Sie vergessen, Wegpunkte zu setzen?&lt;br&gt;&lt;br&gt; Nutzen Sie den &quot;Wegpunkt hinzufügen&quot;-Knopf um bis zu 50 Wegpunkte hinzuzufügen.</translation>
</message>
<message>
<location filename="../gui/ORStoolsDialog.py" line="311"/>
<source>Missing API key</source>
<translation>Fehlender API-Key</translation>
</message>
<message>
<location filename="../gui/ORStoolsDialog.py" line="311"/>
<source>
Did you forget to set an &lt;b&gt;API key&lt;/b&gt; for openrouteservice?&lt;br&gt;&lt;br&gt;

If you don&apos;t have an API key, please visit https://openrouteservice.org/sign-up to get one. &lt;br&gt;&lt;br&gt;
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.</source>
<translation>Haben Sie einen &lt;b&gt;API-Key&lt;/b&gt; für den openrouteservice gesetzt?&lt;br&gt;&lt;br&gt;

Wenn Sie keinen API-Key haben, besuchen Sie https://openrouteservice.org/sign-up für einen Key.&lt;br&gt;&lt;br&gt;
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.</translation>
</message>
<message>
<location filename="../gui/ORStoolsDialog.py" line="356"/>
<source>Wrong number of waypoints</source>
<translation>Falsche Anzahl an Wegpunkten</translation>
</message>
<message>
<location filename="../gui/ORStoolsDialog.py" line="356"/>
<source>
At least 3 or 4 waypoints are needed to perform routing optimization.

Remember, the first and last location are not part of the optimization.
</source>
<translation>Mindestens 3 bis 4 Wegpunkte werden für die Wegpunktoptimierung benötigt.

Achtung, der erste und letzte Wegpunkt ist kein Teil der Optimierung.</translation>
</message>
<message>
<location filename="../gui/ORStoolsDialog.py" line="402"/>
<source>Empty layer</source>
<translation>Leerer Layer</translation>
</message>
<message>
<location filename="../gui/ORStoolsDialog.py" line="402"/>
<source>
The specified avoid polygon(s) layer does not contain any features.
Please add polygons to the layer or uncheck avoid polygons.
</source>
<translation>Der angegebene Polygon-Layer enthalten keine Features.
Bitte fügen Sie den Layern Polygone hinzu oder &quot;Avoid Polygons&quot; abwählen.</translation>
</message>
<message>
<location filename="../gui/ORStoolsDialog.py" line="432"/>
<source>The connection has timed out!</source>
<translation>Zeitüberschreitung der Verbindung!</translation>
</message>
</context>
</TS>

0 comments on commit 9b2bc63

Please sign in to comment.