aboutsummaryrefslogtreecommitdiffstats
path: root/a11y
diff options
context:
space:
mode:
Diffstat (limited to 'a11y')
-rw-r--r--a11y/ChangeLog7
-rw-r--r--a11y/calendar/ea-day-view.c8
-rw-r--r--a11y/calendar/ea-week-view.c8
3 files changed, 11 insertions, 12 deletions
diff --git a/a11y/ChangeLog b/a11y/ChangeLog
index b826baffb2..7f0d2ad3bb 100644
--- a/a11y/ChangeLog
+++ b/a11y/ChangeLog
@@ -1,3 +1,10 @@
+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.
+
2004-10-26 Li Yuan <li.yuan@sun.com>
* calendar/ea-day-view.c: (ea_day_view_get_name):
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);