summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2013-03-24 09:00:55 -0700
committerAndrew Dolgov <[email protected]>2013-03-24 09:00:55 -0700
commit8850646ff375f8858442900dac790c5e38e86f88 (patch)
treef6d895a7f31180c14a5baaa0d53c03d746164303 /classes
parent7be3fcd5e1fa6f8ec04fd550543b01622b5e7feb (diff)
parenta28c6ec9db46098ba24940f79bc52c8164d2cf82 (diff)
Merge pull request #77 from scarabeusiv/master
Fix pluralized forms and whitespace in translations and fix the l10n tools
Diffstat (limited to 'classes')
-rw-r--r--classes/pref/feeds.php10
-rw-r--r--classes/pref/users.php6
2 files changed, 7 insertions, 9 deletions
diff --git a/classes/pref/feeds.php b/classes/pref/feeds.php
index 6828e3ff2..ca4ae344f 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();
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 <b>%s</b>
- to <b>%s</b>", $login, $tmp_user_pwd);
+ print T_sprintf("Changed password of user <b>%s</b> to <b>%s</b>", $login, $tmp_user_pwd);
} else {
- print T_sprintf("Sending new password of user <b>%s</b>
- to <b>%s</b>", $login, $email);
+ print T_sprintf("Sending new password of user <b>%s</b> to <b>%s</b>", $login, $email);
}
require_once 'classes/ttrssmailer.php';