diff options
author | Brion Vibber <brion@pobox.com> | 2010-09-15 14:09:52 -0700 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-09-15 14:10:18 -0700 |
commit | 2d4c0f9a47f6534c578a37abe79670cec699caae (patch) | |
tree | 17f04fa3edb11e221a9ae01a32faaa6eb69f843c | |
parent | db1d348135b223585fd96d3c7faac798ca040249 (diff) |
Revert "Add plural support for minutes/hours/days/months ago." -- currently doesn't work and spews error messages
This reverts commit b27882c9166191de4aaea298ba1b1a524cfe9ac7.
-rw-r--r-- | lib/util.php | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/util.php b/lib/util.php index 0b90cb01d..89d2bf8c2 100644 --- a/lib/util.php +++ b/lib/util.php @@ -1105,26 +1105,30 @@ function common_date_string($dt) // TRANS: Used in notices to indicate when the notice was made compared to now. return _('about a minute ago'); } else if ($diff < 3300) { + // XXX: should support plural. // TRANS: Used in notices to indicate when the notice was made compared to now. - return sprintf( ngettext('about one minute ago', 'about %d minutes ago'), round($diff/60)); + return sprintf(_('about %d minutes ago'), round($diff/60)); } else if ($diff < 5400) { // TRANS: Used in notices to indicate when the notice was made compared to now. return _('about an hour ago'); } else if ($diff < 22 * 3600) { + // XXX: should support plural. // TRANS: Used in notices to indicate when the notice was made compared to now. - return sprintf( ngettext('about one hour ago', 'about %d hours ago'), round($diff/3600)); + return sprintf(_('about %d hours ago'), round($diff/3600)); } else if ($diff < 37 * 3600) { // TRANS: Used in notices to indicate when the notice was made compared to now. return _('about a day ago'); } else if ($diff < 24 * 24 * 3600) { + // XXX: should support plural. // TRANS: Used in notices to indicate when the notice was made compared to now. - return sprintf( ngettext('about one day ago', 'about %d days ago'), round($diff/(24*3600))); + return sprintf(_('about %d days ago'), round($diff/(24*3600))); } else if ($diff < 46 * 24 * 3600) { // TRANS: Used in notices to indicate when the notice was made compared to now. return _('about a month ago'); } else if ($diff < 330 * 24 * 3600) { + // XXX: should support plural. // TRANS: Used in notices to indicate when the notice was made compared to now. - return sprintf( ngettext('about one month ago', 'about %d months ago'), round($diff/(30*24*3600))); + return sprintf(_('about %d months ago'), round($diff/(30*24*3600))); } else if ($diff < 480 * 24 * 3600) { // TRANS: Used in notices to indicate when the notice was made compared to now. return _('about a year ago'); |