#5513 NORM Never A: 'Right now' in the journal not translated
Zarro Boogs per Child
bugtracker at laptop.org
Sat Dec 15 13:10:04 EST 2007
#5513: 'Right now' in the journal not translated
------------------------------+---------------------------------------------
Reporter: tomeu | Owner: tomeu
Type: defect | Status: new
Priority: normal | Milestone: Never Assigned
Component: journal-activity | Version:
Keywords: update.1? | Verified: 0
------------------------------+---------------------------------------------
Because of #5512.
Here is a workaround in case #5512 is not fixed in time for update.1:
{{{
diff --git a/misc.py b/misc.py
index b1b8144..ce32dca 100644
--- a/misc.py
+++ b/misc.py
@@ -89,10 +89,6 @@ units = [['%d year', '%d years', 356 * 24 * 60 *
60],
['%d hour', '%d hours', 60 * 60],
['%d minute', '%d minutes', 60]]
-AND = _(' and ')
-COMMA = _(', ')
-RIGHT_NOW = _('Right now')
-
def _get_elapsed_string(timestamp, max_levels=2):
levels = 0
result = ''
@@ -103,9 +99,9 @@ def _get_elapsed_string(timestamp, max_levels=2):
if levels > 0:
if max_levels - levels == 1:
- result += AND
+ result += _(' and ')
else:
- result += COMMA
+ result += _(', ')
result += ngettext(name_singular, name_plural, elapsed_units)
% elapsed_units
@@ -116,7 +112,7 @@ def _get_elapsed_string(timestamp, max_levels=2):
break
if levels == 0:
- return RIGHT_NOW
+ return _('Right now')
return result
}}}
--
Ticket URL: <http://dev.laptop.org/ticket/5513>
One Laptop Per Child <http://dev.laptop.org>
OLPC bug tracking system
More information about the Bugs
mailing list