[nanny] Use plural forms in SystrayNanny
- From: Roberto Majadas <telemaco src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [nanny] Use plural forms in SystrayNanny
- Date: Thu, 4 Feb 2010 17:29:54 +0000 (UTC)
commit d0a904e272a84cf5612bd5890c8e2f3968452cc3
Author: Roberto Majadas <roberto majadas openshine com>
Date: Thu Feb 4 18:29:29 2010 +0100
Use plural forms in SystrayNanny
client/gnome/systray/src/SystrayNanny.py | 20 ++++++++------------
1 files changed, 8 insertions(+), 12 deletions(-)
---
diff --git a/client/gnome/systray/src/SystrayNanny.py b/client/gnome/systray/src/SystrayNanny.py
index 4c4581f..51c302e 100644
--- a/client/gnome/systray/src/SystrayNanny.py
+++ b/client/gnome/systray/src/SystrayNanny.py
@@ -32,6 +32,9 @@ import gobject
import nanny.client.common
import nanny.client.gnome.systray
+import gettext
+
+ngettext = gettext.ngettext
class SystrayNanny(gtk.StatusIcon):
def __init__(self):
@@ -104,24 +107,17 @@ class SystrayNanny(gtk.StatusIcon):
time = ""
if d > 0:
- if d == 1:
- time += _("1 day")
- else:
- time += _("%s days") % d
+ time += ngettext("%s day", "%s days", d) % d
+
if h > 0:
if len(time) > 0:
time += ", "
- if h == 1:
- time += _("1 hour")
- else:
- time += _("%s hours") % h
+ time += ngettext("%s hour", "%s hours", h) % h
+
if m > 0:
if len(time) > 0:
time += ", "
- if m == 1:
- time += _("1 minute")
- else:
- time += _("%s minutes") % m
+ time += ngettext("%s minute", "%s minutes", m) % m
return time
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]