Skip to content

Commit

Permalink
Translations: Use substitutions instead of concatenations
Browse files Browse the repository at this point in the history
Fixes: #1114
Co-Authored-By: Peter L Jones <pljones@users.noreply.github.com>
Co-Authored-By: Gary Wang <wzc782970009@gmail.com>
  • Loading branch information
3 people committed Jun 8, 2022
1 parent 784dec7 commit 033afea
Show file tree
Hide file tree
Showing 13 changed files with 47 additions and 47 deletions.
4 changes: 2 additions & 2 deletions src/audiomixerboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1173,7 +1173,7 @@ void CAudioMixerBoard::UpdateTitle()

if ( eRecorderState == RS_RECORDING )
{
strTitlePrefix = "[" + tr ( "RECORDING ACTIVE" ) + "] ";
strTitlePrefix = QString ( "[%1] " ).arg ( tr ( "RECORDING ACTIVE" ) );
}

// replace & signs with && (See Qt documentation for QLabel)
Expand All @@ -1183,7 +1183,7 @@ void CAudioMixerBoard::UpdateTitle()
QString strEscServerName = strServerName;
strEscServerName.replace ( "&", "&&" );

setTitle ( strTitlePrefix + tr ( "Personal Mix at: " ) + strEscServerName );
setTitle ( strTitlePrefix + tr ( "Personal Mix at: %1" ).arg ( strEscServerName ) );
setAccessibleName ( title() );
}

