Commit d4de33ce authored by Ionut Alexandrescu's avatar Ionut Alexandrescu

Fix the translation files generation

parent 4dc2b966
...@@ -19,11 +19,6 @@ QML_DESIGNER_IMPORT_PATH = ...@@ -19,11 +19,6 @@ QML_DESIGNER_IMPORT_PATH =
# deprecated API in order to know how to port your code away from it. # deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS DEFINES += QT_DEPRECATED_WARNINGS
TRANSLATIONS += Translation/DemoQtWS_en.ts
TRANSLATIONS += Translation/DemoQtWS_fr.ts
TRANSLATIONS += Translation/DemoQtWS_de.ts
TRANSLATIONS += Translation/DemoQtWS_it.ts
AZURE_PATH = C:/Development/Azure-IOT-ARM/azure-iot-sdk-c AZURE_PATH = C:/Development/Azure-IOT-ARM/azure-iot-sdk-c
equals(TEMPLATE,"vcapp"):exists($$AZURE_PATH) { equals(TEMPLATE,"vcapp"):exists($$AZURE_PATH) {
...@@ -60,8 +55,6 @@ equals(TEMPLATE,"vcapp"):exists($$AZURE_PATH) { ...@@ -60,8 +55,6 @@ equals(TEMPLATE,"vcapp"):exists($$AZURE_PATH) {
DEFINES += DEF_USE_AZURE DEFINES += DEF_USE_AZURE
} }
# You can also make your code fail to compile if you use deprecated APIs. # You can also make your code fail to compile if you use deprecated APIs.
# In order to do so, uncomment the following line. # In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt. # You can also select to disable deprecated APIs only up to a certain version of Qt.
...@@ -78,15 +71,22 @@ HEADERS += \ ...@@ -78,15 +71,22 @@ HEADERS += \
TranslationSelect.h \ TranslationSelect.h \
AzureEvent.h AzureEvent.h
qtPrepareTool(LRELEASE, lrelease)
for(tsfile, TRANSLATIONS) { TRANSLATIONS += Translation/DemoQtWS_en.ts
qmfile = $$shadowed($$tsfile) TRANSLATIONS += Translation/DemoQtWS_fr.ts
qmfile ~= s,.ts$,.qm, TRANSLATIONS += Translation/DemoQtWS_de.ts
qmdir = $$dirname(qmfile) TRANSLATIONS += Translation/DemoQtWS_it.ts
!exists($$qmdir) {
mkpath($$qmdir)|error("Aborting.") TRANSLATIONS_FILES =
} qtPrepareTool(LRELEASE, lrelease)
command = $$LRELEASE -removeidentical $$tsfile -qm $$qmfile for(tsfile, TRANSLATIONS) {
system($$command)|error("Failed to run: $$command") qmfile = $$tsfile
TRANSLATIONS_FILES += $$qmfile qmfile ~= s,.ts$,.qm,
} qmdir = $$dirname(qmfile)
!exists($$qmdir) {
mkpath($$qmdir)|error("Aborting.")
}
command = $$LRELEASE -removeidentical $$tsfile -qm $$qmfile
system($$command)|error("Failed to run: $$command")
TRANSLATIONS_FILES += $$qmfile
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment