Skip to content

Commit

Permalink
docs: Clarify to translators what the LTR string should be.
Browse files Browse the repository at this point in the history
People shouldn't translate this. It's more like a translator-controlled setting.
  • Loading branch information
iphydf committed Feb 15, 2025
1 parent cc5fa85 commit 8801b6f
Show file tree
Hide file tree
Showing 55 changed files with 58 additions and 57 deletions.
7 changes: 4 additions & 3 deletions src/widget/translator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,10 @@ void Translator::translate(const QString& localeName)
// After the language is changed from RTL to LTR, the layout direction isn't
// always restored
const QString direction =
QApplication::tr("LTR", "Translate this string to the string 'RTL' in"
" right-to-left languages (for example Hebrew and"
" Arabic) to get proper widget layout");
QApplication::tr("LTR", "DO NOT TRANSLATE. Instead, set this string "
"to 'RTL' in right-to-left languages (for example "
"Hebrew and Arabic) to get proper widget layout. "
"This string should only ever be 'LTR' or 'RTL'.");

QGuiApplication::setLayoutDirection(direction == "RTL" ? Qt::RightToLeft : Qt::LeftToRight);

Expand Down
2 changes: 1 addition & 1 deletion translations/ar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2396,7 +2396,7 @@ This ID includes the NoSpam code (in blue), and the checksum (in gray).</source>
<name>QApplication</name>
<message>
<source>LTR</source>
<comment>Translate this string to the string &apos;RTL&apos; in right-to-left languages (for example Hebrew and Arabic) to get proper widget layout</comment>
<comment>DO NOT TRANSLATE. Instead, set this string to &apos;RTL&apos; in right-to-left languages (for example Hebrew and Arabic) to get proper widget layout. This string should only ever be &apos;LTR&apos; or &apos;RTL&apos;.</comment>
<translation>RTL</translation>
</message>
<message>
Expand Down
2 changes: 1 addition & 1 deletion translations/be.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2351,7 +2351,7 @@ This ID includes the NoSpam code (in blue), and the checksum (in gray).</source>
</message>
<message>
<source>LTR</source>
<comment>Translate this string to the string &apos;RTL&apos; in right-to-left languages (for example Hebrew and Arabic) to get proper widget layout</comment>
<comment>DO NOT TRANSLATE. Instead, set this string to &apos;RTL&apos; in right-to-left languages (for example Hebrew and Arabic) to get proper widget layout. This string should only ever be &apos;LTR&apos; or &apos;RTL&apos;.</comment>
<translation>LTR</translation>
</message>
</context>
Expand Down
2 changes: 1 addition & 1 deletion translations/ber.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2704,7 +2704,7 @@ IDa ⵢⴻⵙⵄⴰ ⴰⴽⴰⵔⴰⵎ ⵏ NoSpam (ⵙ ⵜⴼⴻⵍⵡⵉⵜ),
</message>
<message>
<source>LTR</source>
<comment>Translate this string to the string &apos;RTL&apos; in right-to-left languages (for example Hebrew and Arabic) to get proper widget layout</comment>
<comment>DO NOT TRANSLATE. Instead, set this string to &apos;RTL&apos; in right-to-left languages (for example Hebrew and Arabic) to get proper widget layout. This string should only ever be &apos;LTR&apos; or &apos;RTL&apos;.</comment>
<translation type="unfinished"></translation>
</message>
</context>
Expand Down
2 changes: 1 addition & 1 deletion translations/bg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2284,7 +2284,7 @@ This ID includes the NoSpam code (in blue), and the checksum (in gray).</source>
</message>
<message>
<source>LTR</source>
<comment>Translate this string to the string &apos;RTL&apos; in right-to-left languages (for example Hebrew and Arabic) to get proper widget layout</comment>
<comment>DO NOT TRANSLATE. Instead, set this string to &apos;RTL&apos; in right-to-left languages (for example Hebrew and Arabic) to get proper widget layout. This string should only ever be &apos;LTR&apos; or &apos;RTL&apos;.</comment>
<translation>LTR</translation>
</message>
</context>
Expand Down
2 changes: 1 addition & 1 deletion translations/bn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2745,7 +2745,7 @@ This ID includes the NoSpam code (in blue), and the checksum (in gray).</source>
</message>
<message>
<source>LTR</source>
<comment>Translate this string to the string &apos;RTL&apos; in right-to-left languages (for example Hebrew and Arabic) to get proper widget layout</comment>
<comment>DO NOT TRANSLATE. Instead, set this string to &apos;RTL&apos; in right-to-left languages (for example Hebrew and Arabic) to get proper widget layout. This string should only ever be &apos;LTR&apos; or &apos;RTL&apos;.</comment>
<translation type="unfinished"></translation>
</message>
</context>
Expand Down
2 changes: 1 addition & 1 deletion translations/cs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2288,7 +2288,7 @@ ID zahrnuje kód NoSpam (modře) a kontrolní součet (šedě).</translation>
</message>
<message>
<source>LTR</source>
<comment>Translate this string to the string &apos;RTL&apos; in right-to-left languages (for example Hebrew and Arabic) to get proper widget layout</comment>
<comment>DO NOT TRANSLATE. Instead, set this string to &apos;RTL&apos; in right-to-left languages (for example Hebrew and Arabic) to get proper widget layout. This string should only ever be &apos;LTR&apos; or &apos;RTL&apos;.</comment>
<translation>LTR</translation>
</message>
</context>
Expand Down
2 changes: 1 addition & 1 deletion translations/da.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2576,7 +2576,7 @@ Dette ID inkluderer NoSpam-koden (i blåt) og kontrolsummen (i gråt).</translat
</message>
<message>
<source>LTR</source>
<comment>Translate this string to the string &apos;RTL&apos; in right-to-left languages (for example Hebrew and Arabic) to get proper widget layout</comment>
<comment>DO NOT TRANSLATE. Instead, set this string to &apos;RTL&apos; in right-to-left languages (for example Hebrew and Arabic) to get proper widget layout. This string should only ever be &apos;LTR&apos; or &apos;RTL&apos;.</comment>
<translation type="unfinished"></translation>
</message>
</context>
Expand Down
2 changes: 1 addition & 1 deletion translations/de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2277,7 +2277,7 @@ Diese ID enthält den NoSpam-Code (in blau) und die Prüfsumme (in grau).</trans
</message>
<message>
<source>LTR</source>
<comment>Translate this string to the string &apos;RTL&apos; in right-to-left languages (for example Hebrew and Arabic) to get proper widget layout</comment>
<comment>DO NOT TRANSLATE. Instead, set this string to &apos;RTL&apos; in right-to-left languages (for example Hebrew and Arabic) to get proper widget layout. This string should only ever be &apos;LTR&apos; or &apos;RTL&apos;.</comment>
<translation>LTR</translation>
</message>
</context>
Expand Down
2 changes: 1 addition & 1 deletion translations/el.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2360,7 +2360,7 @@ This ID includes the NoSpam code (in blue), and the checksum (in gray).</source>
</message>
<message>
<source>LTR</source>
<comment>Translate this string to the string &apos;RTL&apos; in right-to-left languages (for example Hebrew and Arabic) to get proper widget layout</comment>
<comment>DO NOT TRANSLATE. Instead, set this string to &apos;RTL&apos; in right-to-left languages (for example Hebrew and Arabic) to get proper widget layout. This string should only ever be &apos;LTR&apos; or &apos;RTL&apos;.</comment>
<translation>LTR</translation>
</message>
</context>
Expand Down
2 changes: 1 addition & 1 deletion translations/eo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2596,7 +2596,7 @@ Kunhavigu ĝin kun viaj amikoj por komenci babili.
</message>
<message>
<source>LTR</source>
<comment>Translate this string to the string &apos;RTL&apos; in right-to-left languages (for example Hebrew and Arabic) to get proper widget layout</comment>
<comment>DO NOT TRANSLATE. Instead, set this string to &apos;RTL&apos; in right-to-left languages (for example Hebrew and Arabic) to get proper widget layout. This string should only ever be &apos;LTR&apos; or &apos;RTL&apos;.</comment>
<translation>LTR</translation>
</message>
</context>
Expand Down
2 changes: 1 addition & 1 deletion translations/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2274,7 +2274,7 @@ Este ID incluye el código NoSpam (en azul), y la suma de comprobación (en gris
</message>
<message>
<source>LTR</source>
<comment>Translate this string to the string &apos;RTL&apos; in right-to-left languages (for example Hebrew and Arabic) to get proper widget layout</comment>
<comment>DO NOT TRANSLATE. Instead, set this string to &apos;RTL&apos; in right-to-left languages (for example Hebrew and Arabic) to get proper widget layout. This string should only ever be &apos;LTR&apos; or &apos;RTL&apos;.</comment>
<translation>LTR</translation>
</message>
</context>
Expand Down
2 changes: 1 addition & 1 deletion translations/et.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2286,7 +2286,7 @@ See ID sisaldab NoSpam koodi (sinine) ja kontrollsumma (hall).</translation>
</message>
<message>
<source>LTR</source>
<comment>Translate this string to the string &apos;RTL&apos; in right-to-left languages (for example Hebrew and Arabic) to get proper widget layout</comment>
<comment>DO NOT TRANSLATE. Instead, set this string to &apos;RTL&apos; in right-to-left languages (for example Hebrew and Arabic) to get proper widget layout. This string should only ever be &apos;LTR&apos; or &apos;RTL&apos;.</comment>
<translation>LTR</translation>
</message>
</context>
Expand Down
2 changes: 1 addition & 1 deletion translations/fa.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2338,7 +2338,7 @@ This ID includes the NoSpam code (in blue), and the checksum (in gray).</source>
</message>
<message>
<source>LTR</source>
<comment>Translate this string to the string &apos;RTL&apos; in right-to-left languages (for example Hebrew and Arabic) to get proper widget layout</comment>
<comment>DO NOT TRANSLATE. Instead, set this string to &apos;RTL&apos; in right-to-left languages (for example Hebrew and Arabic) to get proper widget layout. This string should only ever be &apos;LTR&apos; or &apos;RTL&apos;.</comment>
<translation>RTL</translation>
</message>
</context>
Expand Down
2 changes: 1 addition & 1 deletion translations/fi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2284,7 +2284,7 @@ Tämä ID sisältää spammin estävän koodin(joka on sinisellä), ja tarkistus
</message>
<message>
<source>LTR</source>
<comment>Translate this string to the string &apos;RTL&apos; in right-to-left languages (for example Hebrew and Arabic) to get proper widget layout</comment>
<comment>DO NOT TRANSLATE. Instead, set this string to &apos;RTL&apos; in right-to-left languages (for example Hebrew and Arabic) to get proper widget layout. This string should only ever be &apos;LTR&apos; or &apos;RTL&apos;.</comment>
<translation>LTR</translation>
</message>
</context>
Expand Down
2 changes: 1 addition & 1 deletion translations/fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2282,7 +2282,7 @@ Cet identifiant comprend le code NoSpam (en bleu) et la somme de contrôle (en g
</message>
<message>
<source>LTR</source>
<comment>Translate this string to the string &apos;RTL&apos; in right-to-left languages (for example Hebrew and Arabic) to get proper widget layout</comment>
<comment>DO NOT TRANSLATE. Instead, set this string to &apos;RTL&apos; in right-to-left languages (for example Hebrew and Arabic) to get proper widget layout. This string should only ever be &apos;LTR&apos; or &apos;RTL&apos;.</comment>
<translation>LTR</translation>
</message>
</context>
Expand Down
2 changes: 1 addition & 1 deletion translations/gl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2340,7 +2340,7 @@ Este ID inclúe o código NoSpam (en azul) e a suma de verificación (en gris).<
</message>
<message>
<source>LTR</source>
<comment>Translate this string to the string &apos;RTL&apos; in right-to-left languages (for example Hebrew and Arabic) to get proper widget layout</comment>
<comment>DO NOT TRANSLATE. Instead, set this string to &apos;RTL&apos; in right-to-left languages (for example Hebrew and Arabic) to get proper widget layout. This string should only ever be &apos;LTR&apos; or &apos;RTL&apos;.</comment>
<translation>LTR</translation>
</message>
</context>
Expand Down
2 changes: 1 addition & 1 deletion translations/he.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2709,7 +2709,7 @@ This ID includes the NoSpam code (in blue), and the checksum (in gray).</source>
<name>QApplication</name>
<message>
<source>LTR</source>
<comment>Translate this string to the string &apos;RTL&apos; in right-to-left languages (for example Hebrew and Arabic) to get proper widget layout</comment>
<comment>DO NOT TRANSLATE. Instead, set this string to &apos;RTL&apos; in right-to-left languages (for example Hebrew and Arabic) to get proper widget layout. This string should only ever be &apos;LTR&apos; or &apos;RTL&apos;.</comment>
<translation>LTR</translation>
</message>
<message>
Expand Down
2 changes: 1 addition & 1 deletion translations/hr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2341,7 +2341,7 @@ Ovaj ID uključuje NoSpam kod (plavo) i kontrolni zbroj (sivo).</translation>
</message>
<message>
<source>LTR</source>
<comment>Translate this string to the string &apos;RTL&apos; in right-to-left languages (for example Hebrew and Arabic) to get proper widget layout</comment>
<comment>DO NOT TRANSLATE. Instead, set this string to &apos;RTL&apos; in right-to-left languages (for example Hebrew and Arabic) to get proper widget layout. This string should only ever be &apos;LTR&apos; or &apos;RTL&apos;.</comment>
<translation>LTR</translation>
</message>
</context>
Expand Down
2 changes: 1 addition & 1 deletion translations/hu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2335,7 +2335,7 @@ Ez az azonosító tartalmazza a NoSpam kódot (kék színnel) és az ellenőrző
</message>
<message>
<source>LTR</source>
<comment>Translate this string to the string &apos;RTL&apos; in right-to-left languages (for example Hebrew and Arabic) to get proper widget layout</comment>
<comment>DO NOT TRANSLATE. Instead, set this string to &apos;RTL&apos; in right-to-left languages (for example Hebrew and Arabic) to get proper widget layout. This string should only ever be &apos;LTR&apos; or &apos;RTL&apos;.</comment>
<translation>LTR</translation>
</message>
</context>
Expand Down
2 changes: 1 addition & 1 deletion translations/is.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2720,7 +2720,7 @@ Deildu því með vinum þínum til að byrja að spjalla.
</message>
<message>
<source>LTR</source>
<comment>Translate this string to the string &apos;RTL&apos; in right-to-left languages (for example Hebrew and Arabic) to get proper widget layout</comment>
<comment>DO NOT TRANSLATE. Instead, set this string to &apos;RTL&apos; in right-to-left languages (for example Hebrew and Arabic) to get proper widget layout. This string should only ever be &apos;LTR&apos; or &apos;RTL&apos;.</comment>
<translation type="unfinished"></translation>
</message>
</context>
Expand Down
2 changes: 1 addition & 1 deletion translations/it.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2282,7 +2282,7 @@ Questo ID include una sezione NoSpam (in colore blu) e il controllo checksum (in
</message>
<message>
<source>LTR</source>
<comment>Translate this string to the string &apos;RTL&apos; in right-to-left languages (for example Hebrew and Arabic) to get proper widget layout</comment>
<comment>DO NOT TRANSLATE. Instead, set this string to &apos;RTL&apos; in right-to-left languages (for example Hebrew and Arabic) to get proper widget layout. This string should only ever be &apos;LTR&apos; or &apos;RTL&apos;.</comment>
<translation>LTR</translation>
</message>
</context>
Expand Down
2 changes: 1 addition & 1 deletion translations/ja.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2364,7 +2364,7 @@ This ID includes the NoSpam code (in blue), and the checksum (in gray).</source>
</message>
<message>
<source>LTR</source>
<comment>Translate this string to the string &apos;RTL&apos; in right-to-left languages (for example Hebrew and Arabic) to get proper widget layout</comment>
<comment>DO NOT TRANSLATE. Instead, set this string to &apos;RTL&apos; in right-to-left languages (for example Hebrew and Arabic) to get proper widget layout. This string should only ever be &apos;LTR&apos; or &apos;RTL&apos;.</comment>
<translation>LTR</translation>
</message>
</context>
Expand Down
2 changes: 1 addition & 1 deletion translations/jbo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2709,7 +2709,7 @@ le samselcmi cu mapti le blanu zoi gy. NoSpam .gy. joi le checksum zoi gy. gray<
</message>
<message>
<source>LTR</source>
<comment>Translate this string to the string &apos;RTL&apos; in right-to-left languages (for example Hebrew and Arabic) to get proper widget layout</comment>
<comment>DO NOT TRANSLATE. Instead, set this string to &apos;RTL&apos; in right-to-left languages (for example Hebrew and Arabic) to get proper widget layout. This string should only ever be &apos;LTR&apos; or &apos;RTL&apos;.</comment>
<translation type="unfinished"></translation>
</message>
</context>
Expand Down
2 changes: 1 addition & 1 deletion translations/kn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2735,7 +2735,7 @@ This ID includes the NoSpam code (in blue), and the checksum (in gray).</source>
</message>
<message>
<source>LTR</source>
<comment>Translate this string to the string &apos;RTL&apos; in right-to-left languages (for example Hebrew and Arabic) to get proper widget layout</comment>
<comment>DO NOT TRANSLATE. Instead, set this string to &apos;RTL&apos; in right-to-left languages (for example Hebrew and Arabic) to get proper widget layout. This string should only ever be &apos;LTR&apos; or &apos;RTL&apos;.</comment>
<translation type="unfinished"></translation>
</message>
</context>
Expand Down
2 changes: 1 addition & 1 deletion translations/ko.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2595,7 +2595,7 @@ This ID includes the NoSpam code (in blue), and the checksum (in gray).</source>
</message>
<message>
<source>LTR</source>
<comment>Translate this string to the string &apos;RTL&apos; in right-to-left languages (for example Hebrew and Arabic) to get proper widget layout</comment>
<comment>DO NOT TRANSLATE. Instead, set this string to &apos;RTL&apos; in right-to-left languages (for example Hebrew and Arabic) to get proper widget layout. This string should only ever be &apos;LTR&apos; or &apos;RTL&apos;.</comment>
<translation type="unfinished"></translation>
</message>
</context>
Expand Down
2 changes: 1 addition & 1 deletion translations/li.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2756,7 +2756,7 @@ Deze ID umvat de NoSpam-code (in blauw) en de checksum (in gries).</translation>
</message>
<message>
<source>LTR</source>
<comment>Translate this string to the string &apos;RTL&apos; in right-to-left languages (for example Hebrew and Arabic) to get proper widget layout</comment>
<comment>DO NOT TRANSLATE. Instead, set this string to &apos;RTL&apos; in right-to-left languages (for example Hebrew and Arabic) to get proper widget layout. This string should only ever be &apos;LTR&apos; or &apos;RTL&apos;.</comment>
<translation type="unfinished"></translation>
</message>
</context>
Expand Down
2 changes: 1 addition & 1 deletion translations/lt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2290,7 +2290,7 @@ Pasidalinkite ja su draugais, kad pradėtumėte kalbėtis.
</message>
<message>
<source>LTR</source>
<comment>Translate this string to the string &apos;RTL&apos; in right-to-left languages (for example Hebrew and Arabic) to get proper widget layout</comment>
<comment>DO NOT TRANSLATE. Instead, set this string to &apos;RTL&apos; in right-to-left languages (for example Hebrew and Arabic) to get proper widget layout. This string should only ever be &apos;LTR&apos; or &apos;RTL&apos;.</comment>
<translation>LTR</translation>
</message>
</context>
Expand Down
2 changes: 1 addition & 1 deletion translations/lv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2329,7 +2329,7 @@ Kopīgojiet to ar draugiem, lai sāktu tērzēšanu.
</message>
<message>
<source>LTR</source>
<comment>Translate this string to the string &apos;RTL&apos; in right-to-left languages (for example Hebrew and Arabic) to get proper widget layout</comment>
<comment>DO NOT TRANSLATE. Instead, set this string to &apos;RTL&apos; in right-to-left languages (for example Hebrew and Arabic) to get proper widget layout. This string should only ever be &apos;LTR&apos; or &apos;RTL&apos;.</comment>
<translation>LTR</translation>
</message>
</context>
Expand Down
2 changes: 1 addition & 1 deletion translations/mk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2370,7 +2370,7 @@ This ID includes the NoSpam code (in blue), and the checksum (in gray).</source>
</message>
<message>
<source>LTR</source>
<comment>Translate this string to the string &apos;RTL&apos; in right-to-left languages (for example Hebrew and Arabic) to get proper widget layout</comment>
<comment>DO NOT TRANSLATE. Instead, set this string to &apos;RTL&apos; in right-to-left languages (for example Hebrew and Arabic) to get proper widget layout. This string should only ever be &apos;LTR&apos; or &apos;RTL&apos;.</comment>
<translation></translation>
</message>
</context>
Expand Down
2 changes: 1 addition & 1 deletion translations/nb_NO.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2284,7 +2284,7 @@ Denne ID-en inkluderer NoSpam-koden (i blått), og sjekksummen (i grått).</tran
</message>
<message>
<source>LTR</source>
<comment>Translate this string to the string &apos;RTL&apos; in right-to-left languages (for example Hebrew and Arabic) to get proper widget layout</comment>
<comment>DO NOT TRANSLATE. Instead, set this string to &apos;RTL&apos; in right-to-left languages (for example Hebrew and Arabic) to get proper widget layout. This string should only ever be &apos;LTR&apos; or &apos;RTL&apos;.</comment>
<translation>LTR</translation>
</message>
</context>
Expand Down
Loading

0 comments on commit 8801b6f

Please sign in to comment.