[hamster-applet] plurals for the reminder preference in minutes



commit 24ac20287b890c0d3e94ef07786264fb2071569b
Author: Toms Bauģis <toms baugis gmail com>
Date:   Sat May 21 15:42:22 2011 +0300

    plurals for the reminder preference in minutes

 src/hamster/preferences.py |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/hamster/preferences.py b/src/hamster/preferences.py
index 3e9e757..b34e190 100755
--- a/src/hamster/preferences.py
+++ b/src/hamster/preferences.py
@@ -32,6 +32,8 @@ try:
 except:
     wnck = None
 
+from gettext import ngettext
+
 def get_prev(selection, model):
     (model, iter) = selection.get_selected()
 
@@ -696,7 +698,9 @@ class PreferencesEditor:
     def on_notify_interval_format_value(self, slider, value):
         if value <=120:
             # notify interval slider value label
-            label = _(u"%(interval_minutes)d minutes") % {'interval_minutes': value}
+            label = ngettext("%(interval_minutes)d minute",
+                             "%(interval_minutes)d minutes",
+                             value) % {'interval_minutes': value}
         else:
             # notify interval slider value label
             label = _(u"Never")



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]