Commit fd9b5c47 authored by Thomas Hartmann's avatar Thomas Hartmann
Browse files

QmlApplicationWizardDialog: adding translation of XML files



Logic analog to custom wizards.

Change-Id: I9e61da2a46d3d30456dd9abf86f0b918044e4a3e
Reviewed-by: default avatarFriedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: default avatarOswald Buddenhagen <oswald.buddenhagen@digia.com>
parent 2b6c79eb
......@@ -4,10 +4,5 @@
id="QB.QML Application for Qt Quick 1.1">
<displayname>Qt Quick 1 UI</displayname>
<displayname xml:lang="de">Qt Quick 1 UI</displayname>
<description>Creates a Qt Quick UI 1 project with a single QML file that contains the main view.
You can review Qt Quick UI 1 projects in the QML Viewer and you need not build them. You do not need to have the development environment installed on your computer to create and run this type of projects.
Requires &lt;b&gt;Qt 4.8&lt;/b&gt; or newer.
</description>
<description>Creates a Qt Quick UI 1 project with a single QML file that contains the main view.&lt;br&gt; You can review Qt Quick UI 1 projects in the QML Viewer and you need not build them. You do not need to have the development environment installed on your computer to create and run this type of projects. &lt;br&gt;&lt;br&gt;Requires &lt;b&gt;Qt 4.8&lt;/b&gt; or newer.</description>
</template>
......@@ -4,10 +4,5 @@
id="QB.QML Application for Qt Quick 2.0">
<displayname>Qt Quick 2 UI</displayname>
<displayname xml:lang="de">Qt Quick 2 UI</displayname>
<description>Creates a Qt Quick UI 2 project with a single QML file that contains the main view.
You can review Qt Quick UI 2 projects in the QML Scene and you need not build them. You do not need to have the development environment installed on your computer to create and run this type of projects.
Requires &lt;b&gt;Qt 5.0&lt;/b&gt; or newer.
</description>
<description>Creates a Qt Quick UI 2 project with a single QML file that contains the main view.&lt;br&gt; You can review Qt Quick UI 2 projects in the QML Scene and you need not build them. You do not need to have the development environment installed on your computer to create and run this type of projects.&lt;br&gt;&lt;br&gt;Requires &lt;b&gt;Qt 5.0&lt;/b&gt; or newer.</description>
</template>
let $prefix := string("QT_TRANSLATE_NOOP(&quot;QmlProjectManager::QmlApplicationWizardDialog&quot;, &quot;")
let $suffix := concat("&quot;)", codepoints-to-string(10))
for $file in tokenize($files, string("\|"))
let $doc := doc($file)
for $text in ($doc/*:template/*:description, $doc/*:wizard/*:displayname)
return fn:concat($prefix, data($text), $suffix)
......@@ -21,6 +21,7 @@ TRANSLATIONS = $$prependAll(LANGUAGES, $$PWD/qtcreator_,.ts)
MIME_TR_H = $$OUT_PWD/mime_tr.h
CUSTOMWIZARD_TR_H = $$OUT_PWD/customwizard_tr.h
QMLWIZARD_TR_H = $$OUT_PWD/qmlwizard_tr.h
EXTERNALTOOLS_TR_H = $$OUT_PWD/externaltools_tr.h
for(dir, $$list($$files($$IDE_SOURCE_TREE/src/plugins/*))):MIMETYPES_FILES += $$files($$dir/*.mimetypes.xml)
......@@ -29,12 +30,16 @@ MIMETYPES_FILES = \"$$join(MIMETYPES_FILES, |)\"
for(dir, $$list($$files($$IDE_SOURCE_TREE/share/qtcreator/templates/wizards/*))):CUSTOMWIZARD_FILES += $$files($$dir/wizard.xml)
CUSTOMWIZARD_FILES = \"$$join(CUSTOMWIZARD_FILES, |)\"
for(dir, $$list($$files($$IDE_SOURCE_TREE/share/qtcreator/templates/qml/*))):QMLWIZARD_FILES += $$files($$dir/template.xml)
QMLWIZARD_FILES = \"$$join(QMLWIZARD_FILES, |)\"
for(file, $$list($$files($$IDE_SOURCE_TREE/src/share/qtcreator/externaltools/*))):EXTERNALTOOLS_FILES += $$files($$file)
EXTERNALTOOLS_FILES = \"$$join(EXTERNALTOOLS_FILES, |)\"
extract.commands += \
$$XMLPATTERNS -output $$MIME_TR_H -param files=$$MIMETYPES_FILES $$PWD/extract-mimetypes.xq $$escape_expand(\\n\\t) \
$$XMLPATTERNS -output $$CUSTOMWIZARD_TR_H -param files=$$CUSTOMWIZARD_FILES $$PWD/extract-customwizards.xq $$escape_expand(\\n\\t) \
$$XMLPATTERNS -output $$QMLWIZARD_TR_H -param files=$$QMLWIZARD_FILES $$PWD/extract-qmlwizards.xq $$escape_expand(\\n\\t) \
$$XMLPATTERNS -output $$EXTERNALTOOLS_TR_H -param files=$$EXTERNALTOOLS_FILES $$PWD/extract-externaltools.xq
QMAKE_EXTRA_TARGETS += extract
......@@ -54,12 +59,12 @@ files = $$files($$PWD/*_??.ts) $$PWD/qtcreator_untranslated.ts
for(file, files) {
lang = $$replace(file, .*_([^/]*)\\.ts, \\1)
v = ts-$${lang}.commands
$$v = cd $$wd && $$LUPDATE $$sources $$MIME_TR_H $$CUSTOMWIZARD_TR_H $$EXTERNALTOOLS_TR_H -ts $$file
$$v = cd $$wd && $$LUPDATE $$sources $$MIME_TR_H $$CUSTOMWIZARD_TR_H $$QMLWIZARD_TR_H $$EXTERNALTOOLS_TR_H -ts $$file
v = ts-$${lang}.depends
$$v = extract
QMAKE_EXTRA_TARGETS += ts-$$lang
}
ts-all.commands = cd $$wd && $$LUPDATE $$sources $$MIME_TR_H $$CUSTOMWIZARD_TR_H $$EXTERNALTOOLS_TR_H -ts $$files
ts-all.commands = cd $$wd && $$LUPDATE $$sources $$MIME_TR_H $$CUSTOMWIZARD_TR_H $$QMLWIZARD_TR_H $$EXTERNALTOOLS_TR_H -ts $$files
ts-all.depends = extract
QMAKE_EXTRA_TARGETS += ts-all
......
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