Expand Down
8 changes: 4 additions & 4 deletions src/translation/translation_de_DE.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,8 @@
</message>
<message>
<location filename="../../audiomixerboard.cpp" line="1181"/>
<source>Personal Mix at: </source>
<translation>Eigener Mix am Server: </translation>
<source>Personal Mix at: %1</source>
<translation>Eigener Mix am Server: %1</translation>
</message>
</context>
<context>
Expand Down Expand Up @@ -4485,8 +4485,8 @@ Wir haben Deinen Kanal stummgeschaltet und die Funktion &apos;Stummschalten&apos
<name>QCoreApplication</name>
<message>
<location filename="../../util.cpp" line="1926"/>
<source>, Version </source>
<translation>, Version </translation>
<source>%1, Version %2</source>
<translation>%1, Version %2</translation>
</message>
<message>
<location filename="../../util.cpp" line="1939"/>
Expand Down
8 changes: 4 additions & 4 deletions src/translation/translation_es_ES.ts
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,8 @@
</message>
<message>
<location filename="../../audiomixerboard.cpp" line="1181"/>
<source>Personal Mix at: </source>
<translation>Mezcla Personal en el Servidor: </translation>
<source>Personal Mix at: %1</source>
<translation>Mezcla Personal en el Servidor: %1</translation>
</message>
</context>
<context>
Expand Down Expand Up @@ -4541,8 +4541,8 @@ Hemos silenciado tu canal y activado &apos;Silenciarme Yo&apos;. Por favor resue
<name>QCoreApplication</name>
<message>
<location filename="../../util.cpp" line="1926"/>
<source>, Version </source>
<translation>, Versión </translation>
<source>%1, Version %2</source>
<translation>%1, Versión %2</translation>
</message>
<message>
<location filename="../../util.cpp" line="1939"/>
Expand Down
8 changes: 4 additions & 4 deletions src/translation/translation_fr_FR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,8 @@
</message>
<message>
<location filename="../../audiomixerboard.cpp" line="1181"/>
<source>Personal Mix at: </source>
<translation>Mixage personnel à : </translation>
<source>Personal Mix at: %1</source>
<translation>Mixage personnel à : %1</translation>
</message>
</context>
<context>
Expand Down Expand Up @@ -3921,8 +3921,8 @@ Nous avons coupé votre canal et activé &quot;Me silencer&quot;. Veuillez d&apo
<name>QCoreApplication</name>
<message>
<location filename="../../util.cpp" line="1926"/>
<source>, Version </source>
<translation>, version </translation>
<source>%1, Version %2</source>
<translation>%1, version %2</translation>
</message>
<message>
<location filename="../../util.cpp" line="1939"/>
Expand Down
8 changes: 4 additions & 4 deletions src/translation/translation_it_IT.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,8 @@
</message>
<message>
<location filename="../../audiomixerboard.cpp" line="1181"/>
<source>Personal Mix at: </source>
<translation>Mixer personale sul Server: </translation>
<source>Personal Mix at: %1</source>
<translation>Mixer personale sul Server: %1</translation>
</message>
</context>
<context>
Expand Down Expand Up @@ -4482,8 +4482,8 @@ E&apos; stato disattivato l&apos;audio del tuo canale ed inserito il &quot;Disat
<name>QCoreApplication</name>
<message>
<location filename="../../util.cpp" line="1926"/>
<source>, Version </source>
<translation>Versione, Versione </translation>
<source>%1, Version %2</source>
<translation>%1 Versione, Versione %2</translation>
</message>
<message>
<location filename="../../util.cpp" line="1939"/>
Expand Down
8 changes: 4 additions & 4 deletions src/translation/translation_nl_NL.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,8 @@
</message>
<message>
<location filename="../../audiomixerboard.cpp" line="1181"/>
<source>Personal Mix at: </source>
<translation>Eigen mix op: </translation>
<source>Personal Mix at: %1</source>
<translation>Eigen mix op: %1</translation>
</message>
</context>
<context>
Expand Down Expand Up @@ -4489,8 +4489,8 @@ We hebben uw kanaal gedempt en &apos;Demp mijzelf&apos; geactiveerd. Los eerst h
<name>QCoreApplication</name>
<message>
<location filename="../../util.cpp" line="1926"/>
<source>, Version </source>
<translation>, Versie </translation>
<source>%1, Version %2</source>
<translation>%1, Versie %2</translation>
</message>
<message>
<location filename="../../util.cpp" line="1939"/>
Expand Down
8 changes: 4 additions & 4 deletions src/translation/translation_pl_PL.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,8 @@
</message>
<message>
<location filename="../../audiomixerboard.cpp" line="1181"/>
<source>Personal Mix at: </source>
<translation>Własny miks na: </translation>
<source>Personal Mix at: %1</source>
<translation>Własny miks na: %1</translation>
</message>
</context>
<context>
Expand Down Expand Up @@ -3976,8 +3976,8 @@ Twój kanał został wyciszony i włączono „Wycisz mnie”. Napraw przyczynę
<name>QCoreApplication</name>
<message>
<location filename="../../util.cpp" line="1926"/>
<source>, Version </source>
<translation>, Wersja </translation>
<source>%1, Version %2</source>
<translation>%1, Wersja %2</translation>
</message>
<message>
<location filename="../../util.cpp" line="1939"/>
Expand Down
8 changes: 4 additions & 4 deletions src/translation/translation_pt_BR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,8 @@
</message>
<message>
<location filename="../../audiomixerboard.cpp" line="1181"/>
<source>Personal Mix at: </source>
<translation>Mixagem Pessoal em: </translation>
<source>Personal Mix at: %1</source>
<translation>Mixagem Pessoal em: %1</translation>
</message>
</context>
<context>
Expand Down Expand Up @@ -4519,8 +4519,8 @@ Silenciamos seu canal e ativamos &apos;Silenciar-me&apos;. Resolva o problema de
<name>QCoreApplication</name>
<message>
<location filename="../../util.cpp" line="1926"/>
<source>, Version </source>
<translation>, Versão </translation>
<source>%1, Version %2</source>
<translation>%1, Versão %2</translation>
</message>
<message>
<location filename="../../util.cpp" line="1939"/>
Expand Down
8 changes: 4 additions & 4 deletions src/translation/translation_pt_PT.ts
Original file line number Diff line number Diff line change
Expand Up @@ -261,8 +261,8 @@
</message>
<message>
<location filename="../../audiomixerboard.cpp" line="1181"/>
<source>Personal Mix at: </source>
<translation>Mistura Pessoal no Servidor: </translation>
<source>Personal Mix at: %1</source>
<translation>Mistura Pessoal no Servidor: %1</translation>
</message>
</context>
<context>
Expand Down Expand Up @@ -4477,8 +4477,8 @@ O seu canal foi silenciado e foi activada a função &apos;Silenciar-me&apos;. P
<name>QCoreApplication</name>
<message>
<location filename="../../util.cpp" line="1926"/>
<source>, Version </source>
<translation>, Versão </translation>
<source>%1, Version %2</source>
<translation>%1, Versão %2</translation>
</message>
<message>
<location filename="../../util.cpp" line="1939"/>
Expand Down
8 changes: 4 additions & 4 deletions src/translation/translation_sk_SK.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,8 @@
</message>
<message>
<location filename="../../audiomixerboard.cpp" line="1181"/>
<source>Personal Mix at: </source>
<translation>Osobný mix na: </translation>
<source>Personal Mix at: %1</source>
<translation>Osobný mix na: %1</translation>
</message>
</context>
<context>
Expand Down Expand Up @@ -3769,8 +3769,8 @@ Stíšili sme váš kanál a aktivovali nastavenia &apos;Stíšiť ma&apos;. Pro
<name>QCoreApplication</name>
<message>
<location filename="../../util.cpp" line="1926"/>
<source>, Version </source>
<translation>, Verzia </translation>
<source>%1, Version %2</source>
<translation>%1, Verzia %2</translation>
</message>
<message>
<location filename="../../util.cpp" line="1939"/>
Expand Down
8 changes: 4 additions & 4 deletions src/translation/translation_sv_SE.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,8 @@
</message>
<message>
<location filename="../../audiomixerboard.cpp" line="1181"/>
<source>Personal Mix at: </source>
<translation>Personlig mix på: </translation>
<source>Personal Mix at: %1</source>
<translation>Personlig mix på: %1</translation>
</message>
</context>
<context>
Expand Down Expand Up @@ -4116,8 +4116,8 @@ Vi stängde av din kanal och aktiverade &apos;Tysta mig själv&apos;. Vänligen
<name>QCoreApplication</name>
<message>
<location filename="../../util.cpp" line="1926"/>
<source>, Version </source>
<translation>, Version </translation>
<source>%1, Version %2</source>
<translation>%1, Version %2</translation>
</message>
<message>
<location filename="../../util.cpp" line="1939"/>
Expand Down
8 changes: 4 additions & 4 deletions src/translation/translation_zh_CN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,8 @@
</message>
<message>
<location filename="../../audiomixerboard.cpp" line="1181"/>
<source>Personal Mix at: </source>
<translation>个人混音室: </translation>
<source>Personal Mix at: %1</source>
<translation>个人混音室: %1</translation>
</message>
</context>
<context>
Expand Down Expand Up @@ -3288,8 +3288,8 @@ We muted your channel and activated &apos;Mute Myself&apos;. Please solve the fe
<name>QCoreApplication</name>
<message>
<location filename="../../util.cpp" line="1926"/>
<source>, Version </source>
<translation>,版本 </translation>
<source>%1, Version %2</source>
<translation>%1,版本 %2</translation>
</message>
<message>
<location filename="../../util.cpp" line="1939"/>
Expand Down
2 changes: 1 addition & 1 deletion src/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1562,7 +1562,7 @@ QString GetVersionAndNameStr ( const bool bDisplayInGui )
strVersionText += " *** ";
}

strVersionText += APP_NAME + QCoreApplication::tr ( ", Version " ) + VERSION;
strVersionText += QCoreApplication::tr ( "%1, Version %2", "%1 is app name, %2 is version number" ).arg ( APP_NAME ).arg ( VERSION );

if ( bDisplayInGui )
{
Expand Down

0 comments on commit 033afea

Please sign in to comment.