From f5c1fef9cdd1b132af57e4a2d472419caa6f4353 Mon Sep 17 00:00:00 2001 From: Tomas Chvatal Date: Sun, 24 Mar 2013 12:55:53 +0100 Subject: Fix plural forms on feed count. --- classes/pref/feeds.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'classes/pref') diff --git a/classes/pref/feeds.php b/classes/pref/feeds.php index ceda13374..cc23d1292 100644 --- a/classes/pref/feeds.php +++ b/classes/pref/feeds.php @@ -55,7 +55,7 @@ class Pref_Feeds extends Handler_Protected { $cat['items'] = $this->get_category_items($line['id']); - $cat['param'] = T_sprintf('(%d feeds)', count($cat['items'])); + $cat['param'] = vsprintf(ngettext('(%d feed)', '(%d feeds)', count($cat['items'])), count($cat['items'])); if (count($cat['items']) > 0 || $show_empty_cats) array_push($items, $cat); @@ -172,7 +172,7 @@ class Pref_Feeds extends Handler_Protected { $cat['items'] = $this->get_category_items($line['id']); - $cat['param'] = T_sprintf('(%d feeds)', count($cat['items'])); + $cat['param'] = vsprintf(ngettext('(%d feed)', '(%d feeds)', count($cat['items'])), count($cat['items'])); if (count($cat['items']) > 0 || $show_empty_cats) array_push($root['items'], $cat); @@ -214,13 +214,13 @@ class Pref_Feeds extends Handler_Protected { array_push($cat['items'], $feed); } - $cat['param'] = T_sprintf('(%d feeds)', count($cat['items'])); + $cat['param'] = vsprintf(ngettext('(%d feed)', '(%d feeds)', count($cat['items'])), count($cat['items'])); if (count($cat['items']) > 0 || $show_empty_cats) array_push($root['items'], $cat); $root['param'] += count($cat['items']); - $root['param'] = T_sprintf('(%d feeds)', $root['param']); + $root['param'] = vsprintf(ngettext('(%d feed)', '(%d feeds)', count($cat['items'])), count($cat['items'])); } else { $feed_result = db_query($this->link, "SELECT id, title, last_error, @@ -245,7 +245,7 @@ class Pref_Feeds extends Handler_Protected { array_push($root['items'], $feed); } - $root['param'] = T_sprintf('(%d feeds)', count($root['items'])); + $root['param'] = vsprintf(ngettext('(%d feed)', '(%d feeds)', count($cat['items'])), count($cat['items'])); } $fl = array(); -- cgit v1.2.3-54-g00ecf From 18446943514dc14e6e713e1013987768fbc6bb32 Mon Sep 17 00:00:00 2001 From: Tomas Chvatal Date: Sun, 24 Mar 2013 13:37:40 +0100 Subject: gettext whitespace fix --- classes/pref/users.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'classes/pref') diff --git a/classes/pref/users.php b/classes/pref/users.php index 51493a273..4055bca45 100644 --- a/classes/pref/users.php +++ b/classes/pref/users.php @@ -288,11 +288,9 @@ class Pref_Users extends Handler_Protected { WHERE id = '$uid'"); if ($show_password) { - print T_sprintf("Changed password of user %s - to %s", $login, $tmp_user_pwd); + print T_sprintf("Changed password of user %s to %s", $login, $tmp_user_pwd); } else { - print T_sprintf("Sending new password of user %s - to %s", $login, $email); + print T_sprintf("Sending new password of user %s to %s", $login, $email); } require_once 'classes/ttrssmailer.php'; -- cgit v1.2.3-54-g00ecf