diff --git a/CMakeLists.txt b/CMakeLists.txt index 3011e99..e01fbf4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,7 +16,16 @@ set(OTHER_FILES weatherplugin.json ) -add_library(zeiterfassung-plugins-weatherplugin SHARED ${HEADERS} ${SOURCES} ${OTHER_FILES}) +set(TRANSLATIONS + translations/weatherplugin_en.ts + translations/weatherplugin_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-weatherplugin SHARED ${HEADERS} ${SOURCES} ${OTHER_FILES} ${TRANSLATIONS_C}) set_target_properties(zeiterfassung-plugins-weatherplugin PROPERTIES OUTPUT_NAME weatherplugin PREFIX "") diff --git a/translations/weatherplugin_de.ts b/translations/weatherplugin_de.ts index 18961a2..6e90938 100644 --- a/translations/weatherplugin_de.ts +++ b/translations/weatherplugin_de.ts @@ -1,40 +1,53 @@ + + WeatherSettingsWidget + + + Weather API: + + + + + The weather api url is invalid! + + + WeatherWidget - + Loading... Lade... - + Request failed Anfrage fehlgeschlagen - + Parsing failed Parsen fehlgeschlagen - + Not an json obj Kein json obj - + No weather found Kein weather gefunden - + No main found Kein main gefunden - + %0 (%1°C) %0 (%1°C) diff --git a/translations/weatherplugin_en.ts b/translations/weatherplugin_en.ts index 1c9d0aa..3d7f0b8 100644 --- a/translations/weatherplugin_en.ts +++ b/translations/weatherplugin_en.ts @@ -1,40 +1,53 @@ + + WeatherSettingsWidget + + + Weather API: + + + + + The weather api url is invalid! + + + WeatherWidget - + Loading... - + Request failed - + Parsing failed - + Not an json obj - + No weather found - + No main found - + %0 (%1°C)