diff --git a/CarBudget.cpp b/CarBudget.cpp index 506708e..6aaa7a7 100644 --- a/CarBudget.cpp +++ b/CarBudget.cpp @@ -53,10 +53,11 @@ int main(int argc, char *argv[]) QQuickView *view = SailfishApp::createView(); QTranslator translator; - if(translator.load((QLocale::system().name() != "C")?(QLocale::system().name()):("en_GB"), ":/i18n")) + if(translator.load((QLocale::system().name() != "C")?(QLocale::system().name()):("en_GB"), "/usr/share/harbour-carbudget/translations/")) { QGuiApplication::installTranslator(&translator); } + app->setApplicationVersion(QString(APP_VERSION)); qmlRegisterType( "harbour.carbudget",1,0,"Tank"); diff --git a/Ressources.qrc b/Ressources.qrc index 2c2bb3e..46e8194 100644 --- a/Ressources.qrc +++ b/Ressources.qrc @@ -5,10 +5,4 @@ picture/Wrench.png picture/Dollar.png - - i18n/fr_FR.qm - i18n/it_IT.qm - i18n/de_DE.qm - i18n/ru_RU.qm - diff --git a/harbour-carbudget.pro b/harbour-carbudget.pro index 40e7559..71e3080 100644 --- a/harbour-carbudget.pro +++ b/harbour-carbudget.pro @@ -32,6 +32,15 @@ lupdate_only{ } +CONFIG += sailfishapp_i18n + +TRANSLATIONS = translations/de_DE.ts \ + translations/fr_FR.ts \ + translations/it_IT.ts \ + translations/ru_RU.ts \ + translations/sv_SE.ts + + DEFINES += APP_VERSION=\"\\\"$${VERSION}\\\"\" OTHER_FILES += qml/cover/CoverPage.qml \ @@ -53,13 +62,10 @@ OTHER_FILES += qml/cover/CoverPage.qml \ qml/pages/TireMount.qml \ qml/pages/About.qml \ qml/pages/CarCreate.qml \ - i18n/FR_fr.ts \ - i18n/RU_ru.ts \ qml/pages/BudgetView.qml \ qml/pages/Settings.qml \ qml/pages/CosttypeEntry.qml \ qml/pages/CosttypeView.qml \ - i18n/de_DE.ts \ qml/pages/SelectImportFile.qml \ qml/pages/MycarImport.qml \ qml/pages/FuelpadImport.qml \ @@ -84,10 +90,6 @@ HEADERS += \ statfileinfo.h \ globals.h -TRANSLATIONS = i18n/de_DE.ts \ - i18n/fr_FR.ts \ - i18n/it_IT.ts \ - i18n/ru_RU.ts RESOURCES += \ Ressources.qrc diff --git a/i18n/de_DE.qm b/i18n/de_DE.qm deleted file mode 100644 index 5028dd5..0000000 Binary files a/i18n/de_DE.qm and /dev/null differ diff --git a/i18n/fr_FR.qm b/i18n/fr_FR.qm deleted file mode 100644 index 84de641..0000000 Binary files a/i18n/fr_FR.qm and /dev/null differ diff --git a/i18n/it_IT.qm b/i18n/it_IT.qm deleted file mode 100644 index 396e2a5..0000000 Binary files a/i18n/it_IT.qm and /dev/null differ diff --git a/i18n/ru_RU.qm b/i18n/ru_RU.qm deleted file mode 100644 index bbc7ed6..0000000 Binary files a/i18n/ru_RU.qm and /dev/null differ diff --git a/rpm/CarBudget.yaml b/rpm/CarBudget.yaml index aa2575e..225201d 100644 --- a/rpm/CarBudget.yaml +++ b/rpm/CarBudget.yaml @@ -1,6 +1,6 @@ Name: harbour-carbudget Summary: Car expenses calculation -Version: 0.12 +Version: 0.13 Release: 0 Group: Qt/Qt License: GPL @@ -22,6 +22,7 @@ Requires: Files: - '%{_bindir}' - '%{_datadir}/%{name}/qml' +- '%{_datadir}/%{name}/translations' - '%{_datadir}/applications/%{name}.desktop' - '%{_datadir}/icons/hicolor/86x86/apps/%{name}.png' - '%{_datadir}/applications' diff --git a/i18n/de_DE.ts b/translations/de_DE.ts similarity index 98% rename from i18n/de_DE.ts rename to translations/de_DE.ts index e559a60..1ba9333 100644 --- a/i18n/de_DE.ts +++ b/translations/de_DE.ts @@ -1,20 +1,25 @@ - + About - + + Simulation + + + + License: GPLv3 Lizenz: GPLv3 - + Created by condo4 (Fabien Proriol) Erstellt von condo4 (Fabien Proriol) - + Credits to:<br>- Lorenzo Facca (Italian translation)<br>- Alois Spitzbart (German translation)<br>- Michal Hrusecky (Many improvments)<br>- Denis Fedoseev (Russion translation)<br >- Thomas Michel (Many improvments) Dank an:<br>- Lorenzo Facca (Italienisch Übersetzung)<br>- Alois Spitzbart (Deutsche Übersetzung)<br>- Michal Hrusecky (Viele Verbesserungen)<br>- Denis Fedoseev (Russische Übersetzung)<br >- Thomas Michel (Viele Verbesserungen) diff --git a/i18n/fr_FR.ts b/translations/fr_FR.ts similarity index 99% rename from i18n/fr_FR.ts rename to translations/fr_FR.ts index 2ff65df..91bae1a 100644 --- a/i18n/fr_FR.ts +++ b/translations/fr_FR.ts @@ -1,28 +1,29 @@ - + About + Simulation - Simulation + Simulation Distance: %L1 km Distance: %L1 km - + License: GPLv3 Licence : GPLv3 - + Created by condo4 (Fabien Proriol) Créé par condo4 (Fabien Proriol) - + Credits to:<br>- Lorenzo Facca (Italian translation)<br>- Alois Spitzbart (German translation)<br>- Michal Hrusecky (Many improvments)<br>- Denis Fedoseev (Russion translation)<br >- Thomas Michel (Many improvments) Remerciments :<br>- Lorenzo Facca (Italien)<br>- Alois Spitzbart (Allemand)<br>- Denis Fedoseev (Russe)<br>- Michal Hrusecky (divers améliorations)<br >- Thomas Michel (divers améliorations) diff --git a/translations/harbour-carbudget.ts b/translations/harbour-carbudget.ts new file mode 100644 index 0000000..fc16a99 --- /dev/null +++ b/translations/harbour-carbudget.ts @@ -0,0 +1,971 @@ + + + + + About + + + Simulation + + + + + License: GPLv3 + + + + + Created by condo4 (Fabien Proriol) + + + + + Credits to:<br>- Lorenzo Facca (Italian translation)<br>- Alois Spitzbart (German translation)<br>- Michal Hrusecky (Many improvments)<br>- Denis Fedoseev (Russion translation)<br >- Thomas Michel (Many improvments) + + + + + BudgetView + + + Statistics + + + + + + + Bills: + + + + + + + Fuel: + + + + + + + Tires: + + + + + + Invest: + + + + + ODO + + + + + In Budget + + + + + Fuel + + + + + Total: + + + + + Average: + + + + + Min: + + + + + Max: + + + + + Costs + + + + + + Total: + + + + + Costs per 100 Km + + + + + Buying: + + + + + CarCreate + + + Create new car + + + + + + Short Car name + + + + + CarEntry + + + Select another car + + + + + Settings + + + + + About + + + + + Distance: %L1 ~ %L2 %3 + + + + + Consumption: %L1 l/100%2 + + + + + Last: %L1 l/100%2 + + + + + New Tank + + + + + New Cost + + + + + Tires mounted: %1/%2 + + + + + Tires mounted + + + + + Budget + + + + + CarView + + + Import Car + + + + + Create new car + + + + + Car List + + + + + Select + + + + + Remove + + + + + ConsumptionStatistics + + + Consumption by fuel type + + + + + Average: + + + + + Min: + + + + + Max: + + + + + CostEntry + + + Manage cost types + + + + + Modify Cost + + + + + New Cost + + + + + Date + + + + + Cost Type + + + + + + Price + + + + + description + + + + + CostEntryView + + + Modify + + + + + Cost + + + + + ODO: + + + + + Date: + + + + + Cost Type: + + + + + Price: + + + + + Description: + + + + + CostStatistics + + + Bills per 100 + + + + + + by Type + + + + + Bills by Type + + + + + Fuel per 100 + + + + + Fuel by Type + + + + + CostView + + + Cost List + + + + + Add cost + + + + + Modify + + + + + Remove + + + + + Deleting + + + + + CosttypeEntry + + + Modify Cost Type + + + + + New Cost Type + + + + + + Name + + + + + CosttypeView + + + Add new cost type + + + + + Cost Type List + + + + + Modify + + + + + Remove + + + + + Deleting + + + + + CoverPage + + + / 100 + + + + + l / 100 + + + + + DirectoryPage + + + Settings + + + + + Import File + + + + + Cut + + + + + No files + + + + + FuelpadImport + + + Cars found in + + + + + Import + + + + + FueltypeEntry + + + Modify Fuel Type + + + + + New Fuel Type + + + + + + Name + + + + + FueltypeView + + + Add new fuel type + + + + + Fuel Type List + + + + + Modify + + + + + Remove + + + + + Deleting + + + + + MycarImport + + + Cars found in + + + + + Import + + + + + SelectImportFile + + + File to import + + + + + Import + + + + + Settings + + + Settings + + + + + + Currency + + + + + Distance Unity + + + + + Km or Mile + + + + + Number of wheels + + + + + 2, 4, 6 or 8 + + + + + Buying date + + + + + Buying Price + + + + + Selling Price (est.) + + + + + Lifetime (in months, est.) + + + + + StationEntry + + + Modify Station + + + + + New Station + + + + + + Name + + + + + StationView + + + Add new station + + + + + Station List + + + + + Modify + + + + + Remove + + + + + Deleting + + + + + TankEntry + + + Manage stations + + + + + Manage fuel types + + + + + Modify Tank + + + + + New tank + + + + + Date + + + + + ODO + + + + + + Quantity + + + + + + Total Price + + + + + Unite Price + + + + + Fuel Type + + + + + Station + + + + + Full tank + + + + + description + + + + + TankEntryView + + + Modify + + + + + Tank + + + + + Date: + + + + + ODO: + + + + + Quantity: + + + + + Total Price: + + + + + Unit Price: + + + + + Station: + + + + + Fuel Type: + + + + + Full tank: + + + + + Yes + + + + + No + + + + + Note: + + + + + TankView + + + Tank List + + + + + Add tank + + + + + Manage stations + + + + + Manage fuel types + + + + + Modify + + + + + Remove + + + + + Deleting + + + + + /l + + + + + l + + + + + TireEntry + + + Modify Tire + + + + + New Tire + + + + + Buy date + + + + + + Name + + + + + + Manufacturer + + + + + + Model + + + + + + Price + + + + + + Quantity + + + + + TireMount + + + Umount Tire + + + + + Mount Tire + + + + + To trash + + + + + TireView + + + Create new tire + + + + + Show history + + + + + Tire List + + + + + Modify + + + + + Remove + + + + + Deleting + + + + + Umount + + + + + Mount + + + + + TiremountEdit + + + Modify Tire Mount + + + + + Mount date + + + + + Unmount date + + + + + TiremountView + + + Tire Mounts + + + + + Modify + + + + diff --git a/i18n/it_IT.ts b/translations/it_IT.ts similarity index 98% rename from i18n/it_IT.ts rename to translations/it_IT.ts index ec71f73..2f94e53 100644 --- a/i18n/it_IT.ts +++ b/translations/it_IT.ts @@ -1,20 +1,25 @@ - + About - + + Simulation + + + + License: GPLv3 Licenza: GPLv3 - + Created by condo4 (Fabien Proriol) Creato da condo4 (Fabien Proriol) - + Credits to:<br>- Lorenzo Facca (Italian translation)<br>- Alois Spitzbart (German translation)<br>- Michal Hrusecky (Many improvments)<br>- Denis Fedoseev (Russion translation)<br >- Thomas Michel (Many improvments) diff --git a/i18n/ru_RU.ts b/translations/ru_RU.ts similarity index 99% rename from i18n/ru_RU.ts rename to translations/ru_RU.ts index 0231ee5..7d35949 100644 --- a/i18n/ru_RU.ts +++ b/translations/ru_RU.ts @@ -1,28 +1,29 @@ - + About + Simulation - Simulation + Simulation Distance: %L1 km Пробег: %L1 km - + License: GPLv3 Лицензия: GPLv3 - + Created by condo4 (Fabien Proriol) Разработано condo4 (Fabien Proriol) - + Credits to:<br>- Lorenzo Facca (Italian translation)<br>- Alois Spitzbart (German translation)<br>- Michal Hrusecky (Many improvments)<br>- Denis Fedoseev (Russion translation)<br >- Thomas Michel (Many improvments) diff --git a/i18n/sv_SE.ts b/translations/sv_SE.ts similarity index 98% rename from i18n/sv_SE.ts rename to translations/sv_SE.ts index f14de82..b4676a8 100644 --- a/i18n/sv_SE.ts +++ b/translations/sv_SE.ts @@ -4,17 +4,22 @@ About - + + Simulation + + + + License: GPLv3 Licens: GPLv3 - + Created by condo4 (Fabien Proriol) Skapad av condo4 (Fabien Proriol) - + Credits to:<br>- Lorenzo Facca (Italian translation)<br>- Alois Spitzbart (German translation)<br>- Michal Hrusecky (Many improvments)<br>- Denis Fedoseev (Russion translation)<br >- Thomas Michel (Many improvments) Tack till:<br>- Lorenzo Facca (Italian translation)<br>- Alois Spitzbart (German translation)<br>- Michal Hrusecky (Many improvments)<br>- Denis Fedoseev (Russion translation)<br >- Thomas Michel (Many improvments)<br >- Åke Engelbrektson (Swedish translation) diff --git a/update_translation.sh b/update_translation.sh index 3ad78f7..9245aea 100755 --- a/update_translation.sh +++ b/update_translation.sh @@ -1,4 +1,5 @@ -lupdate qml/pages/* qml/cover/* -ts i18n/fr_FR.ts -lupdate qml/pages/* qml/cover/* -ts i18n/it_IT.ts -lupdate qml/pages/* qml/cover/* -ts i18n/de_DE.ts -lupdate qml/pages/* qml/cover/* -ts i18n/ru_RU.ts +lupdate qml/pages/* qml/cover/* -ts translations/fr_FR.ts +lupdate qml/pages/* qml/cover/* -ts translations/it_IT.ts +lupdate qml/pages/* qml/cover/* -ts translations/de_DE.ts +lupdate qml/pages/* qml/cover/* -ts translations/ru_RU.ts +lupdate qml/pages/* qml/cover/* -ts translations/sv_SE.ts