Permalink
Browse files

MDL-37838 block_courseoverview: fix pluaralisation logic

Note that this kind of handling of plurals is extremely limited, see:

https://moodle.org/mod/forum/discuss.php?d=85897
http://search.cpan.org/~petdance/Locale-Maketext-1.12/lib/Locale/Maketext/TPJ13.pod

However, this is a simple fix to the existing logic
  • Loading branch information...
danpoltawski committed May 12, 2014
1 parent ae3b9e1 commit 133f83d557047ee755cbeeb43c23a585a285df3b
Showing with 2 additions and 2 deletions.
  1. +2 −2 blocks/course_overview/renderer.php
@@ -315,11 +315,11 @@ public function welcome_area($msgcount) {
$plural = 's';
if ($msgcount > 0) {
$output .= get_string('youhavemessages', 'block_course_overview', $msgcount);
} else {
$output .= get_string('youhavenomessages', 'block_course_overview');
if ($msgcount == 1) {
$plural = '';
}
} else {
$output .= get_string('youhavenomessages', 'block_course_overview');
}
$output .= html_writer::link(new moodle_url('/message/index.php'), get_string('message'.$plural, 'block_course_overview'));
$output .= $this->output->box_end();

0 comments on commit 133f83d

Please sign in to comment.