Skip to content

Commit

Permalink
added german and english translation
Browse files Browse the repository at this point in the history
  • Loading branch information
cnlpete committed Dec 31, 2014
1 parent a0fd6cb commit e1c262a
Show file tree
Hide file tree
Showing 5 changed files with 99 additions and 7 deletions.
6 changes: 4 additions & 2 deletions harbour-trulyyours.pro
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ INSTALLS += js

# to disable building translations every time, comment out the
# following CONFIG line
#CONFIG += sailfishapp_i18n
#TRANSLATIONS += translations/$${TARGET}-de.ts
CONFIG += sailfishapp_i18n
TRANSLATIONS += \
translations/$${TARGET}-de.ts \
translations/$${TARGET}-en.ts

7 changes: 3 additions & 4 deletions src/harbour-trulyyours.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,9 @@ int main(int argc, char *argv[])
QScopedPointer<QGuiApplication> app(SailfishApp::application(argc, argv));
QSharedPointer<QQuickView> view(SailfishApp::createView());
QTranslator translator;
translator.load("translations_" + QLocale::system().name(),
"/usr/share/harbour-trulyyours/i18n");
app->installTranslator(&translator);

if (translator.load("harbour-trulyyours-" + QLocale::system().name(),
SailfishApp::pathTo("translations").path()))
app->installTranslator(&translator);

AmbienceManager mgr;
TagManager tagMgr;
Expand Down
33 changes: 33 additions & 0 deletions translations/harbour-trulyyours-de.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.0" language="de_DE">
<context>
<name>AmbienceDetailPage</name>
<message>
<source>Save to gallery</source>
<translation>Zur Galerie hinzufügen</translation>
</message>
<message>
<source>Save and create ambience</source>
<translation>Speichern und Ambiente erstellen</translation>
</message>
</context>
<context>
<name>BrowseAmbienceListPage</name>
<message>
<source>Found ambiences</source>
<translation>Ambiente</translation>
</message>
</context>
<context>
<name>MainPage</name>
<message>
<source>Show all ambiences</source>
<translation>Alle anzeigen</translation>
</message>
<message>
<source>Tags</source>
<translation>Tags</translation>
</message>
</context>
</TS>
38 changes: 38 additions & 0 deletions translations/harbour-trulyyours-en.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.0" language="en">
<context>
<name>AmbienceDetailPage</name>
<message>
<location filename="../qml/pages/AmbienceDetailPage.qml" line="48"/>
<source>Save and create ambience</source>
<translation>Save and create ambience</translation>
</message>
<message>
<location filename="../qml/pages/AmbienceDetailPage.qml" line="57"/>
<source>Save to gallery</source>
<translation>Save to gallery</translation>
</message>
</context>
<context>
<name>BrowseAmbienceListPage</name>
<message>
<location filename="../qml/pages/BrowseAmbienceListPage.qml" line="59"/>
<source>Found ambiences</source>
<translation>Found ambiences</translation>
</message>
</context>
<context>
<name>MainPage</name>
<message>
<location filename="../qml/pages/MainPage.qml" line="53"/>
<source>Show all ambiences</source>
<translation>Show all ambiences</translation>
</message>
<message>
<location filename="../qml/pages/MainPage.qml" line="62"/>
<source>Tags</source>
<translation>Tags</translation>
</message>
</context>
</TS>
22 changes: 21 additions & 1 deletion translations/harbour-trulyyours.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,34 @@
<context>
<name>AmbienceDetailPage</name>
<message>
<location filename="../qml/pages/AmbienceDetailPage.qml" line="48"/>
<source>Save and create ambience</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/AmbienceDetailPage.qml" line="57"/>
<source>Save to gallery</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>BrowseAmbienceListPage</name>
<message>
<source>All ambiences</source>
<location filename="../qml/pages/BrowseAmbienceListPage.qml" line="59"/>
<source>Found ambiences</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>MainPage</name>
<message>
<location filename="../qml/pages/MainPage.qml" line="53"/>
<source>Show all ambiences</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/MainPage.qml" line="62"/>
<source>Tags</source>
<translation type="unfinished"></translation>
</message>
</context>
Expand Down

0 comments on commit e1c262a

Please sign in to comment.