]> code.citadel.org Git - citadel.git/commitdiff
* calendar.c: altered conflict reporting strings for better i18n
authorArt Cancro <ajc@citadel.org>
Wed, 17 Aug 2005 22:18:00 +0000 (22:18 +0000)
committerArt Cancro <ajc@citadel.org>
Wed, 17 Aug 2005 22:18:00 +0000 (22:18 +0000)
webcit/ChangeLog
webcit/calendar.c

index 3ac72b43486bddf6d4b5c3e2d4af270f2efcd436..cf924bac56497a2952884a4c9507064053c71a26 100644 (file)
@@ -1,4 +1,7 @@
 $Log$
+Revision 621.12  2005/08/17 22:18:00  ajc
+* calendar.c: altered conflict reporting strings for better i18n
+
 Revision 621.11  2005/08/17 17:56:32  ajc
 * availability.c: prepared for i18n
 * calendar.c: began preparing for i18n
@@ -2830,4 +2833,3 @@ 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 a4319d33d8c0c3bd638038b585f9c0ebf7952b78..62b38d44b748eede1c0b8325a3d71367fd5a6cdd 100644 (file)
@@ -64,8 +64,9 @@ void cal_process_object(icalcomponent *cal,
        icalproperty *p;
        struct icaltimetype t;
        time_t tt;
-       char buf[SIZ];
-       char conflict_name[SIZ];
+       char buf[256];
+       char conflict_name[256];
+       char conflict_message[256];
        int is_update = 0;
 
        /* Leading HTML for the display of this object */
@@ -188,7 +189,7 @@ void cal_process_object(icalcomponent *cal,
                wprintf("<TR><TD><B>");
                wprintf(_("Attendee:"));
                wprintf("</B></TD><TD>");
-               strcpy(buf, icalproperty_get_attendee(p));
+               safestrncpy(buf, icalproperty_get_attendee(p), sizeof buf);
                if (!strncasecmp(buf, "MAILTO:", 7)) {
 
                        /* screen name or email address */
@@ -223,26 +224,24 @@ void cal_process_object(icalcomponent *cal,
                        while (serv_getln(buf, sizeof buf), strcmp(buf, "000")) {
                                extract_token(conflict_name, buf, 3, '|', sizeof conflict_name);
                                is_update = extract_int(buf, 4);
-                               wprintf("<TR><TD><B><I>%s</I></B></TD>"
-                                       "<TD>"
-                                       "%s "
-                                       "<I>&quot;",
 
+                               if (is_update) {
+                                       snprintf(conflict_message, sizeof conflict_message,
+                                               _("This is an update of '%s' which is already in your calendar."), conflict_name);
+                               }
+                               else {
+                                       snprintf(conflict_message, sizeof conflict_message,
+                                               _("This event would conflict with '%s' which is already in your calendar."), conflict_name);
+                               }
+
+                               wprintf("<TR><TD><B><I>%s</I></B></TD><td>",
                                        (is_update ?
                                                _("Update:") :
                                                _("CONFLICT:")
-                                       ),
-
-                                       (is_update ?
-                                               "This is an update of" :
-                                               "This event would conflict with"
                                        )
-               
                                );
-                               escputs(conflict_name);
-                               wprintf("&quot;</I> "
-                                       "which is already in your calendar."
-                                       "</TD></TR>\n");
+                               escputs(conflict_message);
+                               wprintf("</TD></TR>\n");
                        }
                }
                lprintf(9, "...done.\n");