Error translating multilangforceold

Error translating multilangforceold

per Ralf Krause,
Number of replies: 8
Avatar Language pack maintainers

Hi,

there is an error translating multilangforceold. The text string seems to be read only. I found this old string missing in german, french and other lang packs.

Best regards, Ralf 


multilangforceold | core_admin
Force old multilang syntax: <span> without the class="multilang" and <lang>

In reply to Ralf Krause

Re: Error translating multilangforceold

per koen roggemans,
Avatar Language pack maintainers

Hi Ralph,

I noticed it too. I translated the string several times and it always comes back.

I pinged David about it today. There is obviously something wrong.

Kind regards

Koen

In reply to koen roggemans

Re: Error translating multilangforceold

per German Valero,
Avatar Language pack maintainers
Silly old me!
I checked the history for that string in AMOS for Mexican Spanish: I have already translated the same string seven times!
In reply to German Valero

Re: Error translating multilangforceold

per Ralf Krause,
Avatar Language pack maintainers

In the history I found the following:

4.1+ | de | 2022-06-17 08:20 UTC
Paul Holden <paulh@moodle.com>
MDL-74455 filter_multilang: add text labels for plugin settings. Committed into Git: 2022-04-07 10:58 UTC
commitscript
Alte Syntax für multilang festlegen: ohne &lt;span class="multilang"&gt; und ohne &lt;lang&gt;

In reply to Ralf Krause

Re: Error translating multilangforceold

per Paul Holden,

Hi all,

As per MDL-74455, the [multilangforceold,core_admin] has been deprecated and it's content moved to [forceoldsyntax_desc,filter_multilang]

In reply to Paul Holden

Re: Error translating multilangforceold

per koen roggemans,
Avatar Language pack maintainers
It can be 2 things: either something went wrong with the deprecation process or Amos doesn't process deprecated strings properly.
Fact is that this string shows up as missing in translationn, is perfectly translatable and after committing it to the language pack, it shows up as untranslated missing again, and again, ...
In reply to Ralf Krause

Re: Error translating multilangforceold

per David Mudrák,
Avatar Language pack maintainers

Thanks everyone.

As I just commented in the tracker, this problem was caused by the incorrect usage of the MOV command in the AMOScript present in the commit message - https://github.com/moodle/moodle/commit/1cd65d696f3708ee59b8e5724e1e170cdbd8b0a4

The string was not actually "moved", it still remains in admin.php among other deprecated strings. But the MOV command marked all the translations as deleted which led to buggy behaviour of the AMOS. The string was reported as missing even though it was translated.

This is not so unlikely case and I agree AMOS should be better self-protected from such a misbehaviour. Meanwhile, I fixed this manually in the AMOS database to undo the removal of existing translations.

Thanks everyone for noticing and reporting this!