Added translations

This commit is contained in:
Daniel Brunner
2018-10-15 20:52:12 +02:00
parent 747787eae9
commit 4565bd22c8
3 changed files with 51 additions and 16 deletions

View File

@@ -14,19 +14,28 @@ set(SOURCES
lunchmealwidget.cpp lunchmealwidget.cpp
) )
set(RESOURCES
lunchmealplugin_resources.qrc
)
set(FORMS set(FORMS
lunchmealdialog.ui lunchmealdialog.ui
) )
set(RESOURCES
lunchmealplugin_resources.qrc
)
set(OTHER_FILES set(OTHER_FILES
lunchmealplugin.json lunchmealplugin.json
) )
add_library(zeiterfassung-plugins-lunchmealplugin SHARED ${HEADERS} ${SOURCES} ${RESOURCES} ${FORMS} ${OTHER_FILES}) set(TRANSLATIONS
translations/lunchmealplugin_en.ts
translations/lunchmealplugin_de.ts
)
set_source_files_properties(${TRANSLATIONS} PROPERTIES OUTPUT_LOCATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/translations)
QT5_CREATE_TRANSLATION(TRANSLATIONS_C ${TRANSLATIONS} ${HEADERS} ${SOURCES} ${FORMS} OPTIONS -no-obsolete)
#QT5_ADD_TRANSLATION(TRANSLATIONS_C ${TRANSLATIONS})
add_library(zeiterfassung-plugins-lunchmealplugin SHARED ${HEADERS} ${SOURCES} ${FORMS} ${RESOURCES} ${OTHER_FILES} ${TRANSLATIONS_C})
set_target_properties(zeiterfassung-plugins-lunchmealplugin PROPERTIES OUTPUT_NAME lunchmealplugin PREFIX "") set_target_properties(zeiterfassung-plugins-lunchmealplugin PROPERTIES OUTPUT_NAME lunchmealplugin PREFIX "")

View File

@@ -14,14 +14,27 @@
<translation>Lade...</translation> <translation>Lade...</translation>
</message> </message>
<message> <message>
<location filename="../lunchmealdialog.cpp" line="12"/> <location filename="../lunchmealdialog.cpp" line="13"/>
<source>Lunch meal for %0</source> <source>Lunch meal for %0</source>
<translation>Mittagsmenü vom %0</translation> <translation>Mittagsmenü vom %0</translation>
</message> </message>
</context>
<context>
<name>LunchMealSettingsWidget</name>
<message> <message>
<location filename="../lunchmealdialog.cpp" line="12"/> <location filename="../lunchmealsettingswidget.cpp" line="14"/>
<source>dd.MM.yyyy</source> <source>Lunch meal API:</source>
<translation>dd.MM.yyyy</translation> <translation type="unfinished"></translation>
</message>
<message>
<location filename="../lunchmealsettingswidget.cpp" line="17"/>
<source>Lunch meal date format:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../lunchmealsettingswidget.cpp" line="27"/>
<source>The lunch meal api url is invalid!</source>
<translation type="unfinished"></translation>
</message> </message>
</context> </context>
<context> <context>
@@ -32,8 +45,8 @@
<translation>Mittagsmenü</translation> <translation>Mittagsmenü</translation>
</message> </message>
<message> <message>
<location filename="../lunchmealwidget.cpp" line="55"/> <location filename="../lunchmealwidget.cpp" line="53"/>
<location filename="../lunchmealwidget.cpp" line="56"/> <location filename="../lunchmealwidget.cpp" line="54"/>
<source>Could not load lunch meal!</source> <source>Could not load lunch meal!</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>

View File

@@ -14,13 +14,26 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../lunchmealdialog.cpp" line="12"/> <location filename="../lunchmealdialog.cpp" line="13"/>
<source>Lunch meal for %0</source> <source>Lunch meal for %0</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context>
<context>
<name>LunchMealSettingsWidget</name>
<message> <message>
<location filename="../lunchmealdialog.cpp" line="12"/> <location filename="../lunchmealsettingswidget.cpp" line="14"/>
<source>dd.MM.yyyy</source> <source>Lunch meal API:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../lunchmealsettingswidget.cpp" line="17"/>
<source>Lunch meal date format:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../lunchmealsettingswidget.cpp" line="27"/>
<source>The lunch meal api url is invalid!</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context> </context>
@@ -32,8 +45,8 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../lunchmealwidget.cpp" line="55"/> <location filename="../lunchmealwidget.cpp" line="53"/>
<location filename="../lunchmealwidget.cpp" line="56"/> <location filename="../lunchmealwidget.cpp" line="54"/>
<source>Could not load lunch meal!</source> <source>Could not load lunch meal!</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>