no origin of language strings shown

no origin of language strings shown

by Connie K. Me -
Number of replies: 6
Hi everyone,

we have encountered some faulty language strings that don't seem to change properly when switching languages: Some entries always remain fixed in the language that was selected while they were created. For the purpose having a look what's going on (and possibly editing them) we turned on the option to "show origin of languages strings" in the debugging mode. But exactly for those strings it doesn't show any origin in the {}-brackets:
They should not be hard coded though as they belong to a plugin. Does anyone know what has happened here and where we need to look to fix it?
Thanks a lot in advance.
Best,
Connie
Average of ratings: -
In reply to Connie K. Me

Re: no origin of language strings shown

by Germán Valero -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
I have found a few cases.
Most Moodle plugin developers would really prefer that their plugins were also available properly translated into other languages.
If you write an issue in the GitHub page of the developers, they usually will modify their source code and change the hard-coded string constants into string variables, which will then be available for translation in AMOS.
Average of ratings: Useful (1)
In reply to Connie K. Me

Re: no origin of language strings shown

by Connie K. Me -
Thank you very much to both of you for the very quick replies. I now contacted the plugin developer but I think the problem might be with my installation since he has provided the necessary strings (here e.g. maxquestattempted/adaptivequiz) in the language pack including the translation. They just don't show the regular behavior. But maybe he knows where that could originate from.
In reply to Connie K. Me

Re: no origin of language strings shown

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
In that case, perpaps you can help by proposing translations of these strings at https://lang.moodle.org/

(The way Moodle works is, if there is not a translation avaiable for a given string, it will fall back to using the English.)
Average of ratings: Useful (1)
In reply to Tim Hunt

Re: no origin of language strings shown

by Connie K. Me -
Thanks for getting back! Actually I already supplied translation strings via AMOS a while ago and they were approved and are now already included in the Moodle system. It was only recently now that I realised that in one particular spot the strings don't switch language together with my whole Moodle site but stay fixed in the language the site was set to at the time of the creation of these entries (here: end of quiz attempts). So for example when I finish an attempt while the Moodle site is being displayed in German the string of the key maxquestattempted/adaptivequiz will stay German even after switching the language to English and vice versa. The same goes for all keys that are displayed in that column where the reasons for stopping the attempt are recorded, e.g. also errorfetchingquest/adaptivequiz. Is that pattern characteristic for something?
Attachment origin of language string missing 2.png
In reply to Connie K. Me

Re: no origin of language strings shown

by Connie K. Me -
I just received answer from the kind person who looks after the plugin code now. It seems to be an issue in the legacy code he is trying to improve in the next release. Thanks again very much for pointing out that it is clearly a problem within the plugin.
Average of ratings: Useful (1)