$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
1998-12-03 Nathan Bryant <bryant@cs.usm.maine.edu>
* webserver.c: warning fix
-
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 */
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 */
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>"",
+ 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(""</I> "
- "which is already in your calendar."
- "</TD></TR>\n");
+ escputs(conflict_message);
+ wprintf("</TD></TR>\n");
}
}
lprintf(9, "...done.\n");