mirror of
https://github.com/seiichiro0185/sailotp.git
synced 2024-11-24 16:19:43 +00:00
Added Localization support
Added German Translation
This commit is contained in:
parent
2553a699d3
commit
5029f99db3
10 changed files with 582 additions and 56 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -2,3 +2,4 @@
|
|||
*.pro.user
|
||||
*.pro.user.*
|
||||
rpm/harbour-sailotp.spec
|
||||
i18n/*.qm
|
||||
|
|
|
@ -35,3 +35,18 @@ OTHER_FILES += qml/harbour-sailotp.qml \
|
|||
HEADERS += \
|
||||
src/fileio.h
|
||||
|
||||
i18n.files = i18n/*.qm
|
||||
i18n.path = /usr/share/$${TARGET}/i18n
|
||||
|
||||
INSTALLS += i18n
|
||||
|
||||
lupdate_only {
|
||||
SOURCES = qml/*.qml \
|
||||
qml/pages/*.qml \
|
||||
qml/covers/*.qml \
|
||||
qml/components/*.qml
|
||||
|
||||
TRANSLATIONS = i18n/de.ts \
|
||||
i18n/en.ts
|
||||
}
|
||||
|
||||
|
|
251
i18n/de.ts
Normal file
251
i18n/de.ts
Normal file
|
@ -0,0 +1,251 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="de_DE">
|
||||
<context>
|
||||
<name>About</name>
|
||||
<message>
|
||||
<location filename="../qml/pages/About.qml" line="54"/>
|
||||
<source>A Simple Sailfish OTP Generator<br />(RFC 6238/4226 compatible)</source>
|
||||
<translation>Ein einfacher Sailfish OTP-Generator<br/>(RFC 6238/4226-kompatibel)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/About.qml" line="62"/>
|
||||
<source>Copyright: Stefan Brand<br />License: BSD (3-clause)</source>
|
||||
<translation>Copyright: Stefan Brand<br/>Lizenz: BSD (3-Klausel)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/About.qml" line="84"/>
|
||||
<source>SailOTP uses the following third party libs:</source>
|
||||
<translation>SailOTP verwendet folgende externe Bibliotheken:</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>AddOTP</name>
|
||||
<message>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="57"/>
|
||||
<source>Save</source>
|
||||
<translation>Speichern</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="57"/>
|
||||
<source>Add</source>
|
||||
<translation>Hinzufügen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="62"/>
|
||||
<source>Type</source>
|
||||
<translation>Typ</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="64"/>
|
||||
<source>Time-based (TOTP)</source>
|
||||
<translation>Zeitbasiert (TOTP)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="65"/>
|
||||
<source>Counter-based (HOTP)</source>
|
||||
<translation>Zählerbasiert (HOTP)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="71"/>
|
||||
<source>Title</source>
|
||||
<translation>Titel</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="72"/>
|
||||
<source>Title for the OTP</source>
|
||||
<translation>Titel für das Token</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="80"/>
|
||||
<source>Secret (at least 16 characters)</source>
|
||||
<translation>Schlüssel (mindestens 16 Zeichen)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="82"/>
|
||||
<source>Secret OTP Key</source>
|
||||
<translation>Geheimer Schlüssel</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="90"/>
|
||||
<source>Next Counter Value</source>
|
||||
<translation>Nächster Zählerwert</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="92"/>
|
||||
<source>Next Value of the Counter</source>
|
||||
<translation>Nächster Wert für den Zähler</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ExportPage</name>
|
||||
<message>
|
||||
<location filename="../qml/pages/ExportPage.qml" line="61"/>
|
||||
<source>File already exists, choose "Overwrite existing" to overwrite it.</source>
|
||||
<translation>Datei existiert, aktiviere "Existierende überschreiben" um sie zu ersetzen.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/ExportPage.qml" line="70"/>
|
||||
<source>Given file does not exist!</source>
|
||||
<translation>Gewählte Datei existiert nicht!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/ExportPage.qml" line="92"/>
|
||||
<source>Export</source>
|
||||
<translation>Export</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/ExportPage.qml" line="92"/>
|
||||
<source>Import</source>
|
||||
<translation>Import</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/ExportPage.qml" line="99"/>
|
||||
<source>Filename</source>
|
||||
<translation>Dateiname</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/ExportPage.qml" line="100"/>
|
||||
<source>File to import</source>
|
||||
<translation>Aus Datei importieren</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/ExportPage.qml" line="100"/>
|
||||
<source>File to export</source>
|
||||
<translation>In Datei exportieren</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/ExportPage.qml" line="109"/>
|
||||
<source>Overwrite existing</source>
|
||||
<translation>Existierende überschreiben</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/ExportPage.qml" line="115"/>
|
||||
<source>Password</source>
|
||||
<translation>Passwort</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/ExportPage.qml" line="116"/>
|
||||
<source>Password for the file</source>
|
||||
<translation>Passwort für die Datei</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/ExportPage.qml" line="125"/>
|
||||
<source>Passwords don't match!</source>
|
||||
<translation>Passwörter nicht identisch!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/ExportPage.qml" line="125"/>
|
||||
<source>Passwords match!</source>
|
||||
<translation>Passwörter identisch!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/ExportPage.qml" line="126"/>
|
||||
<source>Repeated Password for the file</source>
|
||||
<translation>Passwort wiederholen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/ExportPage.qml" line="146"/>
|
||||
<source>Here you can Import Tokens from a file. Put in the file location and the password you used on export. Pull left to start the import.</source>
|
||||
<translation>Hier können Tokens aus einer Datei importiert werden. Gib die Datei und das beim Export gewählte Passwort ein. Nach links ziehen um zu starten.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/ExportPage.qml" line="162"/>
|
||||
<source>Here you can export Tokens to a file. The exported file will be encrypted with AES-256-CBC and Base64 encoded. Choose a strong password, the file will contain the secrets used to generate the Tokens for your accounts. Pull left to start the export.</source>
|
||||
<translation>Hier können Tokens in eine Datei exportiert werden. Die Datei wird mit AES-256-CBC verschlüsselt und Base64-kodiert. Wähle ein starkes Passwort, die Datei enthält die geheimen Schlüssel zur Erzeugung der Tokens für deine Accounts. Nach links ziehen um zu starten.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/ExportPage.qml" line="184"/>
|
||||
<source>Error writing to file </source>
|
||||
<translation>Fehler beim Schreiben der Datei</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/ExportPage.qml" line="186"/>
|
||||
<source>Token Database exported to </source>
|
||||
<translation>Datenbank exportiert nach </translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/ExportPage.qml" line="189"/>
|
||||
<source>Could not encrypt tokens. Error: </source>
|
||||
<translation>Fehler beim Verschlüsseln. Fehler: </translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/ExportPage.qml" line="192"/>
|
||||
<source>Could not read tokens from Database</source>
|
||||
<translation>Datenbank konnte nicht gelesen werden</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/ExportPage.qml" line="203"/>
|
||||
<source>Tokens imported from </source>
|
||||
<translation>Tokens importiert aus </translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/ExportPage.qml" line="208"/>
|
||||
<source>Unable to decrypt file, did you use the right password?</source>
|
||||
<translation>Fehler beim entschlüsseln, falsches Passwort?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/ExportPage.qml" line="211"/>
|
||||
<source>Could not read from file </source>
|
||||
<translation>Datei konnte nicht gelesen werden</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MainView</name>
|
||||
<message>
|
||||
<location filename="../qml/pages/MainView.qml" line="111"/>
|
||||
<source>About</source>
|
||||
<translation>Über</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/MainView.qml" line="115"/>
|
||||
<source>Export Token-DB</source>
|
||||
<translation>Datenbank exportieren</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/MainView.qml" line="119"/>
|
||||
<source>Import Token-DB</source>
|
||||
<translation>Datenbank importieren</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/MainView.qml" line="123"/>
|
||||
<source>Add Token</source>
|
||||
<translation>Token hinzufügen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/MainView.qml" line="149"/>
|
||||
<source>Nothing here</source>
|
||||
<translation>Hier ist nichts</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/MainView.qml" line="150"/>
|
||||
<source>Pull down to add a OTP</source>
|
||||
<translation>Nach unten ziehen zum hinzufügen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/MainView.qml" line="161"/>
|
||||
<source>Deleting</source>
|
||||
<translation>Lösche</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/MainView.qml" line="166"/>
|
||||
<source>Token for </source>
|
||||
<translation>Token für </translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/MainView.qml" line="166"/>
|
||||
<source> copied to clipboard</source>
|
||||
<translation> kopiert</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/MainView.qml" line="234"/>
|
||||
<source>Edit</source>
|
||||
<translation>Bearbeiten</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/MainView.qml" line="240"/>
|
||||
<source>Delete</source>
|
||||
<translation>Löschen</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
251
i18n/en.ts
Normal file
251
i18n/en.ts
Normal file
|
@ -0,0 +1,251 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="en_GB">
|
||||
<context>
|
||||
<name>About</name>
|
||||
<message>
|
||||
<location filename="../qml/pages/About.qml" line="54"/>
|
||||
<source>A Simple Sailfish OTP Generator<br />(RFC 6238/4226 compatible)</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/About.qml" line="62"/>
|
||||
<source>Copyright: Stefan Brand<br />License: BSD (3-clause)</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/About.qml" line="84"/>
|
||||
<source>SailOTP uses the following third party libs:</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>AddOTP</name>
|
||||
<message>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="57"/>
|
||||
<source>Save</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="57"/>
|
||||
<source>Add</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="62"/>
|
||||
<source>Type</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="64"/>
|
||||
<source>Time-based (TOTP)</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="65"/>
|
||||
<source>Counter-based (HOTP)</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="71"/>
|
||||
<source>Title</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="72"/>
|
||||
<source>Title for the OTP</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="80"/>
|
||||
<source>Secret (at least 16 characters)</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="82"/>
|
||||
<source>Secret OTP Key</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="90"/>
|
||||
<source>Next Counter Value</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="92"/>
|
||||
<source>Next Value of the Counter</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ExportPage</name>
|
||||
<message>
|
||||
<location filename="../qml/pages/ExportPage.qml" line="61"/>
|
||||
<source>File already exists, choose "Overwrite existing" to overwrite it.</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/ExportPage.qml" line="70"/>
|
||||
<source>Given file does not exist!</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/ExportPage.qml" line="92"/>
|
||||
<source>Export</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/ExportPage.qml" line="92"/>
|
||||
<source>Import</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/ExportPage.qml" line="99"/>
|
||||
<source>Filename</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/ExportPage.qml" line="100"/>
|
||||
<source>File to import</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/ExportPage.qml" line="100"/>
|
||||
<source>File to export</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/ExportPage.qml" line="109"/>
|
||||
<source>Overwrite existing</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/ExportPage.qml" line="115"/>
|
||||
<source>Password</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/ExportPage.qml" line="116"/>
|
||||
<source>Password for the file</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/ExportPage.qml" line="125"/>
|
||||
<source>Passwords don't match!</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/ExportPage.qml" line="125"/>
|
||||
<source>Passwords match!</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/ExportPage.qml" line="126"/>
|
||||
<source>Repeated Password for the file</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/ExportPage.qml" line="146"/>
|
||||
<source>Here you can Import Tokens from a file. Put in the file location and the password you used on export. Pull left to start the import.</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/ExportPage.qml" line="162"/>
|
||||
<source>Here you can export Tokens to a file. The exported file will be encrypted with AES-256-CBC and Base64 encoded. Choose a strong password, the file will contain the secrets used to generate the Tokens for your accounts. Pull left to start the export.</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/ExportPage.qml" line="184"/>
|
||||
<source>Error writing to file </source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/ExportPage.qml" line="186"/>
|
||||
<source>Token Database exported to </source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/ExportPage.qml" line="189"/>
|
||||
<source>Could not encrypt tokens. Error: </source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/ExportPage.qml" line="192"/>
|
||||
<source>Could not read tokens from Database</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/ExportPage.qml" line="203"/>
|
||||
<source>Tokens imported from </source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/ExportPage.qml" line="208"/>
|
||||
<source>Unable to decrypt file, did you use the right password?</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/ExportPage.qml" line="211"/>
|
||||
<source>Could not read from file </source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MainView</name>
|
||||
<message>
|
||||
<location filename="../qml/pages/MainView.qml" line="111"/>
|
||||
<source>About</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/MainView.qml" line="115"/>
|
||||
<source>Export Token-DB</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/MainView.qml" line="119"/>
|
||||
<source>Import Token-DB</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/MainView.qml" line="123"/>
|
||||
<source>Add Token</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/MainView.qml" line="149"/>
|
||||
<source>Nothing here</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/MainView.qml" line="150"/>
|
||||
<source>Pull down to add a OTP</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/MainView.qml" line="161"/>
|
||||
<source>Deleting</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/MainView.qml" line="166"/>
|
||||
<source>Token for </source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/MainView.qml" line="166"/>
|
||||
<source> copied to clipboard</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/MainView.qml" line="234"/>
|
||||
<source>Edit</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/MainView.qml" line="240"/>
|
||||
<source>Delete</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
|
@ -51,7 +51,7 @@ Page {
|
|||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.top: name.bottom
|
||||
anchors.topMargin: 20
|
||||
text: "A Simple Sailfish OTP Generator<br />(RFC 6238/4226 compatible)"
|
||||
text: qsTr("A Simple Sailfish OTP Generator<br />(RFC 6238/4226 compatible)")
|
||||
color: "white"
|
||||
}
|
||||
Text {
|
||||
|
@ -59,7 +59,7 @@ Page {
|
|||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.top: desc.bottom
|
||||
anchors.topMargin: 20
|
||||
text: "Copyright: Stefan Brand<br />License: BSD (3-clause)"
|
||||
text: qsTr("Copyright: Stefan Brand<br />License: BSD (3-clause)")
|
||||
color: "white"
|
||||
}
|
||||
Button {
|
||||
|
@ -81,7 +81,7 @@ Page {
|
|||
font.pixelSize: Theme.fontSizeSmall
|
||||
horizontalAlignment: TextEdit.Center
|
||||
readOnly: true
|
||||
text: "SailOTP uses the following third party libs:\n\nhttp://caligatio.github.io/jsSHA/\nhttps://github.com/mdp/gibberish-aes"
|
||||
text: qsTr("SailOTP uses the following third party libs:")+"\n\nhttp://caligatio.github.io/jsSHA/\nhttps://github.com/mdp/gibberish-aes"
|
||||
color: "white"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -54,22 +54,22 @@ Dialog {
|
|||
Column {
|
||||
anchors.fill: parent
|
||||
DialogHeader {
|
||||
acceptText: paramLabel != "" ? "Save" : "Add"
|
||||
acceptText: paramLabel != "" ? qsTr("Save") : qsTr("Add")
|
||||
}
|
||||
|
||||
ComboBox {
|
||||
id: typeSel
|
||||
label: "Type"
|
||||
label: qsTr("Type")
|
||||
menu: ContextMenu {
|
||||
MenuItem { text: "Time-based (TOTP)"; onClicked: { paramType = "TOTP" } }
|
||||
MenuItem { text: "Counter-based (HOTP)"; onClicked: { paramType = "HOTP" } }
|
||||
MenuItem { text: qsTr("Time-based (TOTP)"); onClicked: { paramType = "TOTP" } }
|
||||
MenuItem { text: qsTr("Counter-based (HOTP)"); onClicked: { paramType = "HOTP" } }
|
||||
}
|
||||
}
|
||||
TextField {
|
||||
id: otpLabel
|
||||
width: parent.width
|
||||
label: "Title"
|
||||
placeholderText: "Title for the OTP"
|
||||
label: qsTr("Title")
|
||||
placeholderText: qsTr("Title for the OTP")
|
||||
text: paramLabel != "" ? paramLabel : ""
|
||||
focus: true
|
||||
horizontalAlignment: TextInput.AlignLeft
|
||||
|
@ -77,9 +77,9 @@ Dialog {
|
|||
TextField {
|
||||
id: otpSecret
|
||||
width: parent.width
|
||||
label: "Secret (at least 16 characters)"
|
||||
label: qsTr("Secret (at least 16 characters)")
|
||||
text: paramKey != "" ? paramKey : ""
|
||||
placeholderText: "Secret OTP Key"
|
||||
placeholderText: qsTr("Secret OTP Key")
|
||||
focus: true
|
||||
horizontalAlignment: TextInput.AlignLeft
|
||||
}
|
||||
|
@ -87,9 +87,9 @@ Dialog {
|
|||
id: otpCounter
|
||||
width: parent.width
|
||||
visible: paramType == "HOTP" ? true : false
|
||||
label: "Next Counter Value"
|
||||
label: qsTr("Next Counter Value")
|
||||
text: paramCounter
|
||||
placeholderText: "Next Value of the Counter"
|
||||
placeholderText: qsTr("Next Value of the Counter")
|
||||
focus: true
|
||||
horizontalAlignment: TextInput.AlignLeft
|
||||
validator: IntValidator { bottom: 0 }
|
||||
|
|
|
@ -58,7 +58,7 @@ Dialog {
|
|||
function checkFileName(file) {
|
||||
if (mode == "export") {
|
||||
if (exportFile.exists(file) && !fileOverwrite.checked) {
|
||||
notify.show("File already exists, choose \"Overwrite existing\" to overwrite it.", 4000);
|
||||
notify.show(qsTr("File already exists, choose \"Overwrite existing\" to overwrite it."), 4000);
|
||||
return(false)
|
||||
} else {
|
||||
return(true)
|
||||
|
@ -67,7 +67,7 @@ Dialog {
|
|||
if (exportFile.exists(file)) {
|
||||
return(true)
|
||||
} else {
|
||||
notify.show("Given file does not exist!", 4000);
|
||||
notify.show(qsTr("Given file does not exist!"), 4000);
|
||||
return(false)
|
||||
}
|
||||
}
|
||||
|
@ -89,15 +89,15 @@ Dialog {
|
|||
Column {
|
||||
anchors.fill: parent
|
||||
DialogHeader {
|
||||
acceptText: mode == "export" ? "Export" : "Import"
|
||||
acceptText: mode == "export" ? qsTr("Export") : qsTr("Import")
|
||||
}
|
||||
|
||||
TextField {
|
||||
id: fileName
|
||||
width: parent.width
|
||||
text: mode == "export" ? creFileName() : XDG_HOME_DIR + "/";
|
||||
label: "Filename"
|
||||
placeholderText: mode == "import" ? "File to import" : "File to export"
|
||||
label: qsTr("Filename")
|
||||
placeholderText: mode == "import" ? qsTr("File to import") : qsTr("File to export")
|
||||
focus: true
|
||||
horizontalAlignment: TextInput.AlignLeft
|
||||
}
|
||||
|
@ -106,14 +106,14 @@ Dialog {
|
|||
id: fileOverwrite
|
||||
checked: false
|
||||
visible: mode == "export"
|
||||
text: "Overwrite existing"
|
||||
text: qsTr("Overwrite existing")
|
||||
}
|
||||
|
||||
TextField {
|
||||
id: filePassword
|
||||
width: parent.width
|
||||
label: "Password"
|
||||
placeholderText: "Password for the file"
|
||||
label: qsTr("Password")
|
||||
placeholderText: qsTr("Password for the file")
|
||||
echoMode: TextInput.Password
|
||||
focus: true
|
||||
horizontalAlignment: TextInput.AlignLeft
|
||||
|
@ -122,8 +122,8 @@ Dialog {
|
|||
TextField {
|
||||
id: filePasswordCheck
|
||||
width: parent.width
|
||||
label: (filePassword.text != filePasswordCheck.text && filePassword.text.length > 0) ? "Passwords don't match!" : "Passwords match!"
|
||||
placeholderText: "Repeated Password for the file"
|
||||
label: (filePassword.text != filePasswordCheck.text && filePassword.text.length > 0) ? qsTr("Passwords don't match!") : qsTr("Passwords match!")
|
||||
placeholderText: qsTr("Repeated Password for the file")
|
||||
visible: mode == "export"
|
||||
echoMode: TextInput.Password
|
||||
focus: true
|
||||
|
@ -143,7 +143,7 @@ Dialog {
|
|||
color: Theme.secondaryColor
|
||||
|
||||
visible: mode == "import"
|
||||
text: "Here you can Import Tokens from a file. Put in the file location and the password you used on export. Pull left to start the import."
|
||||
text: qsTr("Here you can Import Tokens from a file. Put in the file location and the password you used on export. Pull left to start the import.")
|
||||
}
|
||||
|
||||
Text {
|
||||
|
@ -159,7 +159,7 @@ Dialog {
|
|||
color: Theme.secondaryColor
|
||||
|
||||
visible: mode == "export"
|
||||
text: "Here you can export Tokens to a file. The exported file will be encrypted with AES-256-CBC and Base64 encoded. Choose a strong password, the file will contain the secrets used to generate the Tokens for your accounts. Pull left to start the export."
|
||||
text: qsTr("Here you can export Tokens to a file. The exported file will be encrypted with AES-256-CBC and Base64 encoded. Choose a strong password, the file will contain the secrets used to generate the Tokens for your accounts. Pull left to start the export.")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -181,15 +181,15 @@ Dialog {
|
|||
try {
|
||||
chipherText = Gibberish.AES.enc(plainText, filePassword.text);
|
||||
if (!exportFile.write(chipherText)) {
|
||||
notify.show("Error writing to file "+ fileName.text, 4000);
|
||||
notify.show(qsTr("Error writing to file ")+ fileName.text, 4000);
|
||||
} else {
|
||||
notify.show("Token Database exported to "+ fileName.text, 4000);
|
||||
notify.show(qsTr("Token Database exported to ")+ fileName.text, 4000);
|
||||
}
|
||||
} catch(e) {
|
||||
notify.show("Could not encrypt tokens. Error: ", 4000);
|
||||
notify.show(qsTr("Could not encrypt tokens. Error: "), 4000);
|
||||
}
|
||||
} else {
|
||||
notify.show("Could not read tokens from Database", 4000);
|
||||
notify.show(qsTr("Could not read tokens from Database"), 4000);
|
||||
}
|
||||
} else if(mode == "import") {
|
||||
// Import Tokens from File
|
||||
|
@ -200,15 +200,15 @@ Dialog {
|
|||
var errormsg = ""
|
||||
plainText = Gibberish.AES.dec(chipherText, filePassword.text);
|
||||
if (DB.json2db(plainText, errormsg)) {
|
||||
notify.show("Tokens imported from "+ fileName.text, 4000);
|
||||
notify.show(qsTr("Tokens imported from ")+ fileName.text, 4000);
|
||||
} else {
|
||||
notify.show(errormsg, 4000);
|
||||
}
|
||||
} catch (e) {
|
||||
notify.show("Unable to decrypt file, did you use the right password?", 4000);
|
||||
notify.show(qsTr("Unable to decrypt file, did you use the right password?"), 4000);
|
||||
}
|
||||
} else {
|
||||
notify.show("Could not read from file " + fileName.text, 4000);
|
||||
notify.show(qsTr("Could not read from file ") + fileName.text, 4000);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -108,19 +108,19 @@ Page {
|
|||
|
||||
PullDownMenu {
|
||||
MenuItem {
|
||||
text: "About"
|
||||
text: qsTr("About")
|
||||
onClicked: pageStack.push(Qt.resolvedUrl("About.qml"))
|
||||
}
|
||||
MenuItem {
|
||||
text: "Export Token-DB"
|
||||
text: qsTr("Export Token-DB")
|
||||
onClicked: pageStack.push(Qt.resolvedUrl("ExportPage.qml"), {parentPage: mainPage, mode: "export"})
|
||||
}
|
||||
MenuItem {
|
||||
text: "Import Token-DB"
|
||||
text: qsTr("Import Token-DB")
|
||||
onClicked: pageStack.push(Qt.resolvedUrl("ExportPage.qml"), {parentPage: mainPage, mode: "import"})
|
||||
}
|
||||
MenuItem {
|
||||
text: "Add Token"
|
||||
text: qsTr("Add Token")
|
||||
onClicked: pageStack.push(Qt.resolvedUrl("AddOTP.qml"), {parentPage: mainPage})
|
||||
}
|
||||
}
|
||||
|
@ -146,8 +146,8 @@ Page {
|
|||
|
||||
ViewPlaceholder {
|
||||
enabled: otpList.count == 0
|
||||
text: "Nothing here"
|
||||
hintText: "Pull down to add a OTP"
|
||||
text: qsTr("Nothing here")
|
||||
hintText: qsTr("Pull down to add a OTP")
|
||||
}
|
||||
|
||||
delegate: ListItem {
|
||||
|
@ -158,12 +158,12 @@ Page {
|
|||
|
||||
function remove() {
|
||||
// Show 5s countdown, then delete from DB and List
|
||||
remorseAction("Deleting", function() { DB.removeOTP(title, secret); otpListModel.remove(index) })
|
||||
remorseAction(qsTr("Deleting"), function() { DB.removeOTP(title, secret); otpListModel.remove(index) })
|
||||
}
|
||||
|
||||
onClicked: {
|
||||
Clipboard.text = otp
|
||||
notify.show("Token for " + title + " copied to clipboard", 3000);
|
||||
notify.show(qsTr("Token for ") + title + qsTr(" copied to clipboard"), 3000);
|
||||
}
|
||||
|
||||
ListView.onRemove: animateRemoval()
|
||||
|
@ -231,13 +231,13 @@ Page {
|
|||
id: otpContextMenu
|
||||
ContextMenu {
|
||||
MenuItem {
|
||||
text: "Edit"
|
||||
text: qsTr("Edit")
|
||||
onClicked: {
|
||||
pageStack.push(Qt.resolvedUrl("AddOTP.qml"), {parentPage: mainPage, paramLabel: title, paramKey: secret, paramType: type, paramCounter: DB.getCounter(title, secret, false)})
|
||||
}
|
||||
}
|
||||
MenuItem {
|
||||
text: "Delete"
|
||||
text: qsTr("Delete")
|
||||
onClicked: remove()
|
||||
}
|
||||
}
|
||||
|
@ -248,10 +248,7 @@ Page {
|
|||
Component.onCompleted: {
|
||||
// Load list of OTP-Entries
|
||||
refreshOTPList();
|
||||
console.log("SailOTP Version " + Qt.application.version + " started");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -15,19 +15,20 @@ QMakeOptions:
|
|||
- VERSION=%{version}
|
||||
- RELEASE=%{release}
|
||||
PkgConfigBR:
|
||||
- sailfishapp >= 0.0.10
|
||||
- Qt5Core
|
||||
- Qt5Qml
|
||||
- Qt5Quick
|
||||
- Qt5Qml
|
||||
- Qt5Core
|
||||
- sailfishapp >= 0.0.10
|
||||
Requires:
|
||||
- sailfishsilica-qt5 >= 0.10.9
|
||||
Files:
|
||||
- /usr/share/icons/hicolor/86x86/apps
|
||||
- /usr/share/applications
|
||||
- /usr/share/harbour-sailotp
|
||||
- /usr/bin
|
||||
- '%{_datadir}/icons/hicolor/86x86/apps/%{name}.png'
|
||||
- '%{_datadir}/applications/%{name}.desktop'
|
||||
- '%{_datadir}/%{name}/qml'
|
||||
- '%{_bindir}'
|
||||
- '%{_datadir}/%{name}/qml'
|
||||
- '%{_datadir}/applications/%{name}.desktop'
|
||||
- '%{_datadir}/icons/hicolor/86x86/apps/%{name}.png'
|
||||
- /usr/bin
|
||||
- /usr/share/harbour-sailotp
|
||||
- /usr/share/applications
|
||||
- /usr/share/icons/hicolor/86x86/apps
|
||||
- /usr/share/harbour-sailotp/i18n
|
||||
PkgBR: []
|
||||
|
|
|
@ -34,21 +34,31 @@
|
|||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
// Get App and QML-View objects
|
||||
QScopedPointer<QGuiApplication> app(SailfishApp::application(argc, argv));
|
||||
QScopedPointer<QQuickView> view(SailfishApp::createView());
|
||||
|
||||
// Internationalization, Load the Language
|
||||
QString locale = QLocale::system().name();
|
||||
QTranslator translator;
|
||||
translator.load(locale,SailfishApp::pathTo(QString("i18n")).toLocalFile());
|
||||
app->installTranslator(&translator);
|
||||
|
||||
// Set some global values
|
||||
app->setOrganizationName("harbour-sailotp");
|
||||
app->setOrganizationDomain("harbour-sailotp");
|
||||
app->setApplicationName("harbour-sailotp");
|
||||
app->setApplicationVersion(APP_VERSION);
|
||||
|
||||
// Register FileIO Class
|
||||
qmlRegisterType<FileIO, 1>("harbour.sailotp.FileIO", 1, 0, "FileIO");
|
||||
|
||||
// Prepare the QML and set Homedir
|
||||
view->setSource(SailfishApp::pathTo("qml/harbour-sailotp.qml"));
|
||||
view->rootContext()->setContextProperty("XDG_HOME_DIR", QStandardPaths::writableLocation(QStandardPaths::HomeLocation));
|
||||
view->show();
|
||||
|
||||
|
||||
// Run the app
|
||||
return app->exec();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue