From 11a325c6735eaa94bb590fe00d47b22d249c48b0 Mon Sep 17 00:00:00 2001 From: Dan Poltawski Date: Mon, 12 May 2014 17:42:14 +0800 Subject: [PATCH] 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 --- blocks/course_overview/renderer.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/blocks/course_overview/renderer.php b/blocks/course_overview/renderer.php index 3efcd95f5e7..76ef098c1db 100644 --- a/blocks/course_overview/renderer.php +++ b/blocks/course_overview/renderer.php @@ -315,11 +315,11 @@ class block_course_overview_renderer extends plugin_renderer_base { $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();