aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-itip-control.c
diff options
context:
space:
mode:
authorDamon Chaplin <damon@ximian.com>2002-01-12 08:34:14 +0800
committerDamon Chaplin <damon@src.gnome.org>2002-01-12 08:34:14 +0800
commit0ed7d60f578f81394c8a0ebbc3b838a74576e873 (patch)
tree45248ec7c262ba6937d8462975ba1680056c6795 /calendar/gui/e-itip-control.c
parentffe29891a41ddfbf18e776c3b31c883457914fbc (diff)
downloadgsoc2013-evolution-0ed7d60f578f81394c8a0ebbc3b838a74576e873.tar.gz
gsoc2013-evolution-0ed7d60f578f81394c8a0ebbc3b838a74576e873.tar.zst
gsoc2013-evolution-0ed7d60f578f81394c8a0ebbc3b838a74576e873.zip
translate timezone names when displayed. Fixes bug #6544.
2002-01-11 Damon Chaplin <damon@ximian.com> * gui/e-timezone-entry.c: * gui/e-itip-control.c (write_label_piece): * gui/calendar-config.c (on_timezone_set): translate timezone names when displayed. Fixes bug #6544. svn path=/trunk/; revision=15307
Diffstat (limited to 'calendar/gui/e-itip-control.c')
-rw-r--r--calendar/gui/e-itip-control.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/calendar/gui/e-itip-control.c b/calendar/gui/e-itip-control.c
index bb935ea396..66abdb89be 100644
--- a/calendar/gui/e-itip-control.c
+++ b/calendar/gui/e-itip-control.c
@@ -489,11 +489,22 @@ write_label_piece (EItipControl *itip, CalComponentDateTime *dt,
/* Output timezone after time, e.g. " America/New_York". */
if (zone) {
+ /* Note that this returns UTF-8, since all iCalendar data is
+ UTF-8. But it probably is not translated. */
display_name = icaltimezone_get_display_name (zone);
- /* These are ASCII strings, so should be OK as UTF-8.*/
- if (display_name) {
+ if (display_name && *display_name) {
strcat (buffer, " ");
- strcat (buffer, display_name);
+
+ /* We check if it is one of our builtin timezone names,
+ in which case we call gettext to translate it, and
+ we need to convert to UTF-8. If it isn't a builtin
+ timezone name, we use it as-is, as it is already
+ UTF-8. */
+ if (icaltimezone_get_builtin_timezone (display_name)) {
+ strcat (buffer, U_(display_name));
+ } else {
+ strcat (buffer, display_name);
+ }
}
}