From 5aef0990179fa0eaa92760ce7cd7b47e33a1f570 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Wed, 17 Aug 2005 17:56:32 +0000 Subject: [PATCH] * availability.c: prepared for i18n * calendar.c: began preparing for i18n --- webcit/ChangeLog | 5 +++ webcit/availability.c | 6 ++-- webcit/calendar.c | 80 ++++++++++++++++++++++++------------------- 3 files changed, 52 insertions(+), 39 deletions(-) diff --git a/webcit/ChangeLog b/webcit/ChangeLog index 48bb42256..3ac72b434 100644 --- a/webcit/ChangeLog +++ b/webcit/ChangeLog @@ -1,4 +1,8 @@ $Log$ +Revision 621.11 2005/08/17 17:56:32 ajc +* availability.c: prepared for i18n +* calendar.c: began preparing for i18n + Revision 621.10 2005/08/17 17:44:59 ajc * auth.c: prepared for internationalization @@ -2826,3 +2830,4 @@ Sun Dec 6 19:50:55 EST 1998 Art Cancro 1998-12-03 Nathan Bryant * webserver.c: warning fix + diff --git a/webcit/availability.c b/webcit/availability.c index 009bf9f70..eaf0c7dc0 100644 --- a/webcit/availability.c +++ b/webcit/availability.c @@ -119,7 +119,7 @@ void check_individual_attendee(char *attendee_string, /* Set to 'unknown' right from the beginning. Unless we learn * something else, that's what we'll go with. */ - strcpy(annotation, "availability unknown"); + strcpy(annotation, _("availability unknown")); fbc = get_freebusy_for_user(attendee_string); if (fbc == NULL) { @@ -139,7 +139,7 @@ void check_individual_attendee(char *attendee_string, /* Iterate through all FREEBUSY's looking for conflicts. */ if (fb != NULL) { - strcpy(annotation, "free"); + strcpy(annotation, _("free")); for (thisfb = icalcomponent_get_first_property(fb, ICAL_FREEBUSY_PROPERTY); thisfb != NULL; @@ -149,7 +149,7 @@ void check_individual_attendee(char *attendee_string, period = icalproperty_get_freebusy(thisfb); if (ical_ctdl_is_overlap(period.start, period.end, event_start, event_end)) { - strcpy(annotation, "BUSY"); + strcpy(annotation, _("BUSY")); } } diff --git a/webcit/calendar.c b/webcit/calendar.c index 066542133..a4319d33d 100644 --- a/webcit/calendar.c +++ b/webcit/calendar.c @@ -15,29 +15,29 @@ */ void cal_process_attachment(char *part_source, long msgnum, char *cal_partnum) { - wprintf("This message contains calendaring/scheduling information," + wprintf(_("This message contains calendaring/scheduling information," " but support for calendars is not available on this " "particular system. Please ask your system administrator to " "install a new version of the Citadel web service with " - "calendaring enabled.
\n" + "calendaring enabled.

\n") ); } void display_calendar(long msgnum) { - wprintf("" + wprintf(_("" "Cannot display calendar item. You are seeing this error " "because your WebCit service has not been installed with " "calendar support. Please contact your system administrator." - "
\n"); + "

\n")); } void display_task(long msgnum) { - wprintf("" + wprintf(_("" "Cannot display to-do item. You are seeing this error " "because your WebCit service has not been installed with " "calendar support. Please contact your system administrator." - "
\n"); + "

\n")); } #else /* WEBCIT_WITH_CALENDAR_SERVICE */ @@ -81,50 +81,54 @@ void cal_process_object(icalcomponent *cal, the_method = icalproperty_get_method(method); switch(the_method) { case ICAL_METHOD_REQUEST: - wprintf("\n" - "" + wprintf("\n" + "" "  " - "Meeting invitation" - "\n" - ); + ""); + wprintf(_("Meeting invitation")); + wprintf("\n"); break; case ICAL_METHOD_REPLY: wprintf("\n" "" "  " - "Attendee's reply to your invitation" - "\n" - ); + ""); + wprintf(_("Attendee's reply to your invitation")); + wprintf("\n"); break; case ICAL_METHOD_PUBLISH: wprintf("\n" "" "  " - "Published event" - "\n" - ); + ""); + wprintf(_("Published event")); + wprintf("\n"); break; default: - wprintf("" - "I don't know what to do with this." - "\n"); + wprintf(""); + wprintf(_("This is an unknown type of calendar item.")); + wprintf("\n"); break; } } p = icalcomponent_get_first_property(cal, ICAL_SUMMARY_PROPERTY); if (p != NULL) { - wprintf("Summary:"); + wprintf(""); + wprintf(_("Summary:")); + wprintf(""); escputs((char *)icalproperty_get_comment(p)); wprintf("\n"); } p = icalcomponent_get_first_property(cal, ICAL_LOCATION_PROPERTY); if (p != NULL) { - wprintf("Location:"); + wprintf(""); + wprintf(_("Location:")); + wprintf(""); escputs((char *)icalproperty_get_comment(p)); wprintf("\n"); } @@ -141,8 +145,9 @@ void cal_process_object(icalcomponent *cal, t = icalproperty_get_dtstart(p); if (t.is_date) { - wprintf("Date:" - "" + wprintf(""); + wprintf(_("Date:")); + wprintf("" "%s %d, %d", months[t.month - 1], t.day, t.year @@ -151,10 +156,9 @@ void cal_process_object(icalcomponent *cal, else { tt = icaltime_as_timet(t); fmt_date(buf, tt, 0); - wprintf("Starting date/time:" - "" - "%s", buf - ); + wprintf(""); + wprintf(_("Starting date/time:")); + wprintf("%s", buf); } } @@ -163,23 +167,27 @@ void cal_process_object(icalcomponent *cal, t = icalproperty_get_dtend(p); tt = icaltime_as_timet(t); fmt_date(buf, tt, 0); - wprintf("Ending date/time:" - "%s", buf - ); + wprintf(""); + wprintf(_("Ending date/time:")); + wprintf("%s", buf); } } p = icalcomponent_get_first_property(cal, ICAL_DESCRIPTION_PROPERTY); if (p != NULL) { - wprintf("Description:"); + wprintf(""); + wprintf(_("Description:")); + wprintf(""); escputs((char *)icalproperty_get_comment(p)); wprintf("\n"); } /* If the component has attendees, iterate through them. */ for (p = icalcomponent_get_first_property(cal, ICAL_ATTENDEE_PROPERTY); (p != NULL); p = icalcomponent_get_next_property(cal, ICAL_ATTENDEE_PROPERTY)) { - wprintf("Attendee:"); + wprintf(""); + wprintf(_("Attendee:")); + wprintf(""); strcpy(buf, icalproperty_get_attendee(p)); if (!strncasecmp(buf, "MAILTO:", 7)) { @@ -221,8 +229,8 @@ void cal_process_object(icalcomponent *cal, """, (is_update ? - "Update:" : - "CONFLICT:" + _("Update:") : + _("CONFLICT:") ), (is_update ? -- 2.39.2