* messages.c: partially i18n
+Revision 621.19 2005/08/20 04:37:50 ajc
+* mainmenu.c: i18n
+* messages.c: partially i18n
+
Revision 621.18 2005/08/19 21:46:48 ajc
* inetconf.c, listsub.c, part of mainmenu.c: i18n
Revision 621.18 2005/08/19 21:46:48 ajc
* inetconf.c, listsub.c, part of mainmenu.c: i18n
1998-12-03 Nathan Bryant <bryant@cs.usm.maine.edu>
* webserver.c: warning fix
1998-12-03 Nathan Bryant <bryant@cs.usm.maine.edu>
* webserver.c: warning fix
wprintf("<FONT SIZE=-2>");
wprintf(_("Detected host header is %s://%s"), (is_https ? "https" : "http"), WC->http_host);
wprintf("</FONT>\n");
wprintf("<FONT SIZE=-2>");
wprintf(_("Detected host header is %s://%s"), (is_https ? "https" : "http"), WC->http_host);
wprintf("</FONT>\n");
- wprintf("<INPUT TYPE=\"submit\" NAME=\"sc\" VALUE=\"Send command\">");
+ wprintf("<INPUT TYPE=\"submit\" NAME=\"sc_button\" VALUE=\"%s\">", _("Send command"));
- wprintf("<INPUT TYPE=\"submit\" NAME=\"sc\" VALUE=\"Cancel\"><br />\n");
+ wprintf("<INPUT TYPE=\"submit\" NAME=\"cancel_button\" VALUE=\"%s\"><br />\n", _("Cancel"));
wprintf("</FORM></CENTER>\n");
wprintf("</td></tr></table></div>\n");
wprintf("</FORM></CENTER>\n");
wprintf("</td></tr></table></div>\n");
- if (strcasecmp(bstr("sc"), "Send command")) {
+ if (strlen(bstr("sc_button")) == 0) {
display_main_menu();
return;
}
display_main_menu();
return;
}
if (!strcasecmp(buf, "tel"))
strcat(phone, "");
else if (!strcasecmp(buf, "work"))
if (!strcasecmp(buf, "tel"))
strcat(phone, "");
else if (!strcasecmp(buf, "work"))
- strcat(phone, " (work)");
+ strcat(phone, _(" (work)"));
else if (!strcasecmp(buf, "home"))
else if (!strcasecmp(buf, "home"))
- strcat(phone, " (home)");
+ strcat(phone, _(" (home)"));
else if (!strcasecmp(buf, "cell"))
else if (!strcasecmp(buf, "cell"))
- strcat(phone, " (cell)");
+ strcat(phone, _(" (cell)"));
else {
strcat(phone, " (");
strcat(phone, buf);
else {
strcat(phone, " (");
strcat(phone, buf);
}
else if (!strcasecmp(firsttoken, "adr")) {
if (pass == 2) {
}
else if (!strcasecmp(firsttoken, "adr")) {
if (pass == 2) {
- wprintf("<TR><TD>Address:</TD><TD>");
+ wprintf("<TR><TD>");
+ wprintf(_("Address:"));
+ wprintf("</TD><TD>");
for (j=0; j<num_tokens(thisvalue, ';'); ++j) {
extract_token(buf, thisvalue, j, ';', sizeof buf);
if (strlen(buf) > 0) {
for (j=0; j<num_tokens(thisvalue, ';'); ++j) {
extract_token(buf, thisvalue, j, ';', sizeof buf);
if (strlen(buf) > 0) {
wprintf("</TD></TR>\n");
if (strlen(phone) > 0)
wprintf("</TD></TR>\n");
if (strlen(phone) > 0)
- wprintf("<TR><TD>Telephone:</TD><TD>%s</TD></TR>\n", phone);
+ wprintf("<TR><TD>");
+ wprintf(_("Telephone:"));
+ wprintf("</TD><TD>%s</TD></TR>\n", phone);
- wprintf("<TR><TD>E-mail:</TD><TD>%s</TD></TR>\n", mailto);
+ wprintf("<TR><TD>");
+ wprintf(_("E-mail:"));
+ wprintf("</TD><TD>%s</TD></TR>\n", mailto);
serv_printf("MSG4 %ld", msgnum);
serv_getln(buf, sizeof buf);
if (buf[0] != '1') {
serv_printf("MSG4 %ld", msgnum);
serv_getln(buf, sizeof buf);
if (buf[0] != '1') {
- wprintf("<STRONG>ERROR:</STRONG> %s<br />\n", &buf[4]);
+ wprintf("<STRONG>");
+ wprintf(_("ERROR:"));
+ wprintf("</STRONG> %s<br />\n", &buf[4]);
while (serv_getln(buf, sizeof buf), strcasecmp(buf, "text")) {
if (!strcmp(buf, "000")) {
while (serv_getln(buf, sizeof buf), strcasecmp(buf, "text")) {
if (!strcmp(buf, "000")) {
- wprintf("<I>unexpected end of message</I><br /><br />\n");
+ wprintf("<I>");
+ wprintf(_("unexpected end of message"));
+ wprintf("</I><br /><br />\n");
wprintf("</SPAN>\n");
return;
}
wprintf("</SPAN>\n");
return;
}
format_type = atoi(&buf[5]);
if (!strncasecmp(buf, "from=", 5)) {
strcpy(from, &buf[5]);
format_type = atoi(&buf[5]);
if (!strncasecmp(buf, "from=", 5)) {
strcpy(from, &buf[5]);
- wprintf("from <A HREF=\"/showuser?who=");
+ wprintf(_("from "));
+ wprintf("<A HREF=\"/showuser?who=");
#ifdef HAVE_ICONV
utf8ify_rfc822_string(from);
#endif
#ifdef HAVE_ICONV
utf8ify_rfc822_string(from);
#endif
escputs(from);
wprintf("</A> ");
}
escputs(from);
wprintf("</A> ");
}
- if (!strncasecmp(buf, "subj=", 5))
+ if (!strncasecmp(buf, "subj=", 5)) {
strcpy(m_subject, &buf[5]);
strcpy(m_subject, &buf[5]);
if ((!strncasecmp(buf, "hnod=", 5))
if ((!strncasecmp(buf, "hnod=", 5))
- && (strcasecmp(&buf[5], serv_info.serv_humannode)))
+ && (strcasecmp(&buf[5], serv_info.serv_humannode))) {
wprintf("(%s) ", &buf[5]);
wprintf("(%s) ", &buf[5]);
if ((!strncasecmp(buf, "room=", 5))
&& (strcasecmp(&buf[5], WC->wc_roomname))
if ((!strncasecmp(buf, "room=", 5))
&& (strcasecmp(&buf[5], WC->wc_roomname))
- && (strlen(&buf[5])>0) )
- wprintf("in %s> ", &buf[5]);
+ && (strlen(&buf[5])>0) ) {
+ wprintf(_("in "));
+ wprintf("%s> ", &buf[5]);
+ }
if (!strncasecmp(buf, "rfca=", 5)) {
strcpy(rfca, &buf[5]);
wprintf("<");
if (!strncasecmp(buf, "rfca=", 5)) {
strcpy(rfca, &buf[5]);
wprintf("<");
wprintf("@%s ", &buf[5]);
}
}
wprintf("@%s ", &buf[5]);
}
}
- if (!strncasecmp(buf, "rcpt=", 5))
- wprintf("to %s ", &buf[5]);
+ if (!strncasecmp(buf, "rcpt=", 5)) {
+ wprintf(_("to "));
+ wprintf("%s ", &buf[5]);
+ }
if (!strncasecmp(buf, "time=", 5)) {
fmt_date(now, atol(&buf[5]), 0);
wprintf("%s ", now);
if (!strncasecmp(buf, "time=", 5)) {
fmt_date(now, atol(&buf[5]), 0);
wprintf("%s ", now);
#endif
if (strlen(m_subject) > 0) {
wprintf("<br />"
#endif
if (strlen(m_subject) > 0) {
wprintf("<br />"
- "<SPAN CLASS=\"message_subject\">"
- "Subject: %s"
- "</SPAN>", m_subject
+ "<SPAN CLASS=\"message_subject\">");
+ wprintf(_("Subject:"));
+ wprintf(" %s</SPAN>", m_subject
wprintf("?subject=");
if (strncasecmp(m_subject, "Re:", 3)) wprintf("Re:%20");
urlescputs(m_subject);
wprintf("?subject=");
if (strncasecmp(m_subject, "Re:", 3)) wprintf("Re:%20");
urlescputs(m_subject);
- wprintf("\">[Reply]</a> ");
+ wprintf("\">[%s]</a> ", _("Reply"));
- wprintf("<a href=\"/confirm_move_msg?msgid=%ld\">[Move]</a> ",
- msgnum);
+ wprintf("<a href=\"/confirm_move_msg?msgid=%ld\">[%s]</a> ",
+ msgnum, _("Move"));
/* Delete */
wprintf("<a href=\"/delete_msg?msgid=%ld\" "
/* Delete */
wprintf("<a href=\"/delete_msg?msgid=%ld\" "
- "onClick=\"return confirm('Delete this message?');\">"
- "[Delete]</a> ", msgnum);
-
+ "onClick=\"return confirm('%s');\">"
+ "[%s]</a> ", msgnum, _("Delete this message?"), _("Delete")
+ );
}
wprintf("<a href=\"/msg?msgnum=%ld?print_it=yes\" target=\"msgloader1\">"
}
wprintf("<a href=\"/msg?msgnum=%ld?print_it=yes\" target=\"msgloader1\">"
- "[Print]</a>", msgnum);
+ "[%s]</a>", msgnum, _("Print"));
strcpy(mime_content_type, "text/plain");
while (serv_getln(buf, sizeof buf), (strlen(buf) > 0)) {
if (!strcmp(buf, "000")) {
strcpy(mime_content_type, "text/plain");
while (serv_getln(buf, sizeof buf), (strlen(buf) > 0)) {
if (!strcmp(buf, "000")) {
- wprintf("<I>unexpected end of message</I><br /><br />\n");
+ wprintf("<I>");
+ wprintf(_("unexpected end of message"));
+ wprintf("</I><br /><br />\n");
goto ENDBODY;
}
if (!strncasecmp(buf, "Content-type: ", 14)) {
goto ENDBODY;
}
if (!strncasecmp(buf, "Content-type: ", 14)) {
/* Unknown weirdness */
else {
/* Unknown weirdness */
else {
- wprintf("I don't know how to display %s<br />\n",
- mime_content_type);
+ wprintf(_("I don't know how to display %s"), mime_content_type);
+ wprintf("<br />\n", mime_content_type);
while (serv_getln(buf, sizeof buf), strcmp(buf, "000")) { }
}
while (serv_getln(buf, sizeof buf), strcmp(buf, "000")) { }
}
wprintf("<A HREF=\"/edit_vcard?"
"msgnum=%ld?partnum=%s\">",
msgnum, vcard_partnum);
wprintf("<A HREF=\"/edit_vcard?"
"msgnum=%ld?partnum=%s\">",
msgnum, vcard_partnum);
+ wprintf("[%s]</A>", _("edit"));
}
/* In all cases, display the full card */
}
/* In all cases, display the full card */
struct message_summary summ;
memset(&summ, 0, sizeof(summ));
struct message_summary summ;
memset(&summ, 0, sizeof(summ));
- safestrncpy(summ.subj, "(no subject)", sizeof summ.subj);
+ safestrncpy(summ.subj, _("(no subject)"), sizeof summ.subj);
sprintf(buf, "MSG0 %ld|1", msgnum); /* ask for headers only */
serv_puts(buf);
sprintf(buf, "MSG0 %ld|1", msgnum); /* ask for headers only */
serv_puts(buf);
wprintf("<A HREF=\"/edit_vcard?"
"msgnum=%ld?partnum=%s\">",
msgnum, vcard_partnum);
wprintf("<A HREF=\"/edit_vcard?"
"msgnum=%ld?partnum=%s\">",
msgnum, vcard_partnum);
+ wprintf("[%s]</A>", _("edit"));
for (i=0; i<strlen(namebuf); ++i) {
if (namebuf[i] != ';') return;
}
for (i=0; i<strlen(namebuf); ++i) {
if (namebuf[i] != ';') return;
}
- strcpy(namebuf, "(no name)");
+ strcpy(namebuf, _("(no name)"));
char tablast_label[SIZ];
if (num_ab == 0) {
char tablast_label[SIZ];
if (num_ab == 0) {
- wprintf("<I>This address book is empty.</I>\n");
+ wprintf("<I>");
+ wprintf(_("This address book is empty."));
+ wprintf("</I>\n");
memset(&WC->summ[nummsgs-1], 0, sizeof(struct message_summary));
WC->summ[nummsgs-1].msgnum = WC->msgarr[nummsgs-1];
memset(&WC->summ[nummsgs-1], 0, sizeof(struct message_summary));
WC->summ[nummsgs-1].msgnum = WC->msgarr[nummsgs-1];
- safestrncpy(WC->summ[nummsgs-1].subj, "(no subject)", sizeof WC->summ[nummsgs-1].subj);
+ safestrncpy(WC->summ[nummsgs-1].subj, _("(no subject)"), sizeof WC->summ[nummsgs-1].subj);
if (strlen(displayname) > 0) {
safestrncpy(WC->summ[nummsgs-1].from, displayname, sizeof WC->summ[nummsgs-1].from);
}
if (strlen(displayname) > 0) {
safestrncpy(WC->summ[nummsgs-1].from, displayname, sizeof WC->summ[nummsgs-1].from);
}
if (nummsgs == 0) {
if ((!is_tasks) && (!is_calendar) && (!is_notes)) {
if (nummsgs == 0) {
if ((!is_tasks) && (!is_calendar) && (!is_notes)) {
if (!strcmp(oper, "readnew")) {
if (!strcmp(oper, "readnew")) {
- wprintf("<EM>No new messages.</EM>\n");
+ wprintf(_("No new messages."));
} else if (!strcmp(oper, "readold")) {
} else if (!strcmp(oper, "readold")) {
- wprintf("<EM>No old messages.</EM>\n");
+ wprintf(_("No old messages."));
- wprintf("<EM>No messages here.</EM>\n");
+ wprintf(_("No messages here."));
"<table border=0 cellspacing=0 "
"cellpadding=0 width=100%%>\n"
"<TR>"
"<table border=0 cellspacing=0 "
"cellpadding=0 width=100%%>\n"
"<TR>"
- "<TD align=center><b><i>Subject</i></b> %s</TD>"
- "<TD align=center><b><i>Sender</i></b> %s</TD>"
- "<TD align=center><b><i>Date</i></b> %s</TD>"
+ "<TD align=center><b><i>%s</i></b> %s</TD>"
+ "<TD align=center><b><i>%s</i></b> %s</TD>"
+ "<TD align=center><b><i>%s</i></b> %s</TD>"
"<TD><INPUT TYPE=\"submit\" NAME=\"sc\" "
"STYLE=\"font-family: Bitstream Vera Sans,Arial,Helvetica,sans-serif;"
" font-size: 6pt;\" "
"VALUE=\"Delete\"></TD>"
"</TR>\n"
,
"<TD><INPUT TYPE=\"submit\" NAME=\"sc\" "
"STYLE=\"font-family: Bitstream Vera Sans,Arial,Helvetica,sans-serif;"
" font-size: 6pt;\" "
"VALUE=\"Delete\"></TD>"
"</TR>\n"
,
- subjsort_button,
- sendsort_button,
- datesort_button
+ _("Subject"), subjsort_button,
+ _("Sender"), sendsort_button,
+ _("Date"), datesort_button
if ((!is_tasks) && (!is_calendar) && (!is_addressbook) && (!is_notes) && (!is_singlecard)) {
wprintf("<div id=\"fix_scrollbar_bug\">"
if ((!is_tasks) && (!is_calendar) && (!is_addressbook) && (!is_notes) && (!is_singlecard)) {
wprintf("<div id=\"fix_scrollbar_bug\">"
- "<table border=0 width=100%% bgcolor=\"#dddddd\"><tr><td>"
- "Reading #%d of %d messages.</TD>\n"
- "<TD ALIGN=RIGHT><FONT SIZE=+1>",
- lowest_displayed, nummsgs);
+ "<table border=0 width=100%% bgcolor=\"#dddddd\"><tr><td>");
+ wprintf(_("Reading #%d of %d messages."), lowest_displayed, nummsgs);
+ wprintf("</TD><TD ALIGN=RIGHT><FONT SIZE=+1>");
if (pn_previous > 0L) {
wprintf("<A HREF=\"/%s"
"?startmsg=%ld"
"?maxmsgs=1"
"?summary=0\">"
if (pn_previous > 0L) {
wprintf("<A HREF=\"/%s"
"?startmsg=%ld"
"?maxmsgs=1"
"?summary=0\">"
+ pn_previous,
+ _("Previous"));
"?startmsg=%ld"
"?maxmsgs=1"
"?summary=0\">"
"?startmsg=%ld"
"?maxmsgs=1"
"?summary=0\">"
}
wprintf("<A HREF=\"/%s?startmsg=%ld"
"?maxmsgs=%d?summary=1\">"
}
wprintf("<A HREF=\"/%s?startmsg=%ld"
"?maxmsgs=%d?summary=1\">"
"</A>",
oper,
WC->msgarr[0],
"</A>",
oper,
WC->msgarr[0],
+ DEFAULT_MAXMSGS,
+ _("Summary")
);
wprintf("</td></tr></table></div>\n");
);
wprintf("</td></tr></table></div>\n");
wprintf("<form name=\"msgomatic\" "
"method=\"POST\" action=\"/do_stuff_to_msgs\">\n");
wprintf("<form name=\"msgomatic\" "
"method=\"POST\" action=\"/do_stuff_to_msgs\">\n");
- wprintf("Reading #", lowest_displayed, highest_displayed);
+ wprintf(_("Reading #"), lowest_displayed, highest_displayed);
wprintf("<select name=\"whichones\" size=\"1\" "
"OnChange=\"location.href=msgomatic.whichones.options"
wprintf("<select name=\"whichones\" size=\"1\" "
"OnChange=\"location.href=msgomatic.whichones.options"
oper,
WC->msgarr[0], is_summary);
oper,
WC->msgarr[0], is_summary);
- wprintf("</select> of %d messages.", nummsgs);
+ wprintf("</select> ");
+ wprintf(_("of %d messages."), nummsgs);
wprintf("</form>\n");
}
}
wprintf("</form>\n");
}
}
wprintf("</SELECT>\n");
wprintf("<br />\n");
wprintf("</SELECT>\n");
wprintf("<br />\n");
- wprintf("<INPUT TYPE=\"submit\" NAME=\"yesno\" VALUE=\"Move\">");
+ wprintf("<INPUT TYPE=\"submit\" NAME=\"move_button\" VALUE=\"Move\">");
- wprintf("<INPUT TYPE=\"submit\" NAME=\"yesno\" VALUE=\"Cancel\">");
+ wprintf("<INPUT TYPE=\"submit\" NAME=\"cancel_button\" VALUE=\"Cancel\">");
wprintf("</form></CENTER>\n");
wprintf("</CENTER>\n");
wprintf("</form></CENTER>\n");
wprintf("</CENTER>\n");
output_headers(1, 1, 1, 0, 0, 0, 0);
output_headers(1, 1, 1, 0, 0, 0, 0);
- if (!strcasecmp(bstr("yesno"), "Move")) {
+ if (strlen(bstr("move_button")) > 0) {
sprintf(buf, "MOVE %ld|%s", msgid, bstr("target_room"));
serv_puts(buf);
serv_getln(buf, sizeof buf);
sprintf(buf, "MOVE %ld|%s", msgid, bstr("target_room"));
serv_puts(buf);
serv_getln(buf, sizeof buf);