Correct string won't display in course overview

Correct string won't display in course overview

- Lizotte François の投稿
返信数: 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?

Lizotte François への返信

Re: Correct string won't display in course overview

- Martignoni Nicolas の投稿
画像 Language pack maintainers

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

Did you update your language packs on your Moodle?

Martignoni Nicolas への返信

Re: Correct string won't display in course overview

- Lizotte François の投稿

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

Lizotte François への返信

Re: Correct string won't display in course overview

- Mudrák David の投稿
画像 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.

Mudrák David への返信

Re: Correct string won't display in course overview

- Martignoni Nicolas の投稿
画像 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.

Martignoni Nicolas への返信

Re: Correct string won't display in course overview

- Lizotte François の投稿

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

 

Lizotte François への返信

Re: Correct string won't display in course overview

- Martignoni Nicolas の投稿
画像 Language pack maintainers

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

Thanks, Nicolas