diff options
author | Marco Pesenti Gritti <marco@localhost.localdomain> | 2008-08-11 16:36:37 (GMT) |
---|---|---|
committer | Marco Pesenti Gritti <marco@localhost.localdomain> | 2008-08-11 16:36:37 (GMT) |
commit | b4aeb6038d04616cb250e08d44dd639b8261e3b4 (patch) | |
tree | 9135c20524bb0773acec41c0c6242629dd8cd1a6 /src | |
parent | 8afa8c77d214c8ac1c21bf3b792e494606f33753 (diff) | |
parent | 4114ef699d4f9fa009d5ee77eb56e9ae26ccbc3e (diff) |
Merge branch 'master' of git+ssh://dev.laptop.org/git/sugar-toolkit
Diffstat (limited to 'src')
-rw-r--r-- | src/sugar/util.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/sugar/util.py b/src/sugar/util.py index 2706b5d..67653d9 100644 --- a/src/sugar/util.py +++ b/src/sugar/util.py @@ -22,7 +22,9 @@ import random import binascii import gettext -_ = gettext.gettext +_ = lambda msg: gettext.dgettext('sugar-toolkit', msg) +_ngettext = lambda msg1, msg2, n: gettext.dngettext('sugar-toolkit', msg1, msg2, n) + def printable_hash(in_hash): """Convert binary hash data into printable characters.""" @@ -228,8 +230,8 @@ def timestamp_to_elapsed_string(timestamp, max_levels=2): if levels > 0: time_period += COMMA - time_period += gettext.ngettext(name_singular, name_plural, - elapsed_units) % elapsed_units + time_period += _ngettext(name_singular, name_plural, + elapsed_units) % elapsed_units elapsed_seconds -= elapsed_units * factor |