diff options
author | Danilo Šegan <danilo@src.gnome.org> | 2004-03-24 08:18:02 +0800 |
---|---|---|
committer | Danilo Šegan <danilo@src.gnome.org> | 2004-03-24 08:18:02 +0800 |
commit | 7c70ddcc35a65e1078a7789832e5209a7a2e4a5b (patch) | |
tree | 75dd3c44ad9d0eeb512969116852bb765fba1bd5 /calendar/gui/e-alarm-list.c | |
parent | 6f309e984bbfd7b5376dd38637a55dd46d307c92 (diff) | |
download | gsoc2013-evolution-7c70ddcc35a65e1078a7789832e5209a7a2e4a5b.tar gsoc2013-evolution-7c70ddcc35a65e1078a7789832e5209a7a2e4a5b.tar.gz gsoc2013-evolution-7c70ddcc35a65e1078a7789832e5209a7a2e4a5b.tar.bz2 gsoc2013-evolution-7c70ddcc35a65e1078a7789832e5209a7a2e4a5b.tar.lz gsoc2013-evolution-7c70ddcc35a65e1078a7789832e5209a7a2e4a5b.tar.xz gsoc2013-evolution-7c70ddcc35a65e1078a7789832e5209a7a2e4a5b.tar.zst gsoc2013-evolution-7c70ddcc35a65e1078a7789832e5209a7a2e4a5b.zip |
Use ngettext for handling plural forms throughout (fixes bug 53464).
svn path=/trunk/; revision=25168
Diffstat (limited to 'calendar/gui/e-alarm-list.c')
-rw-r--r-- | calendar/gui/e-alarm-list.c | 35 |
1 files changed, 10 insertions, 25 deletions
diff --git a/calendar/gui/e-alarm-list.c b/calendar/gui/e-alarm-list.c index c8b968600f..705e6bac54 100644 --- a/calendar/gui/e-alarm-list.c +++ b/calendar/gui/e-alarm-list.c @@ -391,43 +391,28 @@ get_alarm_duration_string (struct icaldurationtype *duration) have_something = FALSE; - if (duration->days > 1) { - g_string_sprintf (string, _("%d days"), duration->days); - have_something = TRUE; - } else if (duration->days == 1) { - g_string_append (string, _("1 day")); + if (duration->days >= 1) { + g_string_sprintf (string, ngettext("%d day", "%d days", duration->days), duration->days); have_something = TRUE; } - if (duration->weeks > 1) { - g_string_sprintf (string, _("%d weeks"), duration->weeks); - have_something = TRUE; - } else if (duration->weeks == 1) { - g_string_append (string, _("1 week")); + if (duration->weeks >= 1) { + g_string_sprintf (string, ngettext("%d week","%d weeks", duration->weeks), duration->weeks); have_something = TRUE; } - if (duration->hours > 1) { - g_string_sprintf (string, _("%d hours"), duration->hours); - have_something = TRUE; - } else if (duration->hours == 1) { - g_string_append (string, _("1 hour")); + if (duration->hours >= 1) { + g_string_sprintf (string, ngettext("%d hour", "%d hours", duration->hours), duration->hours); have_something = TRUE; } - if (duration->minutes > 1) { - g_string_sprintf (string, _("%d minutes"), duration->minutes); - have_something = TRUE; - } else if (duration->minutes == 1) { - g_string_append (string, _("1 minute")); + if (duration->minutes >= 1) { + g_string_sprintf (string, ngettext("%d minute", "%d minutes", duration->minutes), duration->minutes); have_something = TRUE; } - if (duration->seconds > 1) { - g_string_sprintf (string, _("%d seconds"), duration->seconds); - have_something = TRUE; - } else if (duration->seconds == 1) { - g_string_append (string, _("1 second")); + if (duration->seconds >= 1) { + g_string_sprintf (string, ngettext("%d second", "%d seconds", duration->seconds), duration->seconds); have_something = TRUE; } |