From: Art Cancro Date: Fri, 19 Aug 2005 21:46:49 +0000 (+0000) Subject: * inetconf.c, listsub.c, part of mainmenu.c: i18n X-Git-Tag: v7.86~4705 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=f019557bd86523102249a1723ffd0a75d3e0be9f * inetconf.c, listsub.c, part of mainmenu.c: i18n --- diff --git a/webcit/ChangeLog b/webcit/ChangeLog index c43422aba..54961b99b 100644 --- a/webcit/ChangeLog +++ b/webcit/ChangeLog @@ -1,4 +1,7 @@ $Log$ +Revision 621.18 2005/08/19 21:46:48 ajc +* inetconf.c, listsub.c, part of mainmenu.c: i18n + Revision 621.17 2005/08/19 16:56:00 ajc * inetconf.c: partial i18n @@ -2853,4 +2856,3 @@ Sun Dec 6 19:50:55 EST 1998 Art Cancro 1998-12-03 Nathan Bryant * webserver.c: warning fix - diff --git a/webcit/inetconf.c b/webcit/inetconf.c index d2b4938ea..b5569b796 100644 --- a/webcit/inetconf.c +++ b/webcit/inetconf.c @@ -114,10 +114,11 @@ void display_inetconf(void) ""); - wprintf("(Delete)\n"); + wprintf("onClick=\"return confirm('%s');\">", + _("Delete this entry?")); + wprintf(""); + wprintf(_("(Delete)")); + wprintf("\n"); } } wprintf("
\n" @@ -163,7 +164,7 @@ void save_inetconf(void) { && (!strcasecmp(etype, bstr("etype"))) && (!strcasecmp(bstr("oper"), "delete")) ) { - sprintf(WC->ImportantMessage, "%s deleted.", ename); + sprintf(WC->ImportantMessage, _("%s has been deleted."), ename); } else { if (strlen(newconfig) > 0) strcat(newconfig, "\n"); diff --git a/webcit/listsub.c b/webcit/listsub.c index 0d70d08f9..cbcf5af77 100644 --- a/webcit/listsub.c +++ b/webcit/listsub.c @@ -14,11 +14,13 @@ */ void do_listsub(void) { - char cmd[SIZ]; - char room[SIZ]; - char token[SIZ]; - char email[SIZ]; - char subtype[SIZ]; + char cmd[256]; + char room[256]; + char token[256]; + char email[256]; + char subtype[256]; + char escaped_email[256]; + char escaped_room[256]; char buf[SIZ]; int self; @@ -28,7 +30,9 @@ void do_listsub(void) strcpy(WC->wc_password, ""); strcpy(WC->wc_roomname, ""); - wprintf("List subscription\n"); + wprintf(""); + wprintf(_("List subscription")); + wprintf("\n"); strcpy(cmd, bstr("cmd")); strcpy(room, bstr("room")); @@ -38,9 +42,9 @@ void do_listsub(void) wprintf("
" "
" - "List subscribe/unsubscribe\n" - "

\n" - ); + ""); + wprintf(_("List subscribe/unsubscribe")); + wprintf("
\n"); /* * Subscribe command @@ -54,12 +58,15 @@ void do_listsub(void) ); serv_getln(buf, sizeof buf); if (buf[0] == '2') { - wprintf("

Confirmation request sent

" - "You are subscribing "); - escputs(email); - wprintf(" to the ""); - escputs(room); - wprintf("" mailing list. The listserver has " + stresc(escaped_email, email, 0, 0); + stresc(escaped_room, room, 0, 0); + + wprintf("

"); + wprintf(_("Confirmation request sent")); + wprintf("

"); + wprintf(_("You are subscribing %s" + " to the %s mailing list. " + "The listserver has " "sent you an e-mail with one additional " "Web link for you to click on to confirm " "your subscription. This extra step is for " @@ -68,9 +75,9 @@ void do_listsub(void) "without your consent.

" "Please click on the link which is being " "e-mailed to you and your subscription will " - "be confirmed.
\n" - "Back...
\n" - ); + "be confirmed.
\n"), + escaped_email, escaped_room); + wprintf("%s
\n", _("Go back...")); } else { wprintf("ERROR: %s" diff --git a/webcit/mainmenu.c b/webcit/mainmenu.c index c7e15823f..568e44e61 100644 --- a/webcit/mainmenu.c +++ b/webcit/mainmenu.c @@ -18,7 +18,7 @@ void display_main_menu(void) "" "" "
\n"); - svprintf("BOXTITLE", WCS_STRING, "Basic commands"); + svprintf("BOXTITLE", WCS_STRING, _("Basic commands")); do_template("beginbox"); wprintf("\n" @@ -26,85 +26,90 @@ void display_main_menu(void) "
"); /* start of first column */ - wprintf("" - "" - "List known rooms
" - "" - "Where can I go from here?
\n" - ); + wprintf(""); + wprintf(_("List known rooms")); + wprintf("
"); + wprintf(_("Where can I go from here?")); + wprintf("
\n"); wprintf("" - "" - "Goto next room
" - "" - "...with unread messages" - "
\n" - ); + ""); + wprintf(_("Goto next room")); + wprintf("
" + ""); + wprintf(_("...with unread messages")); + wprintf("
\n"); wprintf("" - "" - "Skip to next room
" - "" - "(come back here later)" - "\n" - ); + ""); + wprintf(_("Skip to next room")); + wprintf("
" + ""); + wprintf(_("(come back here later)")); + wprintf("\n"); if ((strlen(WC->ugname) > 0) && (strcasecmp(WC->ugname, WC->wc_roomname))) { wprintf("
" "" - "" - "Ungoto
" - "" - "(oops! Back to %s)" - "\n", WC->ugname - ); + ""); + wprintf(_("Ungoto")); + wprintf("
" + ""); + wprintf(_("(oops! Back to %s)")); + wprintf("\n", WC->ugname); } wprintf("
\n"); /* start of second column */ wprintf("" - "" - "Read new messages
" - "" - "...in this room
\n" - ); + ""); + wprintf(_("Read new messages")); + wprintf("
" + ""); + wprintf(_("...in this room")); + wprintf("
\n"); wprintf("" - "" - "Read all messages
" - "" - "...old and new
\n" - ); + ""); + wprintf(_("Read all messages")); + wprintf("
" + ""); + wprintf(_("...old and new")); + wprintf("
\n"); wprintf("" - "" - "Enter a message
" - "" - "(post in this room)\n" - ); + ""); + wprintf(_("Enter a message")); + wprintf("
" + ""); + wprintf(_("(post in this room)")); + wprintf("\n"); wprintf("
"); /* start of third column */ wprintf("" - "" - "Summary page
" - "" - "Summary of my account
\n" - ); + ""); + wprintf(_("Summary page")); + wprintf("
" + ""); + wprintf(_("Summary of my account")); + wprintf("
\n"); wprintf("\n" - "" - "User list
" - "" - "(all registered users)
\n" - ); + ""); + wprintf(_("User list")); + wprintf("
" + ""); + wprintf(_("(all registered users)")); + wprintf("
\n"); wprintf("" - "" - "Log off
" - "" - "Bye!\n" - ); + ""); + wprintf(_("Log off")); + wprintf("
" + ""); + wprintf(_("Bye!")); + wprintf("\n"); wprintf("
\n"); do_template("endbox"); @@ -116,56 +121,63 @@ void display_main_menu(void) do_template("beginbox"); wprintf("" - "" - "Change your preferences and settings" - "
\n"); + ""); + wprintf(_("Change your preferences and settings")); + wprintf("
\n"); wprintf("
" - "" - "Update your contact information" - "
\n"); + ""); + wprintf(_("Update your contact information")); + wprintf("
\n"); wprintf("
" - "" - "Change your password
\n"); + ""); + wprintf(_("Change your password")); + wprintf("
\n"); wprintf("" - "" - "Enter your 'bio'
\n"); + ""); + wprintf(_("Enter your 'bio'")); + wprintf("
\n"); wprintf("" - "" - "Edit your online photo\n"); + ""); + wprintf(_("Edit your online photo")); + wprintf("\n"); do_template("endbox"); wprintf(""); - svprintf("BOXTITLE", WCS_STRING, "Advanced room commands"); + svprintf("BOXTITLE", WCS_STRING, _("Advanced room commands")); do_template("beginbox"); if ((WC->axlevel >= 6) || (WC->is_room_aide)) { wprintf("" - "" - "Edit or delete this room
\n"); + ""); + wprintf(_("Edit or delete this room")); + wprintf("
\n"); } wprintf("" - "" - "Go to a "hidden" room
\n"); + ""); + wprintf(_("Go to a 'hidden' room")); + wprintf("
\n"); wprintf("" - "" - "Create a new room
\n"); + ""); + wprintf(_("Create a new room")); + wprintf("
\n"); wprintf("" - "" - "Zap (forget) this room (%s)
\n", - WC->wc_roomname); + ""); + wprintf(_("Zap (forget) this room (%s)"), WC->wc_roomname); + wprintf("
\n"); wprintf("" - "" - "List all forgotten rooms\n"); + ""); + wprintf(_("List all forgotten rooms")); + wprintf("\n"); do_template("endbox"); @@ -182,7 +194,9 @@ void display_aide_menu(void) output_headers(1, 1, 2, 0, 0, 0, 0); wprintf("
\n" "
" - "System Administration Menu" + ""); + wprintf(_("System Administration Menu")); + wprintf("" "
\n" "
\n
\n" ); @@ -190,47 +204,50 @@ void display_aide_menu(void) wprintf("
" "
"); - svprintf("BOXTITLE", WCS_STRING, "Global Configuration"); + svprintf("BOXTITLE", WCS_STRING, _("Global Configuration")); do_template("beginbox"); wprintf("" - "" - "Edit site-wide configuration
\n"); + ""); + wprintf(_("Edit site-wide configuration")); + wprintf("
\n"); wprintf("" - "" - "Domain names and Internet mail configuration
\n"); + ""); + wprintf(_("Domain names and Internet mail configuration")); + wprintf("
\n"); wprintf("" - "" - "Configure replication with other Citadel servers" - "\n"); + ""); + wprintf(_("Configure replication with other Citadel servers")); + wprintf("\n"); do_template("endbox"); wprintf("
"); - svprintf("BOXTITLE", WCS_STRING, "User account management"); + svprintf("BOXTITLE", WCS_STRING, _("User account management")); do_template("beginbox"); wprintf("" - "" - "Add, change, delete user accounts" - "
\n"); + ""); + wprintf(_("Add, change, delete user accounts")); + wprintf("
\n"); wprintf("" - "" - "Validate new users
\n"); + ""); + wprintf(_("Validate new users")); + wprintf("
\n"); do_template("endbox"); - svprintf("BOXTITLE", WCS_STRING, "Rooms and Floors"); + svprintf("BOXTITLE", WCS_STRING, _("Rooms and Floors")); do_template("beginbox"); wprintf("" - "" - "Add, change, or delete floors" - "\n"); + ""); + wprintf(_("Add, change, or delete floors")); + wprintf("\n"); do_template("endbox"); @@ -250,8 +267,9 @@ void display_generic(void) output_headers(1, 1, 2, 0, 0, 0, 0); wprintf("
\n" "
" - "Enter a server command" - "
\n" + ""); + wprintf(_("Enter a server command")); + wprintf("
\n" "
\n
\n" ); @@ -259,20 +277,22 @@ void display_generic(void) "
\n"); wprintf("
"); - wprintf("This screen allows you to enter Citadel server commands which are\n"); - wprintf("not supported by WebCit. If you do not know what that means,\n"); - wprintf("then this screen will not be of much use to you.
\n"); + wprintf(_("This screen allows you to enter Citadel server commands which are " + "not supported by WebCit. If you do not know what that means, " + "then this screen will not be of much use to you.")); + wprintf("
\n"); wprintf("\n"); - wprintf("Enter command:
\n"); - wprintf("
\n"); + wprintf(_("Enter command:")); + wprintf("

\n"); - wprintf("Command input (if requesting SEND_LISTING transfer mode):
\n"); - wprintf("
\n"); + wprintf(_("Command input (if requesting SEND_LISTING transfer mode):")); + wprintf("

\n"); - wprintf("Detected host header is http://%s\n", - WC->http_host); + wprintf(""); + wprintf(_("Detected host header is %s://%s"), (is_https ? "https" : "http"), WC->http_host); + wprintf("\n"); wprintf(""); wprintf(" "); wprintf("
\n");