aboutsummaryrefslogtreecommitdiffstats
path: root/a11y/calendar
diff options
context:
space:
mode:
authorLi Yuan <li.yuan@sun.com>2004-11-03 10:13:36 +0800
committerHarry Lu <haip@src.gnome.org>2004-11-03 10:13:36 +0800
commit26139115b4cadd29b0a7eb35826214cbf0375b92 (patch)
treeda5c119ef29d19a45eaec49d8a797bdf86c1419f /a11y/calendar
parent97b72817a51cfa9d80c189c80d56e92e4f4e72b7 (diff)
downloadgsoc2013-evolution-26139115b4cadd29b0a7eb35826214cbf0375b92.tar.gz
gsoc2013-evolution-26139115b4cadd29b0a7eb35826214cbf0375b92.tar.zst
gsoc2013-evolution-26139115b4cadd29b0a7eb35826214cbf0375b92.zip
use ngettext for n_events. ditto.
2004-11-01 Li Yuan <li.yuan@sun.com> * calendar/ea-day-view.c: (ea_day_view_get_name): use ngettext for n_events. * calendar/ea-week-view.c: (ea_week_view_get_name): ditto. svn path=/trunk/; revision=27805
Diffstat (limited to 'a11y/calendar')
-rw-r--r--a11y/calendar/ea-day-view.c8
-rw-r--r--a11y/calendar/ea-week-view.c8
2 files changed, 4 insertions, 12 deletions
diff --git a/a11y/calendar/ea-day-view.c b/a11y/calendar/ea-day-view.c
index 49b7a123ed..ff72613b35 100644
--- a/a11y/calendar/ea-day-view.c
+++ b/a11y/calendar/ea-day-view.c
@@ -143,12 +143,8 @@ ea_day_view_get_name (AtkObject *accessible)
n_events = atk_object_get_n_accessible_children (accessible);
/* the child main item is always there */
--n_events;
- if (n_events == 1)
- g_snprintf (buffer, sizeof (buffer),
- _(", %d event"), n_events);
- if (n_events > 1)
- g_snprintf (buffer, sizeof (buffer),
- _(", %d events"), n_events);
+ if (n_events >= 1)
+ g_snprintf (buffer, sizeof (buffer), ngettext ( _(", %d event"), _(", %d events"), n_events), n_events);
view_type = gnome_calendar_get_view (gcal);
if (view_type == GNOME_CAL_WORK_WEEK_VIEW)
accessible->name = g_strconcat (_("work week view :"),
diff --git a/a11y/calendar/ea-week-view.c b/a11y/calendar/ea-week-view.c
index 1dd137912b..26c0fe62c1 100644
--- a/a11y/calendar/ea-week-view.c
+++ b/a11y/calendar/ea-week-view.c
@@ -144,12 +144,8 @@ ea_week_view_get_name (AtkObject *accessible)
n_events = atk_object_get_n_accessible_children (accessible);
/* the child main item is always there */
--n_events;
- if (n_events == 1)
- g_snprintf (buffer, sizeof (buffer),
- _(", %d event"), n_events);
- if (n_events > 1)
- g_snprintf (buffer, sizeof (buffer),
- _(", %d events"), n_events);
+ if (n_events >= 1)
+ g_snprintf (buffer, sizeof (buffer), ngettext ( _(", %d event"), _(", %d events"), n_events), n_events);
view_type = gnome_calendar_get_view (gcal);