diff --git a/.gitignore b/.gitignore index d2dd984..dbab0b9 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,4 @@ *.pro.user.* rpm/harbour-sailotp.spec rpm/harbour-sailotp.spec.* -i18n/*.qm +translations/*.qm diff --git a/README.md b/README.md index b3b18ce..6ffbda7 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,7 @@ The following people have contributed to translating SailOTP: * Chinese: BirdZhang * Finnish: Johan Heikkilä (hevanaa) * French: Romain Tartière (smortex) + * Italian: Tichy * Russian: moorchegue * Spanish: p4moedo * Swedish: Åke Engelbrektson (eson57) diff --git a/fileio.cpp b/fileio.cpp deleted file mode 100644 index 9793d60..0000000 --- a/fileio.cpp +++ /dev/null @@ -1,73 +0,0 @@ -#include "fileio.h" -#include -#include - -FileIO::FileIO(QObject *parent) : - QObject(parent) -{ - -} - -QString FileIO::read() -{ - if (mSource.isEmpty()){ - emit error("source is empty"); - return QString(); - } - - QFile file(mSource); - QString fileContent; - if ( file.open(QIODevice::ReadOnly) ) { - QString line; - QTextStream t( &file ); - do { - line = t.readLine(); - fileContent += line; - } while (!line.isNull()); - - file.close(); - } else { - emit error("Unable to open the file"); - return QString(); - } - return fileContent; -} - -bool FileIO::write(const QString& data) -{ - if (mSource.isEmpty()) - return false; - - QFile file(mSource); - if (!file.open(QFile::WriteOnly | QFile::Truncate)) - return false; - - QTextStream out(&file); - out << data; - - file.close(); - - return true; -} - -bool FileIO::exists() -{ - if (mSource.isEmpty()) { - emit error("Source is empty!"); - return false; - } - - QFile file(mSource); - return file.exists(); -} - -bool FileIO::exists(const QString& filename) -{ - if (filename.isEmpty()) { - emit error("Source is empty!"); - return false; - } - - QFile file(filename); - return file.exists(); -} diff --git a/fileio.h b/fileio.h deleted file mode 100644 index e8c67c2..0000000 --- a/fileio.h +++ /dev/null @@ -1,35 +0,0 @@ -#ifndef FILEIO_H -#define FILEIO_H - -#include - -class FileIO : public QObject -{ - Q_OBJECT - -public: - Q_PROPERTY(QString source - READ source - WRITE setSource - NOTIFY sourceChanged) - explicit FileIO(QObject *parent = 0); - - Q_INVOKABLE QString read(); - Q_INVOKABLE bool write(const QString& data); - Q_INVOKABLE bool exists(); - Q_INVOKABLE bool exists(const QString& filename); - - QString source() { return mSource; }; - -public slots: - void setSource(const QString& source) { mSource = source; }; - -signals: - void sourceChanged(const QString& source); - void error(const QString& msg); - -private: - QString mSource; -}; - -#endif // FILEIO_H diff --git a/harbour-sailotp.pro b/harbour-sailotp.pro index 680ecd3..2d418d8 100644 --- a/harbour-sailotp.pro +++ b/harbour-sailotp.pro @@ -1,11 +1,3 @@ -# The name of your app. -# NOTICE: name defined in TARGET has a corresponding QML filename. -# If name defined in TARGET is changed, following needs to be -# done to match new name: -# - corresponding QML filename must be changed -# - desktop icon filename must be changed -# - desktop filename must be changed -# - icon definition filename in desktop file must be changed TARGET = harbour-sailotp DEFINES += APP_VERSION=\\\"$$VERSION\\\" @@ -15,49 +7,41 @@ CONFIG += sailfishapp SOURCES += src/harbour-sailotp.cpp -OTHER_FILES += qml/harbour-sailotp.qml \ +DISTFILES += qml/harbour-sailotp.qml \ qml/cover/CoverPage.qml \ - rpm/harbour-sailotp.spec \ - rpm/harbour-sailotp.yaml \ - harbour-sailotp.desktop \ qml/pages/MainView.qml \ qml/pages/AddOTP.qml \ qml/pages/About.qml \ + qml/pages/ExportPage.qml \ + qml/pages/ScanOTP.qml \ + qml/pages/QRPage.qml \ + qml/pages/Settings.qml \ + qml/components/NotifyBanner.qml \ + qml/lib/urldecoder.js \ qml/lib/storage.js \ qml/lib/crypto.js \ + qml/lib/cryptojs-aes.js \ qml/lib/sha.js \ qml/sailotp.png \ - qml/pages/ExportPage.qml \ - qml/components/NotifyBanner.qml \ - qml/pages/ScanOTP.qml \ - qml/lib/urldecoder.js \ - qml/pages/QRPage.qml \ - rpm/harbour-sailotp.changes + rpm/harbour-sailotp.spec \ + rpm/harbour-sailotp.yaml \ + rpm/harbour-sailotp.changes \ + translations/*.ts \ + harbour-sailotp.desktop -i18n.files = i18n/*.qm -i18n.path = /usr/share/$${TARGET}/i18n +SAILFISHAPP_ICONS = 86x86 108x108 128x128 -INSTALLS += i18n +CONFIG += sailfishapp_i18n -lupdate_only { - SOURCES = qml/*.qml \ - qml/pages/*.qml \ - qml/covers/*.qml \ - qml/components/*.qml - - TRANSLATIONS = i18n/de.ts \ - i18n/en.ts \ - i18n/es.ts \ - i18n/fi.ts \ - i18n/fr.ts \ - i18n/ru.ts \ - i18n/sv.ts \ - i18n/zh_CN.ts -} +TRANSLATIONS = translations/harbour-sailotp-de.ts \ + translations/harbour-sailotp-es.ts \ + translations/harbour-sailotp-fi.ts \ + translations/harbour-sailotp-fr.ts \ + translations/harbour-sailotp-it.ts \ + translations/harbour-sailotp-ru.ts \ + translations/harbour-sailotp-sv.ts \ + translations/harbour-sailotp-zh_CN.ts include(src/qzxing/QZXing.pri) include(src/FileIO/FileIO.pri) -include(src/qqrencode/qqrencode.pri) - -DISTFILES += \ - qml/lib/cryptojs-aes.js +include(src/qqrencode/qqrencode.pri) diff --git a/icons/108x108/harbour-sailotp.png b/icons/108x108/harbour-sailotp.png new file mode 100644 index 0000000..a09f86a Binary files /dev/null and b/icons/108x108/harbour-sailotp.png differ diff --git a/icons/128x128/harbour-sailotp.png b/icons/128x128/harbour-sailotp.png new file mode 100644 index 0000000..8e34e33 Binary files /dev/null and b/icons/128x128/harbour-sailotp.png differ diff --git a/harbour-sailotp.png b/icons/86x86/harbour-sailotp.png similarity index 100% rename from harbour-sailotp.png rename to icons/86x86/harbour-sailotp.png diff --git a/qml/harbour-sailotp.qml b/qml/harbour-sailotp.qml index eac8785..8c627ed 100644 --- a/qml/harbour-sailotp.qml +++ b/qml/harbour-sailotp.qml @@ -29,7 +29,7 @@ import QtQuick 2.0 import Sailfish.Silica 1.0 -import org.nemomobile.configuration 1.0 +import Nemo.Configuration 1.0 import "pages" import "components" diff --git a/qml/pages/About.qml b/qml/pages/About.qml index b19e3b3..248c9a2 100644 --- a/qml/pages/About.qml +++ b/qml/pages/About.qml @@ -129,7 +129,7 @@ Page { font.pixelSize: Theme.fontSizeSmall horizontalAlignment: TextEdit.Center readOnly: true - text: qsTr("Translators:")+"\n\nChinese: BirdZhang\nFinnish: Johan Heikkilä\nFrench: Romain Tartière\nRussian: moorchegue\nSpanish: p4moedo\nSwedish: Åke Engelbrektson\nEnglish: Stefan Brand\nGerman: Stefan Brand" + text: qsTr("Translators:")+"\n\nChinese: BirdZhang\nFinnish: Johan Heikkilä\nFrench: Romain Tartière\nItalian: Tichy\nRussian: moorchegue\nSpanish: p4moedo\nSwedish: Åke Engelbrektson\nEnglish: Stefan Brand\nGerman: Stefan Brand" color: "white" } } diff --git a/rpm/harbour-sailotp.changes b/rpm/harbour-sailotp.changes index f2b13ca..45077fb 100644 --- a/rpm/harbour-sailotp.changes +++ b/rpm/harbour-sailotp.changes @@ -1,6 +1,10 @@ +* Mon Apr 09 2019 Stefan Brand 1.7.1-1 +- Added Italian Translation +- Adapt Packaging for new Harbour Rules + * Mon Apr 02 2019 Stefan Brand 1.7-1 - Added Chinese Translation -- Added Finnish Translation +- Added Finish Translation - Added Russian Translation - Added Spanish Translation - Some internal Preparation for future features diff --git a/rpm/harbour-sailotp.yaml b/rpm/harbour-sailotp.yaml index a083e8f..ae0621b 100644 --- a/rpm/harbour-sailotp.yaml +++ b/rpm/harbour-sailotp.yaml @@ -1,31 +1,41 @@ Name: harbour-sailotp Summary: SailOTP -Version: 1.7 +Version: 1.7.1 Release: 1 Group: Security URL: https://github.com/seiichiro0185/sailotp/ License: "BSD\t" + Sources: -- '%{name}-%{version}.tar.bz2' + - '%{name}-%{version}.tar.bz2' + Description: | A Sailfish implementation of the One Time Pad algorithm as used by Google Authenticator and a growing number of Websites. + Configure: none + Builder: qtc5 + QMakeOptions: -- VERSION=%{version} -- RELEASE=%{release} + - VERSION=%{version} + - RELEASE=%{release} + PkgConfigBR: -- Qt5Quick -- Qt5Qml -- Qt5Core -- Qt5Multimedia -- sailfishapp >= 1.0.2 + - Qt5Quick + - Qt5Qml + - Qt5Core + - Qt5Multimedia + - sailfishapp >= 1.0.2 + Requires: -- sailfishsilica-qt5 >= 0.10.9 + - sailfishsilica-qt5 >= 0.10.9 + Files: -- '%{_bindir}' -- '%{_datadir}/%{name}/qml' -- '%{_datadir}/%{name}/i18n' -- '%{_datadir}/applications/%{name}.desktop' -- '%{_datadir}/icons/hicolor/86x86/apps/%{name}.png' + - '%defattr(644, root, root, 755)' + - '%attr(755, root, root) %{_bindir}' + - '%{_datadir}/%{name}' + - '%{_datadir}/applications/%{name}.desktop' + - '%{_datadir}/icons/hicolor/*/apps/%{name}.png' + + PkgBR: [] diff --git a/i18n/de.ts b/translations/harbour-sailotp-de.ts similarity index 89% rename from i18n/de.ts rename to translations/harbour-sailotp-de.ts index 2a10e0d..d6f133c 100644 --- a/i18n/de.ts +++ b/translations/harbour-sailotp-de.ts @@ -3,14 +3,6 @@ About - - A Simple Sailfish OTP Generator<br />(RFC 6238/4226 compatible) - Ein einfacher Sailfish OTP-Generator<br/>(RFC 6238/4226-kompatibel) - - - Copyright: Stefan Brand<br />License: BSD (3-clause) - Copyright: Stefan Brand<br/>Lizenz: BSD (3-Klausel) - A Simple Sailfish OTP Generator @@ -262,71 +254,63 @@ Lizenz: BSD (3-Klausel) About Über - - Export Token-DB - Datenbank exportieren - - - Import Token-DB - Datenbank importieren - Settings Einstellungen - + Export / Import Export / Import - + Add Token Token hinzufügen - + Nothing here Hier ist nichts - + Pull down to add a OTP Nach unten ziehen zum hinzufügen - + Deleting Lösche - + Token for Token für - + copied to clipboard kopiert - + Move up Nach oben - + Move down Nach unten - + Edit Bearbeiten - + Delete Löschen @@ -371,10 +355,6 @@ Lizenz: BSD (3-Klausel) Tap the picture to start / stop scanning. Pull down to add Token manually. Vorschau antippen um den Scan zu starten / zu stoppen. Nach unten ziehen um manuell hinzu zu fügen. - - Tap the picture to start scanning. Pull down to add Token manually. - Vorschau antippen um den Scan zu starten. Nach unten ziehen um manuell hinzu zu fügen. - Settings diff --git a/i18n/es.ts b/translations/harbour-sailotp-es.ts similarity index 95% rename from i18n/es.ts rename to translations/harbour-sailotp-es.ts index c1376c4..65f7db6 100644 --- a/i18n/es.ts +++ b/translations/harbour-sailotp-es.ts @@ -260,57 +260,57 @@ Licencia: BSD (de 3 cláusulas) Configuración - + Export / Import Exportar/Importar - + Add Token Añadir Token - + Nothing here Nada aquí - + Pull down to add a OTP Tire hacia abajo para añadir tokens OTP - + Deleting Borrando - + Token for Token para - + copied to clipboard copiado al portapapeles - + Move up Ascender - + Move down Descender - + Edit Editar - + Delete Borrar @@ -365,8 +365,8 @@ Licencia: BSD (de 3 cláusulas) - Funcionamiento - + Behaviour + diff --git a/i18n/fi.ts b/translations/harbour-sailotp-fi.ts similarity index 95% rename from i18n/fi.ts rename to translations/harbour-sailotp-fi.ts index a601bb6..c4f09a1 100644 --- a/i18n/fi.ts +++ b/translations/harbour-sailotp-fi.ts @@ -262,57 +262,57 @@ Lisenssi: BSD (3-clause) Asetukset - + Export / Import Eksportoi / Importoi - + Add Token Lisää tunnus - + Nothing here Tyhjä - + Pull down to add a OTP Vedä alaspäin lisääksesi OTP:n - + Deleting Poistaa - + Token for Tunnus - + copied to clipboard kopioitu leikepöydälle - + Move up Siirrä ylös - + Move down Siirrä alas - + Edit Muokkaa - + Delete Poista diff --git a/i18n/fr.ts b/translations/harbour-sailotp-fr.ts similarity index 96% rename from i18n/fr.ts rename to translations/harbour-sailotp-fr.ts index aba2e52..8471527 100644 --- a/i18n/fr.ts +++ b/translations/harbour-sailotp-fr.ts @@ -261,57 +261,57 @@ Licence : BSD (3 clauses) Paramètres - + Export / Import Exporter / Importer - + Add Token Ajouter un OTP - + Nothing here Aucun mot de passe - + Pull down to add a OTP Glissez vers le bas pour ajouter un OTP - + Deleting Suppression - + Token for OTP pour - + copied to clipboard copié dans le presse-papier - + Move up Déplacer vers le haut - + Move down Déplacer vers le bas - + Edit Modifier - + Delete Supprimer diff --git a/translations/harbour-sailotp-it.ts b/translations/harbour-sailotp-it.ts new file mode 100644 index 0000000..7c78bcc --- /dev/null +++ b/translations/harbour-sailotp-it.ts @@ -0,0 +1,377 @@ + + + + + About + + + A Simple Sailfish OTP Generator +(RFC 6238/4226 compatible) + Un semplice generatore di OTP per Sailfish +(compatibile con RFC 6238/4226) + + + + Copyright: Stefan Brand +License: BSD (3-clause) + Copyright: Stefan Brand +Licenza: BSD (3-clause) + + + + SailOTP uses the following third party libs: + SailOTP utilizza le seguenti librerie di terzi: + + + + Contributors: + Collaboratori: + + + + Support + Supporto + + + + Translators: + Traduttori: + + + + AddOTP + + + Show QR-Code + Mostra Codice QR + + + + Can't create QR-Code from incomplete settings! + Impossibile creare il codice QR da impostizioni incomplete! + + + + Save + Salva + + + + Add + Aggiungi + + + + Type + Tipo + + + + Time-based (TOTP) + Basato sul tempo (TOTP) + + + + Counter-based (HOTP) + Basato su contatore (HOTP) + + + + Steam Guard + Steam Guard + + + + Title + Titolo + + + + Title for the OTP + Titolo per la OTP + + + + Secret (at least 16 characters) + Segreto (almeno 16 caratteri) + + + + Secret OTP Key + Chiave OTP segreta + + + + Length + Lunghezza + + + + Length of the Token + Lunghezza del Token + + + + + Time Derivation (Seconds) + Derivazione Temporale (Secondi) + + + + Next Counter Value + Valore Prossimo Contatore + + + + Next Value of the Counter + Prossimo Valore del Contatore + + + + ExportPage + + + File already exists, choose "Overwrite existing" to overwrite it. + Il file esiste già, scegli "Sovrascrivi esistente" per sovrascriverlo. + + + + Given file does not exist! + Il file passato non esiste! + + + + + Export + Esporta + + + + + Import + Importa + + + + Filename + Nome file + + + + File to import + File da importare + + + + File to export + File da esportare + + + + Overwrite existing + Sovrascrivi esistente + + + + Password + Password + + + + Password for the file + Password per il file + + + + Passwords don't match! + Le password non corrispondono! + + + + Passwords match! + Le password corrispondono! + + + + Repeated Password for the file + Password Ripetuta per il file + + + + 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. + Da qua puoi Importare i Token da un file. Inserisci la posizione del file e la password usata nell'esportazione. Scorri a sinistra per iniziare l'importazione. + + + + 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. + Da qua puoi Esportare i Token su un file. Il file esportato sarà criptato con AES-256-CBC e codificato Base64. Scegli una password forte, il file conterrà i segreti usati per generare i Token per i tuoi account. Scorri a sinistra per iniziare l'esportazione. + + + + To view the content of the export file outside of SailOTP use the following openssl command: + Per vedere il contenuto del file esportato al di fuori di SailORP usa il seguente comando openssl: + + + + Error writing to file + Errore in scrittura del file + + + + Token Database exported to + Database dei Toen esportato su + + + + Could not encrypt tokens. Error: + Impossibile criptare i token. Errore: + + + + Could not read tokens from Database + Impossibile leggere i token dal Database + + + + Tokens imported from + Token importati da + + + + Unable to decrypt file, did you use the right password? + Non ho potuto decrittare il file, hai scritto la password correttamente? + + + + Could not read from file + Impossibile leggere dal file + + + + MainView + + + About + Informazioni + + + + Settings + Imopstazioni + + + + Export / Import + Esporta / Importa + + + + Add Token + Aggiungi Token + + + + Nothing here + Qua non c'è nulla + + + + Pull down to add a OTP + Trascina giù per aggiungere una OTP + + + + Deleting + Cancellazione + + + + Token for + Token per + + + + copied to clipboard + copiato negli appunti + + + + Move up + Sposta su + + + + Move down + Sposta giù + + + + Edit + Modifica + + + + Delete + Cancella + + + + QRPage + + + Can't create QR-Code from incomplete settings! + Impossibile creare il codice QR da impostizioni incomplete! + + + + ScanOTP + + + Can't access temporary directory + Impossibile accedere alla cartella temporanea + + + + Add manually + Aggiungi manualmente + + + + Scan Code + Scansiona Codice + + + + Scanning... + Scansione... + + + + No valid Token data found. + Non sono stati trovati dati di Token validi. + + + + Tap the picture to start / stop scanning. Pull down to add Token manually. + Tocca l'immagine per iniziare / fermare la scansione. Trascina giù per aggiungere manualmente un Token. + + + + Settings + + + Settings + Imopstazioni + + + + Behaviour + Comportamento + + + + Show Token as QRCode on Tap + Mostra il Token come Codice QR al Tocco + + + diff --git a/i18n/ru.ts b/translations/harbour-sailotp-ru.ts similarity index 96% rename from i18n/ru.ts rename to translations/harbour-sailotp-ru.ts index 18d2088..e926443 100644 --- a/i18n/ru.ts +++ b/translations/harbour-sailotp-ru.ts @@ -262,57 +262,57 @@ License: BSD (3-clause) настройки - + Export / Import Экспорт / импорт - + Add Token Добавить токен - + Nothing here Ничего нету - + Pull down to add a OTP Потяните вниз чтобы добавить OTP - + Deleting Удаление - + Token for Токен для - + copied to clipboard скопирован в буфер обмена - + Move up Передвинуть вверх - + Move down Передвинуть вниз - + Edit Редактировать - + Delete Удалить diff --git a/i18n/sv.ts b/translations/harbour-sailotp-sv.ts similarity index 95% rename from i18n/sv.ts rename to translations/harbour-sailotp-sv.ts index 1b28481..fbbd443 100644 --- a/i18n/sv.ts +++ b/translations/harbour-sailotp-sv.ts @@ -262,57 +262,57 @@ Licens: BSD (3-clause) Inställningar - + Export / Import Export / Import - + Add Token Lägg till Token - + Nothing here Inget här - + Pull down to add a OTP Dra neråt för att lägga till en OTP - + Deleting Tar bort - + Token for Token för - + copied to clipboard kopierad till urklipp - + Move up Flytta upp - + Move down Flytta ner - + Edit Redigera - + Delete Ta bort diff --git a/i18n/zh_CN.ts b/translations/harbour-sailotp-zh_CN.ts similarity index 95% rename from i18n/zh_CN.ts rename to translations/harbour-sailotp-zh_CN.ts index 2a759b9..d8db44a 100644 --- a/i18n/zh_CN.ts +++ b/translations/harbour-sailotp-zh_CN.ts @@ -259,57 +259,57 @@ License: BSD (3-clause) 设置 - + Export / Import 导出/导入 - + Add Token 添加令牌 - + Nothing here 无内容 - + Pull down to add a OTP 下拉添加一个OTP - + Deleting 删除中 - + Token for 令牌 - + copied to clipboard 已复制到剪切板 - + Move up 向上 - + Move down 向下 - + Edit 编辑 - + Delete 删除 diff --git a/i18n/en.ts b/translations/harbour-sailotp.ts similarity index 95% rename from i18n/en.ts rename to translations/harbour-sailotp.ts index b68568e..fd1a26d 100644 --- a/i18n/en.ts +++ b/translations/harbour-sailotp.ts @@ -258,57 +258,57 @@ License: BSD (3-clause) - + Export / Import - + Add Token - + Nothing here - + Pull down to add a OTP - + Deleting - + Token for - + copied to clipboard - + Move up Move up - + Move down Move down - + Edit - + Delete