Using AMOS tool for language pack translation

Correct string won't display in course overview

 
Picture of François Lizotte
Correct string won't display in course overview
by François Lizotte - Tuesday, 5 November 2013, 1:09 AM
 

I translated the Journal module to French (fr) last week. 

After updating, I get the French version in Moodle. 

But in the Course Overview block, I keep getting "Journals" (modulenameplural) instead of "Journaux".

Could it be related to the way Course Overview fetches the module name?

Nicolas
Re: Correct string won't display in course overview
by Nicolas Martignoni - Tuesday, 5 November 2013, 5:21 AM
Language pack maintainers

I just verified that the correct translation is indeed correctly in AMOS.

Did you update your language packs on your Moodle?

Picture of François Lizotte
Re: Correct string won't display in course overview
by François Lizotte - Wednesday, 6 November 2013, 2:29 AM
 

Sure. I updated right after you accepted my translation. And it works since the module is now in French, except for this warning in Course Overview.

I emptied Moodle cache as well. 

Mystère...

Picture of David Mudrák
Re: Correct string won't display in course overview
by David Mudrák - Wednesday, 6 November 2013, 5:33 AM
Language pack maintainers

Hi François

I have a suspicion that this is a symptom of a known stupid bug in the Course overview block. When it displays the overview of activities, it firstly check if the activity itself provide a string "activityoverview". If there is not such string, the block uses it's own string

$string['activityoverview'] = 'You have {$a}s that need attention';

where it fills the placeholder with the name of the module. This string is translated into French as

Vous avez des {$a}s qui requièrent votre attention

including the "s" after the placeholder. So the block puts the localized module name ("Journal" in your case) into that string followed by the "s" and it looks like "Journals".

The French language pack should be probably fixed as the "s" should not be there, I guess.

The silly thing is that it should not be in the English pack too, of course. Note that even in English, it is likely to produce incorrect plurals like "HotPotatos", "Glossarys" or "Quizs". Better alternatives would be

$string['activityoverview'] = 'You have {$a} modules that need attention';

or using the proper modulenameplural or so.

Note this has been partially addressed by MDL-38480 but MDL-36282 is still open. And looking at http://lang.moodle.org/local/amos/view.php?t=1383687123&v=2500&l=%2A&c=block_course_overview%2Cjournal&s=&d=activityoverview suggests there are other languages that have put the "s" after the placeholder incorrectly.

Nicolas
Re: Correct string won't display in course overview
by Nicolas Martignoni - Thursday, 7 November 2013, 1:37 AM
Language pack maintainers

As a quick fix, I've changed the french translation of this string in the Course overview block. Thanks for the tip, David.

@François: please update your fr lang pack in 1-2 hours to see if this fixes your problem.

Picture of François Lizotte
Re: Correct string won't display in course overview
by François Lizotte - Thursday, 7 November 2013, 2:26 AM
 

We are getting close.

capture

In French

Une formule générique comme "Vous avez des modules du type Journal qui requièrent votre attention" conviendrait.

Merci

François

 

Nicolas
Re: Correct string won't display in course overview
by Nicolas Martignoni - Thursday, 7 November 2013, 4:11 AM
Language pack maintainers

Oui, je vois et vais corriger tout de suite. Merci. 

Nicolas

Nicolas
Re: Correct string won't display in course overview
by Nicolas Martignoni - Thursday, 7 November 2013, 4:20 AM
Language pack maintainers

Done. Don't forget to update your lang pack in a while. 

Thanks, Nicolas

Picture of François Lizotte
Re: Correct string won't display in course overview
by François Lizotte - Thursday, 7 November 2013, 8:58 PM
 

Beautiful ! Merci Nicolas.

 

Thank you David for pointing the bug.

François