Fix in-wizard translation support

We in principle support a map of locale->string for keys starting with
"tr" like "trDisplayName". This didn't work everywhere.

We may not cast the value for these keys to QString before passing it to
`localizedString`, since that would result in an empty string if the
value is such a map.

Also fix the documentation since we remove all parts from '_' (to also
get rid of encoding parts).

Fixes: QTCREATORBUG-23575
Change-Id: I2be795053e645c8bf81417d0db69cd7e63eff022
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Eike Ziller
2024-07-17 14:15:40 +02:00
parent a5b2c648bc
commit 8a060b285a
3 changed files with 12 additions and 12 deletions
@@ -52,13 +52,13 @@
translations in the .json file using the following syntax:
\code
"trDisplayName": { "C": "default", "en_US": "english", "de_DE": "deutsch" }
"trDisplayName": { "C": "default", "en": "english", "de": "deutsch" }
\endcode
For example:
\code
"trDisplayName": { "C": "Project Location", "en_US": "Project Location", "de_DE": "Projekt Verzeichnis" }
"trDisplayName": { "C": "Project Location", "en": "Project Location", "de": "Projektverzeichnis" }
\endcode
\section1 Creating Wizards