(Some) Contributed plugins are not automatically imported into AMOS

(Some) Contributed plugins are not automatically imported into AMOS

Valero German -
Кількість відповідей: 20
Фото Language pack maintainers

Hi David,

I am sorry to bother you again, but I have contacted the developers for some plugins whose English language strings are not available for translation in AMOS and they do not  seem to find where the problem is.


So far, the census report (https://moodle.org/plugins/view.php?plugin=block_censusreport) AJAX marking (https://moodle.org/plugins/view.php?plugin=block_ajax_marking), user information (https://moodle.org/plugins/view.php?plugin=block_userinfo) and tutorship in the old plugins database (https://moodle.org/mod/data/view.php?d=13&rid=4347) are the plugins with this problem.

I realize the tutorship plugin in the old plugins database is out of reach for AMOS, but the other three modules would benefit from having translations available in languages other than English.

Is there any other page with instructions for plugin developers which deals with the proper way to use English and foreign language strings besides http://lang.moodle.org/mod/forum/discuss.php?d=2485 , which I could direct them to ?

I would really appreciate your help.

Thanks in advance.

У відповідь на Valero German

Re: (Some) Contributed plugins are not automatically imported into AMOS

Mudrák David -
Фото Language pack maintainers
Hi German

I looked at the plugins code and this is what caught my eyes:

* https://github.com/mattgibson/moodle-block_ajax_marking/blob/MOODLE_23_STABLE/lang/en/block_ajax_marking.php#L53 - invalid concatenation of strings using the dot operator
* https://github.com/remotelearner/moodle-block_censusreport/blob/MOODLE_23_STABLE/lang/en/block_censusreport.php#L54 - invalid concatenation of strings using the dot operator

With regards to the User information block, its string file is valid. I'm not quite sure why it has not been sent into AMOS. I have a suspicion that the block has set 1.9 as the Moodle version it is intended for, together with 2.x versions. That might be the reason why that version has not been pushed into AMOS (because it does not accept any 1.x versions).

And correct, plugins in the old Plugins directory are not being registered with AMOS. Maintainers have to publish them in the new Plugins directory.

I will appreciate if you pass this information to the maintainers of the first two blocks and ask them to release a fix version of their plugin. Thanks for your help!
У відповідь на Mudrák David

Re: (Some) Contributed plugins are not automatically imported into AMOS

Valero German -
Фото Language pack maintainers

Thanks David,

I will contact the plugin maintainers and pass them the information you discovered.

У відповідь на Valero German

Re: (Some) Contributed plugins are not automatically imported into AMOS

Valero German -
Фото Language pack maintainers

Hi David,

I found some weird situation with the multinumerical question type plugin (https://moodle.org/plugins/pluginversions.php?plugin=qtype_multinumerical). I contacted the author but we could not find the cause of the problem.

The author (Nicolas Dunand) has included the English strings correctly in the En folder (he also included a french translation folder).

The plugin is marked as available for Moodle 2.3, 2.2, 2.1 and (in other version files for 2.0 and 1.9), but AMOS only shows the 2.0 branch as available for translation, and that branch has a funny looking string in french language within [multinumerical_help,qtype_multinumerical].

It seems Moodle is pushing only the wrong (old) 1.9 or 2.0 version of the string into AMOS.

Could you please check into it and suggest a solution.

Thanks in advance for your help.

У відповідь на Valero German

Re: (Some) Contributed plugins are not automatically imported into AMOS

Mudrák David -
Фото Language pack maintainers

Hi German

This strings syntax is not supported by AMOS: https://github.com/ndunand/moodle-qtype_multinumerical/blob/master/lang/en/qtype_multinumerical.php#L50

String definition must use the simple form of

$string['stringid'] = 'String value';

The heredoc syntax or concatenation operators are not supported by the AMOS parser.

The maintainer of the plugin has to fix this issue and release a new version of the plugin at moodle.org/Plugins directory.

У відповідь на Mudrák David

Re: (Some) Contributed plugins are not automatically imported into AMOS

Rézeau Joseph -

Hi David (and German).

Since Moodle 2, Help files have been removed from the plugins /lang/language/help folders. Contributors are invited to use the $string['somestring_help'] strings instead. I expect what has happened in the qtype_multinumerical lang file is that the contributor has copied-pasted the contents of his former help file into that string, hence the various problems.

The real problem is that the contents of a $string['somestring_help'] string must be SHORT and formatting is limited to a strict minimum. Contributors are invited to place more detailed help (including e.g. images) into the Documentation wiki. Since this question type seems to need more detailed documentation than can be contained inside a help string, the author (Nicolas Dunand) should be encouraged to create a specific page in the Moodle Documentation Wiki. I have written to him in this regard.

Joseph

У відповідь на Rézeau Joseph

Re: (Some) Contributed plugins are not automatically imported into AMOS

Dunand Nicolas -

Hi all,

German and Joseph, thanks for bringing this to my attention. Thanks David for pointing out what the problem was.

I therefore have updated my plugin and submitted the new version to the official plugins database. It seems that AMOS has imported all lang strings correctly.

У відповідь на Dunand Nicolas

Re: (Some) Contributed plugins are not automatically imported into AMOS

Valero German -
Фото Language pack maintainers

Thanks David,усміхаюсь

Thanks Joseph,усміхаюсь

Thanks Nicolas,усміхаюсь

I was able to translate into Spanish all the English strings for all Moodle 2.x branches for the multinumerical question type plugin.

One minor bug remains: The 2.0 branch still has the English help string [multinumerical_help,qtype_multinumerical] (How this works) in French. All other branches have this string in English. дивуюсь

Thank you all and greetings from México.

У відповідь на Mudrák David

Re: (Some) Contributed plugins are not automatically imported into AMOS

Valero German -
Фото Language pack maintainers

Hi David,

I can not find in AMOS the English language strings for translating the green theme plugin (https://moodle.org/plugins/view.php?plugin=theme_green). I looked into the plugin /lang/en folder and the strings seem to be there, but when I tried to make a local translation, I had the following DATABASE WRITING ERRORS:

  • line 427 of \lib\dml\moodle_database.php: dml_write_exception thrown
  • line 1107 of \lib\dml\mysqli_native_moodle_database.php: call to moodle_database->query_end()
  • line 1149 of \lib\dml\mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw()
  • line 190 of \admin\tool\customlang\locallib.php: call to mysqli_native_moodle_database->insert_record()
  • line 60 of \admin\tool\customlang\index.php: call to tool_customlang_utils::checkout()

When I removed the green theme plugin, the error disappeared.

There is obviously something very wrong with the code  for this plugin. Can you please help me point the author in the right direction, so that he will correct it?

Thanks in advance.

У відповідь на Valero German

Re: (Some) Contributed plugins are not automatically imported into AMOS

Mudrák David -
Фото Language pack maintainers
The one malicious thing might be the string['choosereadme'] in the English pack. Can you try to replace it with an empty string and see how it goes then? Please do not forget to purge local caches after you modify the string file and only then try to checkout strings.
У відповідь на Mudrák David

Re: (Some) Contributed plugins are not automatically imported into AMOS

Valero German -
Фото Language pack maintainers

Hi David,

theme_aaradyha (https://moodle.org/plugins/pluginversion.php?id=917) misses the following English language strings which should be available for translation in AMOS and also for local language modification:

 Custom header theme_aaradyha | masthead  and its associated default value string
 Custom CSS theme_aaradyha | customcss and its associated default value string
 Custom footer theme_aaradyha | footnote and its associated default value string
 
Oddly, the string  (spanish translation = Ítems del menú personalizado)  theme_aaradyha | custommenuitems appears as already translated in spite of not being available for local or AMOS translation ???

I am really perplexed дивуюсь.

I creted issue CONTRIB-4040 at tracker.


UPDATE: It seems the error happened because I have a local 2.4dev branch where I was checking the English strings and making local language modifications before uploading the PHP file to AMOS.

AMOS does show the mentioned strings correctly.

My mistake. I apologize сумую

У відповідь на Valero German

Re: (Some) Contributed plugins are not automatically imported into AMOS

Valero German -
Фото Language pack maintainers

Hi David,

I tried to translate the plugin Certificates Wall (https://moodle.org/plugins/view.php?plugin=mod_certificateswall) but the English strings are not available in AMOS even though they are within the plugin lang/en folder available for local language edition.

Would you be so kind as to check what the problem is with this module so that I can ask the author to correct it ?

And, I wonder if it would not be a good idea (or too much work) to document the problems and solutions seen with all the plugins discussed in this thread in the documentation of instructions for programmers wishing to contribute plugins for Moodle задумався.

Thanks in advance.

У відповідь на Valero German

Re: (Some) Contributed plugins are not automatically imported into AMOS

Valero German -
Фото Language pack maintainers

Hi David,

I translated the language strings for the DataPlus plugin (https://moodle.org/plugins/pluginversions.php?plugin=mod_dataplus) for Moodle branches 2.0 and 2.1 but the strings for the 2.3 branch are not available in AMOS, even though the plugin itself has a specific version file available for the 2.3 branch in the Moodle plugins database, and it does contain the English language strings within the lang/en folder of the zip file.

Could you please look into it so that we can tell the author how to fix it ?

Thanks in advance.

У відповідь на Valero German

Re: (Some) Contributed plugins are not automatically imported into AMOS

Valero German -
Фото Language pack maintainers

Hi David,

The Vmoodle block (https://moodle.org/plugins/view.php?plugin=local_externalzip) does not have the English strings available for translation in AMOS, even though the English strings do seem to be in the right /lang/en folder within the plugin files. The author even has a /lang/fr translation.

Could you please find out what is wrong with this plugin so that the author can be told and fix it ?

Thanks in advance.

У відповідь на Valero German

Re: (Some) Contributed plugins are not automatically imported into AMOS

Valero German -
Фото Language pack maintainers

Hi David,

The module Certificates Wall (https://moodle.org/plugins/view.php?plugin=mod_certificateswall) does not have the English language strings available in AMOS, even though they do appear within the /lang/en folder of the module ZIP file, and are available for local language customization if installed.

This module has had quite a few downloads (total=1341), so I think many sites might like to have trnslations for it.

Would you please check what is wrong with it, so that the mainatiner can be made aware and fix it?

Thanks in advance for your help.

У відповідь на Valero German

Re: (Some) Contributed plugins are not automatically imported into AMOS

Valero German -
Фото Language pack maintainers

Hi David,

I am sorry to bother you again, but the navigation buttons plugin (https://moodle.org/plugins/view.php?plugin=block_navbuttons) does not have the English language strings available for translation in AMOS, and it seems to be very useful plugin.

I would really appreciatte your help in diagnosing the cause for the problem, so that the author (Davo Smith) can fix it.

Thanks in advance and Happy New Year усміхаюсь

У відповідь на Valero German

Re: (Some) Contributed plugins are not automatically imported into AMOS

Valero German -
Фото Language pack maintainers

Hi David,

Davo Smith just opened a tracker issue https://tracker.moodle.org/browse/MDLSITE-2072 about the navigation buttons plugin not having the English language strings available in AMOS, because he can not find out the cause of the problem. Your expertise will be greatly appreciatted for solving this problem

Happy New Year усміхаюсь

У відповідь на Valero German

Re: (Some) Contributed plugins are not automatically imported into AMOS

Valero German -
Фото Language pack maintainers

Hi David,

The booking add-on is listed in the plugins database as released for 2.0 to 2.4 branches, (https://moodle.org/plugins/view.php?plugin=mod_booking) but AMOS only has 2.0 to 2.3 strings,  and the 2.4 strings are not available for translation сумую .

Would you be so kind as to have a loook at it and show us what needs to be done by the plugin author?

Thanks in advance.