Plugin strings don't get ported over to new major versions if they have been changed between versions

Plugin strings don't get ported over to new major versions if they have been changed between versions

by Alexander Bias -
Number of replies: 5

Hi all, especially hi David,

today, I noticed a behavior of AMOS which I did not know before and which was somehow unexpected to me.

Prerequisites:

  • I have a plugin which is published to the Moodle plugin repo for (and only for) Moodle 3.6
  • For Moodle 3.6, all plugin strings are translated in AMOS

Steps to reproduce:

  • I publish an upgrade to this plugin to the Moodle plugin repo for (and only for) Moodle 3.7
  • Within this plugin upgrade, I have fixed some typos and other really minor things within the plugin language pack. The string identifiers in the plugin language pack were not changed at all.

Expected result:

  • All plugin strings which have not been modified between the plugin versions are transferred to the 3.7 language pack.
  • All plugin strings which have been modified between the plugin versions are also transferred to the 3.7 language pack and it's up to me as translator to fix the translation like I have to do with all modifications in the english language pack.

Actual result:

  • All plugin strings which have not been modified between the plugin versions are transferred to the 3.7 language pack.
  • All plugin strings which have been modified between the plugin versions are not transferred to the 3.7 language pack and have to be translated from scratch.
Example:

  • This happened with our plugin local_bulkenrol
  • Strings like "enrolplugin" were transferred from 3.6 to 3.7 without problem.
  • Strings like "bulkenrol_form_intro" which were modified during the upgrade appear as not translated in 3.7.


I am wondering if this behavior has been always this way or if it is something new which I simply did not notice before.
I am also wondering if I am the only one who would expect it to work differently as it does at the moment.

The risk which I am seeing (and what happened to me during the plugin upgrade) is that the translator forgets to translate the plugin after the Moodle version upgrade and will also have an effort overhead to fetch the translation from a previous version to paste it into the current version.

Cheers,
Alex

In reply to Alexander Bias

Re: Plugin strings don't get ported over to new major versions if they have been changed between versions

by David Mudrák -
Picture of Language pack maintainers

Yes, that's the expected behaviour and IIRC it has been like that since this auto-propagation feature exists. The reasoning behind this conservative behaviour is that AMOS should not assume that the translation of the original string still applies after the English was changed - maybe it was more than a typo fix.

I can see this looks counter-intuitive especially as it is different from how the Moodle standard components are handled. I can't recall now if there was also a technical reason for this, but probably not.

In reply to David Mudrák

Er: Re: Plugin strings don't get ported over to new major versions if they have been changed between versions

by Iñigo Zendegi Urzelai -

Thanks David for the explanation, as a translator I've had a déjà-vu sensation when translating non-core plugins and I understand now why is that happening.

I agree with Alexander about the risks of this behaviour and as a translator I also find it quite annoying. I think it would be better if plugin strings were treated the same way standard strings are (marked as outdated when the English string is changed), because in that way the translator doesn't start from scratch and can also check the timeline of the string and find out exactly what change has been done.

I don't know technically what should be done to change this behaviour, but if it's not a big deal I think I'll make translators a little bit happier wink


In reply to Iñigo Zendegi Urzelai

Re: Plugin strings don't get ported over to new major versions if they have been changed between versions

by Séverin Terrier -

Hi,

Like you, i'm glad that David explained how it works (and why), but i'm totally ok with your proposition.

I think it's risky to loose existing translations. And i suppose that, most of the time, plugins maintainer do small corrections (typos...), and don't reuse the same string identifier for a completly different string.

Séverin

In reply to Séverin Terrier

Re: Plugin strings don't get ported over to new major versions if they have been changed between versions

by Alexander Bias -

Hi all,

thank you for adding your feedback and for confirming my thoughts.

I would now create a MDLSITE issue to let David think about changing this behaviour for plugins, but before that I am wondering if plugin language strings are handled differently from core language strings during auto-propagation. Normally, I don't translate core language strings myself after they have been auto-propagated, so I simply don't know.

Thus, dear core language pack maintainers, can anyone of you tell if this also happens for core strings? If not, this would be another argument to have the behaviour changed for plugins.

Thanks,
Alex

In reply to Séverin Terrier

Re: Plugin strings don't get ported over to new major versions if they have been changed between versions

by Séverin Terrier -

Hi,

Just to add that, sometimes, new strings just correct some typos, and these errors didn't exist in translation.

Séverin