Some Tours strings show up as untranslated
Some translated Tours strings show up as untranslated on languages that have the Tours fully translated. I have
a) double-checked that the downloaded .zip file puts the tours_$LANG.qm in the same dir as instruments and mscore, and
b) contains the translated strings (viewed using Qt Linguist)
How to reproduce
1 mscore -f
2 Update the language you want to switch to
3 Switch to a language that is fully translated (e.g., Deutsch, Afrikaans), or has all 27 Tours strings translated.
4 Reset tours, e.g.
Hilfe > Touren > Touren Zurückzetsen
Help > Toere > Stel Toere terug
5 Restart MuseScore # NB; I have seen that some dialogs and some parts of MuseScore do not update dynamically, and due to caching, show the previous language.
I reproduced on the two biggest Tours, between them containing 14 of the 27 Tours strings, e.g. hopefully the below allows whoever looking at this to find the pattern and fix for all strings.
= Deutsch =
== Main tour ==
(will kick off when you start MuseScore)
De: Willkommen bei MuseScore
De: Das ist die “Partituransicht”
De: Dies sind die Werkzeugleisten.
De: Mit der Werkzeugleiste “Dateibefehle”
De: Mit der Werkzeugleiste “Wiedergabe”
De: Die Werkzeugleiste “Noteneingabe”
De: Mithilfe der Paletten
#En: The inspector allows you to control
De: Das Hauptmenü
#En: That’s the end of this tour
== Palettes tour ==
(click on any of the palette items to kick off)
#En: Welcome to the Palettes.
De: Jede Palette enthält
#En: There are different workspaces
De: Um etwas aus einer Palette
= Afrikaans =
== Main tour ==
(will kick off when you start MuseScore)
Af: Welkom by MuseScore
Af: Hierdie is die partituur-aansig
Af: Hierdie is die nutsbalke
Af: Die Leêerbewerkins-nutsbalk
Af: Die Terugspeel-kontroles-nutsbalk
Af: Die noottoevoer-nutsbalk
Af: Die palette laat jou toe
#En: The inspector allows you to control
Af: Die hoofkieslys
#En: That’s the end of our tour
== Palettes tour ==
(click on any of the palette items to kick off)
#En: Welcome to the Palettes.
Af: Elke palet bevat
#En: There are different workspaces
Af: Om ‘n paletitem by jou partituur te voeg
Comments
I can confirm, should get fixed before release IMHO
I would bet on the fact that the untranslated strings all contains HTML special entities " etc... but I have no idea how to fix it. The quickest route would be to remove the use of double and simple quotes in the source files...
In which case the cure would be what?
No idea...
Not really able to test now, but maybe something like
Might render better with <CPP>
I suppose that @lasconic proposes to decode the string returned by
XmlReader::readXml()
since that function returns HTML-encoded string. I tested the proposed solution and it worked as we need to pass a raw (not HTML-encoded) string toqApp->translate
.However if no XML tags are planned to be used inside
<Text>
tag for tours then we can simply usereadElementText
instead. Are there some plans to use non-escaped XML inside<Text>
tags or is there some other reason not to usereadElementText
?However if no XML tags are planned to be used inside <Text> tag for tours
In this case, I guess the XML should use CDATA and readElementText would work too no ?
Yes, CDATA seems to be read correctly by
readElementText
. So should we switch then toreadElementText
and use CDATA in case we need some extra text markup?I created a PR with the
readElementText
-based solution: https://github.com/musescore/MuseScore/pull/4557.Fixed in branch master, commit 049888f594
fix #280538: fix translation of tours stings with special symbols
Fixed in branch master, commit 98e5a7aba6
Merge pull request #4557 from dmitrio95/280538-tours-translations
fix #280538: fix translation of tours stings with special symbols
Automatically closed -- issue fixed for 2 weeks with no activity.