Correct string won't display in course overview

Correct string won't display in course overview

Lizotte François írta időpontban
Válaszok szám: 8

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?

Válasz erre: Lizotte François

Re: Correct string won't display in course overview

Martignoni Nicolas írta időpontban
Kép

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

Did you update your language packs on your Moodle?

Válasz erre: Martignoni Nicolas

Re: Correct string won't display in course overview

Lizotte François írta időpontban

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...

Válasz erre: Lizotte François

Re: Correct string won't display in course overview

Mudrák David írta időpontban
Kép

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.

Válasz erre: Mudrák David

Re: Correct string won't display in course overview

Martignoni Nicolas írta időpontban
Kép

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.

Válasz erre: Martignoni Nicolas

Re: Correct string won't display in course overview

Lizotte François írta időpontban

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

 

Válasz erre: Lizotte François

Re: Correct string won't display in course overview

Martignoni Nicolas írta időpontban
Kép

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

Thanks, Nicolas