* availability.c: prepared for i18n
authorArt Cancro <ajc@citadel.org>
Wed, 17 Aug 2005 17:56:32 +0000 (17:56 +0000)
committerArt Cancro <ajc@citadel.org>
Wed, 17 Aug 2005 17:56:32 +0000 (17:56 +0000)
* calendar.c: began preparing for i18n

webcit/ChangeLog
webcit/availability.c
webcit/calendar.c

index 48bb422565e064bff5c2ced43e3ae7b70c1f9c4f..3ac72b43486bddf6d4b5c3e2d4af270f2efcd436 100644 (file)
@@ -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 <ajc@uncnsrd.mt-kisco.ny.us>
 
 1998-12-03 Nathan Bryant <bryant@cs.usm.maine.edu>
        * webserver.c: warning fix
+
index 009bf9f70f3e616a3c36171cd5ca97960de83196..eaf0c7dc064158fd1b4a2da696612c90f5ea744c 100644 (file)
@@ -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"));
                        }
 
                }
index 06654213315d2a8d8e40e3e5000f0e8392980b54..a4319d33d8c0c3bd638038b585f9c0ebf7952b78 100644 (file)
  */
 void cal_process_attachment(char *part_source, long msgnum, char *cal_partnum) {
 
-       wprintf("<I>This message contains calendaring/scheduling information,"
+       wprintf(_("<I>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.</I><br />\n"
+               "calendaring enabled.</I><br />\n")
        );
 
 }
 
 void display_calendar(long msgnum) {
-       wprintf("<i>"
+       wprintf(_("<i>"
                "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."
-               "</i><br />\n");
+               "</i><br />\n"));
 }
 
 void display_task(long msgnum) {
-       wprintf("<i>"
+       wprintf(_("<i>"
                "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."
-               "</i><br />\n");
+               "</i><br />\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("<TR><TD COLSPAN=2>\n"
-                               "<IMG ALIGN=CENTER "
-                               "SRC=\"/static/calarea_48x.gif\">"
+                       wprintf("<tr><td colspan=\"2\">\n"
+                               "<img align=\"center\" "
+                               "src=\"/static/calarea_48x.gif\">"
                                "&nbsp;&nbsp;"  
-                               "<B>Meeting invitation</B>"
-                               "</TD></TR>\n"
-                       );
+                               "<B>");
+                       wprintf(_("Meeting invitation"));
+                       wprintf("</B></TD></TR>\n");
                        break;
                    case ICAL_METHOD_REPLY:
                        wprintf("<TR><TD COLSPAN=2>\n"
                                "<IMG ALIGN=CENTER "
                                "SRC=\"/static/calarea_48x.gif\">"
                                "&nbsp;&nbsp;"  
-                               "<B>Attendee's reply to your invitation</B>"
-                               "</TD></TR>\n"
-                       );
+                               "<B>");
+                       wprintf(_("Attendee's reply to your invitation"));
+                       wprintf("</B></TD></TR>\n");
                        break;
                    case ICAL_METHOD_PUBLISH:
                        wprintf("<TR><TD COLSPAN=2>\n"
                                "<IMG ALIGN=CENTER "
                                "SRC=\"/static/calarea_48x.gif\">"
                                "&nbsp;&nbsp;"  
-                               "<B>Published event</B>"
-                               "</TD></TR>\n"
-                       );
+                               "<B>");
+                       wprintf(_("Published event"));
+                       wprintf("</B></TD></TR>\n");
                        break;
                    default:
-                       wprintf("<TR><TD COLSPAN=2>"
-                               "I don't know what to do with this.</TD></TR>"
-                               "\n");
+                       wprintf("<TR><TD COLSPAN=2>");
+                       wprintf(_("This is an unknown type of calendar item."));
+                       wprintf("</TD></TR>\n");
                        break;
                }
        }
 
        p = icalcomponent_get_first_property(cal, ICAL_SUMMARY_PROPERTY);
        if (p != NULL) {
-               wprintf("<TR><TD><B>Summary:</B></TD><TD>");
+               wprintf("<TR><TD><B>");
+               wprintf(_("Summary:"));
+               wprintf("</B></TD><TD>");
                escputs((char *)icalproperty_get_comment(p));
                wprintf("</TD></TR>\n");
        }
 
        p = icalcomponent_get_first_property(cal, ICAL_LOCATION_PROPERTY);
        if (p != NULL) {
-               wprintf("<TR><TD><B>Location:</B></TD><TD>");
+               wprintf("<TR><TD><B>");
+               wprintf(_("Location:"));
+               wprintf("</B></TD><TD>");
                escputs((char *)icalproperty_get_comment(p));
                wprintf("</TD></TR>\n");
        }
@@ -141,8 +145,9 @@ void cal_process_object(icalcomponent *cal,
                        t = icalproperty_get_dtstart(p);
 
                        if (t.is_date) {
-                               wprintf("<TR><TD><B>Date:"
-                                       "</B></TD><TD>"
+                               wprintf("<TR><TD><B>");
+                               wprintf(_("Date:"));
+                               wprintf("</B></TD><TD>"
                                        "%s %d, %d</TD></TR>",
                                        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("<TR><TD><B>Starting date/time:"
-                                       "</B></TD><TD>"
-                                       "%s</TD></TR>", buf
-                               );
+                               wprintf("<TR><TD><B>");
+                               wprintf(_("Starting date/time:"));
+                               wprintf("</B></TD><TD>%s</TD></TR>", 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("<TR><TD><B>Ending date/time:</B></TD><TD>"
-                               "%s</TD></TR>", buf
-                       );
+                       wprintf("<TR><TD><B>");
+                       wprintf(_("Ending date/time:"));
+                       wprintf("</B></TD><TD>%s</TD></TR>", buf);
                }
 
        }
 
        p = icalcomponent_get_first_property(cal, ICAL_DESCRIPTION_PROPERTY);
        if (p != NULL) {
-               wprintf("<TR><TD><B>Description:</B></TD><TD>");
+               wprintf("<TR><TD><B>");
+               wprintf(_("Description:"));
+               wprintf("</B></TD><TD>");
                escputs((char *)icalproperty_get_comment(p));
                wprintf("</TD></TR>\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("<TR><TD><B>Attendee:</B></TD><TD>");
+               wprintf("<TR><TD><B>");
+               wprintf(_("Attendee:"));
+               wprintf("</B></TD><TD>");
                strcpy(buf, icalproperty_get_attendee(p));
                if (!strncasecmp(buf, "MAILTO:", 7)) {
 
@@ -221,8 +229,8 @@ void cal_process_object(icalcomponent *cal,
                                        "<I>&quot;",
 
                                        (is_update ?
-                                               "Update:" :
-                                               "CONFLICT:"
+                                               _("Update:") :
+                                               _("CONFLICT:")
                                        ),
 
                                        (is_update ?