summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorKatja Marttila <katja.marttila@qt.io>2021-01-12 16:28:06 +0200
committerKatja Marttila <katja.marttila@qt.io>2021-01-14 22:39:09 +0200
commit4d9620977c81401f88212196b1d1a1094fc19699 (patch)
tree31ca12ea43344f07818ac4e5febec8ab283f5cdf /doc
parentc9eb521f4520d5624ad83ed3a54705169049ad1c (diff)
Fix translating from component script
Translate using QCoreApplication::translate instead of QObject::tr. Removed the use of obsolete installTranslatorFunctions() function. Task-number: QTIFW-392 Change-Id: Icdd67efb6889acd26d63297fb89945c3431c881c Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
Diffstat (limited to 'doc')
-rw-r--r--doc/installerfw.qdoc7
1 files changed, 1 insertions, 6 deletions
diff --git a/doc/installerfw.qdoc b/doc/installerfw.qdoc
index d5335d585..ebc1e2044 100644
--- a/doc/installerfw.qdoc
+++ b/doc/installerfw.qdoc
@@ -703,16 +703,11 @@
</Translations>
\endcode
- Use the \c {qsTr()} function for literal text within scripts. Additionally,
+ Use the \c {qsTranslate()} function for literal text within scripts. Additionally,
you can add the \c Component.prototype.retranslateUi method to the script.
It is called when the language of the installer changes and the translation
file is loaded.
- The context being used for translation is the basename of the script file
- when using \c qsTr or the class name of the UI file when translating a user
- interface. For example, if the script file is called \c installscript.qs, the
- context will be installscript.
-
\note The translation system can also be used to customize the UI. Use e.g.
an \c en.ts file to replace any text in the installer with a custom English
version.