Skip to content

Commit

Permalink
Add explicit translation for buttons. (#181)
Browse files Browse the repository at this point in the history
  • Loading branch information
m3nu authored Feb 8, 2019
1 parent f043542 commit c49d3d9
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 12 deletions.
29 changes: 17 additions & 12 deletions src/vorta/i18n/ts/vorta.de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,30 @@
<context>
<name>AddProfileWindow</name>
<message>
<location filename="../../views/profile_add_edit_dialog.py" line="22"/>
<location filename="../../views/profile_add_edit_dialog.py" line="26"/>
<source>Rename Profile</source>
<translation>Profil umbenennen</translation>
</message>
<message>
<location filename="../../views/profile_add_edit_dialog.py" line="39"/>
<location filename="../../views/profile_add_edit_dialog.py" line="43"/>
<source>Please enter a profile name.</source>
<translation>Bitte einen Profilnamen eingeben.</translation>
</message>
<message>
<location filename="../../views/profile_add_edit_dialog.py" line="45"/>
<location filename="../../views/profile_add_edit_dialog.py" line="49"/>
<source>A profile with this name already exists.</source>
<translation>Ein Profil mit diesem Namen existiert bereits.</translation>
</message>
<message>
<location filename="../../views/profile_add_edit_dialog.py" line="19"/>
<source>Save</source>
<translation>Speichern</translation>
</message>
<message>
<location filename="../../views/profile_add_edit_dialog.py" line="20"/>
<source>Cancel</source>
<translation>Abbrechen</translation>
</message>
</context>
<context>
<name>AddRepoWindow</name>
Expand Down Expand Up @@ -196,27 +206,22 @@
<translation>Extrahierungs-Punkt auswählen</translation>
</message>
<message>
<location filename="../../views/archive_tab.py" line="409"/>
<location filename="../../views/archive_tab.py" line="407"/>
<source>Archive deleted.</source>
<translation>Archiv gelöscht.</translation>
</message>
<message>
<location filename="../../views/archive_tab.py" line="393"/>
<location filename="../../views/archive_tab.py" line="392"/>
<source>Confirm deletion</source>
<translation>Löschen bestätigen</translation>
</message>
<message>
<location filename="../../views/archive_tab.py" line="395"/>
<source>Deletion cancelled</source>
<translation>Löschen abgebrochen</translation>
</message>
<message>
<location filename="../../views/archive_tab.py" line="405"/>
<location filename="../../views/archive_tab.py" line="403"/>
<source>No archive selected</source>
<translation>Kein Archive ausgewählt</translation>
</message>
<message>
<location filename="../../views/archive_tab.py" line="393"/>
<location filename="../../views/archive_tab.py" line="392"/>
<source>Are you sure you want to delete the archive?</source>
<translation>Soll das gewählte Archiv gelöscht werden?</translation>
</message>
Expand Down
4 changes: 4 additions & 0 deletions src/vorta/views/profile_add_edit_dialog.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from PyQt5 import uic
from PyQt5.QtWidgets import QDialogButtonBox
from ..utils import get_asset
from ..models import BackupProfileModel

Expand All @@ -15,6 +16,9 @@ def __init__(self, parent=None, rename_existing_id=None):
self.buttonBox.rejected.connect(self.close)
self.buttonBox.accepted.connect(self.save)

self.buttonBox.button(QDialogButtonBox.Save).setText(self.tr("Save"))
self.buttonBox.button(QDialogButtonBox.Cancel).setText(self.tr("Cancel"))

if rename_existing_id is not None:
existing_profile = BackupProfileModel.get(id=rename_existing_id)
self.profileNameField.setText(existing_profile.name)
Expand Down

0 comments on commit c49d3d9

Please sign in to comment.