From a82412ac70bbcc69ed8d2ef6693b1959268684fe Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Mon, 22 Aug 2005 04:33:30 +0000 Subject: [PATCH] * paging.c preferences.c roomops.c : i18n * Also changed various "OK" buttons to labels more descriptive of their actual functions. --- webcit/ChangeLog | 6 +- webcit/netconf.c | 98 ++++++--- webcit/paging.c | 129 ++++++----- webcit/preferences.c | 38 +++- webcit/roomops.c | 509 +++++++++++++++++++++++++------------------ 5 files changed, 465 insertions(+), 315 deletions(-) diff --git a/webcit/ChangeLog b/webcit/ChangeLog index c64e5496c..1355027da 100644 --- a/webcit/ChangeLog +++ b/webcit/ChangeLog @@ -1,4 +1,9 @@ $Log$ +Revision 621.22 2005/08/22 04:33:30 ajc +* paging.c preferences.c roomops.c : i18n +* Also changed various "OK" buttons to labels more descriptive of + their actual functions. + Revision 621.21 2005/08/22 01:02:42 ajc * messages.c: finished i18n * webcit.h: minimum required Citadel server version is now 6.55; this is @@ -2869,4 +2874,3 @@ Sun Dec 6 19:50:55 EST 1998 Art Cancro 1998-12-03 Nathan Bryant * webserver.c: warning fix - diff --git a/webcit/netconf.c b/webcit/netconf.c index 359e07f66..a72d51b05 100644 --- a/webcit/netconf.c +++ b/webcit/netconf.c @@ -13,7 +13,7 @@ void edit_node(void) { char cnode[SIZ]; FILE *fp; - if (!strcmp(bstr("sc"), "OK")) { + if (strlen(bstr("ok_button")) > 0) { strcpy(node, bstr("node") ); fp = tmpfile(); if (fp != NULL) { @@ -57,24 +57,26 @@ void display_add_node(void) output_headers(1, 1, 2, 0, 0, 0, 0); wprintf("
\n"); wprintf("
"); - wprintf("Add new node"); + wprintf(""); + wprintf(_("Add a new node")); + wprintf(""); wprintf("
\n"); wprintf("
\n
\n"); wprintf("
\n"); wprintf("
\n"); - wprintf(""); + wprintf("", _("Node name")); wprintf("\n"); - wprintf(""); + wprintf("", _("Shared secret")); wprintf("\n"); - wprintf(""); + wprintf("", _("Host or IP address")); wprintf("\n"); - wprintf(""); + wprintf("", _("Port number")); wprintf("\n"); wprintf("
Node name
%s
Shared secret
%s
Host or IP
%s
Port
%s

"); - wprintf(""); + wprintf("", _("Add node")); wprintf(" "); - wprintf(""); + wprintf("", _("Cancel")); wprintf("
\n"); wDumpContent(1); @@ -82,19 +84,20 @@ void display_add_node(void) void display_edit_node(void) { - char buf[SIZ]; - char node[SIZ]; - char cnode[SIZ]; - char csecret[SIZ]; - char chost[SIZ]; - char cport[SIZ]; + char buf[512]; + char node[256]; + char cnode[256]; + char csecret[256]; + char chost[256]; + char cport[256]; strcpy(node, bstr("node")); output_headers(1, 1, 2, 0, 0, 0, 0); wprintf("
\n"); wprintf("
"); - wprintf("Edit node configuration for "); + wprintf(""); + wprintf(_("Edit node configuration for ")); escputs(node); wprintf("\n"); wprintf("
\n"); @@ -112,18 +115,28 @@ void display_edit_node(void) if (!strcasecmp(node, cnode)) { wprintf("
\n"); wprintf("
\n"); - wprintf(""); + wprintf(""); wprintf("\n", cnode); - wprintf(""); + wprintf(""); wprintf("\n", csecret); - wprintf(""); + wprintf(""); wprintf("\n", chost); - wprintf(""); + wprintf(""); wprintf("\n", cport); wprintf("
Node name
"); + wprintf(_("Node name")); + wprintf("
Shared secret
"); + wprintf(_("Shared secret")); + wprintf("
Host or IP
"); + wprintf(_("Host or IP address")); + wprintf("
Port
"); + wprintf(_("Port number")); + wprintf("

"); - wprintf(""); + wprintf("", + _("Save changes")); wprintf(" "); - wprintf(""); + wprintf("", + _("Cancel")); wprintf("
\n"); } @@ -147,17 +160,22 @@ void display_netconf(void) output_headers(1, 1, 2, 0, 0, 0, 0); wprintf("
\n"); wprintf("
"); - wprintf("Network configuration\n"); + wprintf(""); + wprintf(_("Network configuration")); + wprintf("\n"); wprintf("
\n"); wprintf("
\n
\n"); wprintf("
"); wprintf(""); - wprintf("Add a new node
\n"); + wprintf(_("Add a new node")); + wprintf("
\n"); wprintf("
"); wprintf("
"); - wprintf("Currently configured nodes\n"); + wprintf(""); + wprintf(_("Currently configured nodes")); + wprintf("\n"); wprintf("
\n"); serv_puts("CONF getsys|application/x-citadel-ignet-config"); serv_getln(buf, sizeof buf); @@ -170,10 +188,14 @@ void display_netconf(void) wprintf(""); wprintf("(Edit)"); + wprintf("\">"); + wprintf(_("(Edit)")); + wprintf(""); wprintf("(Delete)"); + wprintf("\">"); + wprintf(_("(Delete)")); + wprintf(""); wprintf("\n"); } wprintf("\n"); @@ -189,18 +211,26 @@ void display_confirm_delete_node(void) output_headers(1, 1, 2, 0, 0, 0, 0); wprintf("
\n"); wprintf("
"); - wprintf("Confirm delete\n"); + wprintf(""); + wprintf(_("Confirm delete")); + wprintf("\n"); wprintf("
\n"); wprintf("
\n
\n"); strcpy(node, bstr("node")); - wprintf("
Are you sure you want to delete "); + wprintf("
"); + wprintf(_("Are you sure you want to delete ")); + wprintf(""); escputs(node); wprintf("?
\n"); wprintf("Yes   "); - wprintf("No
\n"); + wprintf("\">"); + wprintf(_("Yes")); + wprintf("   "); + wprintf(""); + wprintf(_("No")); + wprintf("
\n"); wDumpContent(1); } @@ -247,19 +277,19 @@ void add_node(void) { char node[SIZ]; char buf[SIZ]; - char sc[SIZ]; strcpy(node, bstr("node")); - strcpy(sc, bstr("sc")); - if (!strcmp(sc, "Add")) { + if (strlen(bstr("add_button")) > 0) { sprintf(buf, "NSET addnode|%s", node); serv_puts(buf); serv_getln(buf, sizeof buf); if (buf[0] == '1') { output_headers(1, 1, 0, 0, 0, 0, 0); server_to_text(); - wprintf("Back to menu\n"); + wprintf(""); + wprintf(_("Back to menu")); + wprintf("\n"); wDumpContent(1); } else { strcpy(WC->ImportantMessage, &buf[4]); diff --git a/webcit/paging.c b/webcit/paging.c index c202b3e7b..8b66a6eab 100644 --- a/webcit/paging.c +++ b/webcit/paging.c @@ -18,7 +18,9 @@ void display_page(void) output_headers(1, 1, 2, 0, 0, 0, 0); wprintf("
\n" "
" - "Send instant message" + ""); + wprintf(_("Send instant message")); + wprintf("" "
\n" "
\n
\n" ); @@ -26,7 +28,7 @@ void display_page(void) wprintf("
" "
\n"); - wprintf("Send an instant message to: "); + wprintf(_("Send an instant message to: ")); escputs(recp); wprintf("
\n"); @@ -42,15 +44,16 @@ void display_page(void) escputs(bstr("closewin")); wprintf("\">\n"); - wprintf("Enter message text:
"); + wprintf(_("Enter message text:")); + wprintf("
"); wprintf("\n"); wprintf("

\n"); - wprintf(""); - wprintf("
\n"); + wprintf("", _("Send message")); + wprintf("
\n", _("Cancel")); wprintf("
\n"); wprintf("
\n"); @@ -63,24 +66,26 @@ void display_page(void) void page_user(void) { char recp[SIZ]; - char sc[SIZ]; char buf[SIZ]; char closewin[SIZ]; output_headers(1, 1, 2, 0, 0, 0, 0); wprintf("
\n" "
" - "Add or edit an event" + ""); + wprintf(_("Add or edit an event")); + wprintf("" "
\n" "
\n
\n" ); strcpy(recp, bstr("recp")); - strcpy(sc, bstr("sc")); strcpy(closewin, bstr("closewin")); - if (strcmp(sc, "Send message")) { - wprintf("Message was not sent.
\n"); + if (strlen(bstr("send_button")) == 0) { + wprintf(""); + wprintf(_("Message was not sent.")); + wprintf("
\n"); } else { serv_printf("SEXP %s|-", recp); serv_getln(buf, sizeof buf); @@ -88,7 +93,8 @@ void page_user(void) if (buf[0] == '4') { text_to_server(bstr("msgtext"), 0); serv_puts("000"); - wprintf("Message has been sent to "); + wprintf(""); + wprintf(_("Message has been sent to ")); escputs(recp); wprintf(".
\n"); } @@ -98,8 +104,9 @@ void page_user(void) } if (!strcasecmp(closewin, "yes")) { - wprintf("
" - "[ close window ]
\n"); + wprintf("
"); + wprintf(_("[ close window ]")); + wprintf("
\n"); } wDumpContent(1); @@ -151,13 +158,16 @@ void page_popup(void) extract_token(pagefrom, &buf[4], 3, '|', sizeof pagefrom); wprintf("" "" "
"); - wprintf("Instant message from "); + wprintf(""); + wprintf(_("Instant message from ")); escputs(pagefrom); wprintf("
"); fmout(NULL, "LEFT"); wprintf("
" "
\n"); @@ -260,7 +270,8 @@ void chat_recv(void) { ); if (setup_chat_socket() != 0) { - wprintf("Error setting up chat socket\n"); + wprintf(_("An error occurred while setting up the chat socket.")); + wprintf("\n"); wDumpContent(0); return; } @@ -285,7 +296,8 @@ void chat_recv(void) { serv_getln(buf, sizeof buf); if (!strcmp(buf, "000")) { - strcpy(buf, ":|exiting chat mode"); + strcpy(buf, ":|"); + strcat(buf, _("Now exiting chat mode.")); end_chat_now = 1; } @@ -407,62 +419,59 @@ void chat_send(void) { strcpy(send_this, ""); } - if (bstr("sendbutton") != NULL) { - - if (!strcasecmp(bstr("sendbutton"), "Help")) { - strcpy(send_this, "/help"); - } + if (strlen(bstr("help_button")) > 0) { + strcpy(send_this, "/help"); + } - if (!strcasecmp(bstr("sendbutton"), "List Users")) { - strcpy(send_this, "/who"); - } + if (strlen(bstr("list_button")) > 0) { + strcpy(send_this, "/who"); + } - if (!strcasecmp(bstr("sendbutton"), "Exit")) { - strcpy(send_this, "/quit"); - } + if (strlen(bstr("exit_button")) > 0) { + strcpy(send_this, "/quit"); + } - if (setup_chat_socket() != 0) { - wprintf("Error setting up chat socket\n"); - wDumpContent(0); - return; - } + if (setup_chat_socket() != 0) { + wprintf(_("An error occurred while setting up the chat socket.")); + wprintf("\n"); + wDumpContent(0); + return; + } - /* Temporarily swap the serv and chat sockets during chat talk */ - i = WC->serv_sock; - WC->serv_sock = WC->chat_sock; - WC->chat_sock = i; + /* Temporarily swap the serv and chat sockets during chat talk */ + i = WC->serv_sock; + WC->serv_sock = WC->chat_sock; + WC->chat_sock = i; - while (strlen(send_this) > 0) { - if (strlen(send_this) < 67) { - serv_puts(send_this); - strcpy(send_this, ""); - } - else { - for (i=55; i<67; ++i) { - if (send_this[i] == ' ') break; - } - strncpy(buf, send_this, i); - buf[i] = 0; - strcpy(send_this, &send_this[i]); - serv_puts(buf); + while (strlen(send_this) > 0) { + if (strlen(send_this) < 67) { + serv_puts(send_this); + strcpy(send_this, ""); + } + else { + for (i=55; i<67; ++i) { + if (send_this[i] == ' ') break; } + strncpy(buf, send_this, i); + buf[i] = 0; + strcpy(send_this, &send_this[i]); + serv_puts(buf); } - - /* Unswap the sockets. */ - i = WC->serv_sock; - WC->serv_sock = WC->chat_sock; - WC->chat_sock = i; - } + /* Unswap the sockets. */ + i = WC->serv_sock; + WC->serv_sock = WC->chat_sock; + WC->chat_sock = i; + wprintf("
\n"); wprintf("\n", SIZ-10); wprintf("
"); - wprintf("\n"); - wprintf("\n"); - wprintf("\n"); - wprintf("\n"); + wprintf("\n", _("Send")); + wprintf("\n", _("Help")); + wprintf("\n", _("List users")); + wprintf("\n", _("Exit")); wprintf("
\n"); wprintf("\n"); diff --git a/webcit/preferences.c b/webcit/preferences.c index 0fa13b502..d7939c998 100644 --- a/webcit/preferences.c +++ b/webcit/preferences.c @@ -178,7 +178,8 @@ void display_preferences(void) wprintf("
\n"); wprintf("
"); wprintf("\""); - wprintf(" Preferences and settings"); + wprintf(" "); + wprintf(_("Preferences and settings")); wprintf(""); offer_start_page(); wprintf("
\n"); @@ -196,37 +197,52 @@ void display_preferences(void) get_preference("roomlistview", buf, sizeof buf); - wprintf("Room list view"); + wprintf(""); + wprintf(_("Room list view")); + wprintf(""); wprintf("Tree (folders) view
\n"); + wprintf(">"); + wprintf(_("Tree (folders) view")); + wprintf("
\n"); wprintf("Table (rooms) view
\n"); + wprintf(">"); + wprintf(_("Table (rooms) view")); + wprintf("
\n"); wprintf("\n"); get_preference("calhourformat", buf, sizeof buf); if (buf[0] == 0) strcpy(buf, "12"); - wprintf("Calendar hour format"); + wprintf(""); + wprintf(_("Calendar hour format")); + wprintf(""); wprintf("12 hour (am/pm)
\n"); + wprintf(">"); + wprintf(_("12 hour (am/pm)")); + wprintf("
\n"); wprintf("24 hour
\n"); + wprintf(">"); + wprintf(_("24 hour")); + wprintf("
\n"); wprintf("\n"); wprintf("\n" - "" + "" " " - "\n"); + "\n", + _("Change"), + _("Cancel") + ); wprintf("\n"); @@ -242,9 +258,9 @@ void display_preferences(void) */ void set_preferences(void) { - if (strcmp(bstr("action"), "Change")) { + if (strlen(bstr("change_button")) == 0) { safestrncpy(WC->ImportantMessage, - "Cancelled. No settings were changed.", + _("Cancelled. No settings were changed."), sizeof WC->ImportantMessage); display_main_menu(); return; diff --git a/webcit/roomops.c b/webcit/roomops.c index d01fdfebb..f0190ab5d 100644 --- a/webcit/roomops.c +++ b/webcit/roomops.c @@ -208,13 +208,13 @@ void zapped_list(void) { output_headers(1, 1, 0, 0, 0, 0, 0); - svprintf("BOXTITLE", WCS_STRING, "Zapped (forgotten) rooms"); + svprintf("BOXTITLE", WCS_STRING, _("Zapped (forgotten) rooms")); do_template("beginbox"); listrms("LZRM -1"); wprintf("

\n"); - wprintf("Click on any room to un-zap it and goto that room.\n"); + wprintf(_("Click on any room to un-zap it and goto that room.\n")); do_template("endbox"); wDumpContent(1); } @@ -301,9 +301,12 @@ void embed_newmail_button(void) { wprintf( "" "" - "
" - "%d new mail
", WC->new_mail); + "ALT=\""); + wprintf(_("You have new mail")); + wprintf("\">" + "
"); + wprintf(_("%d new mail"), WC->new_mail); + wprintf(""); WC->remember_new_mail = WC->new_mail; } } @@ -392,8 +395,8 @@ void embed_room_banner(char *got, int navbar_style) { "" "" "" - "Ungoto" - "\n" + "%s" + "\n", _("Ungoto") ); if ( (navbar_style == navbar_default) && (WC->wc_view == VIEW_BBS) ) { @@ -401,8 +404,8 @@ void embed_room_banner(char *got, int navbar_style) { "" "" "" - "Read new messages" - "\n" + "%s" + "\n", _("Read new messages") ); } @@ -415,8 +418,8 @@ void embed_room_banner(char *got, int navbar_style) { "" "" - "View contacts" - "\n" + "%s" + "\n", _("View contacts") ); break; case VIEW_CALENDAR: @@ -426,8 +429,8 @@ void embed_room_banner(char *got, int navbar_style) { "" "" - "Day view" - "\n" + "%s" + "\n", _("Day view") ); wprintf( "" @@ -435,8 +438,8 @@ void embed_room_banner(char *got, int navbar_style) { "" "" - "Month view" - "\n" + "%s" + "\n", _("Month view") ); break; case VIEW_TASKS: @@ -446,8 +449,8 @@ void embed_room_banner(char *got, int navbar_style) { "" "" - "View tasks" - "\n" + "%s" + "\n", _("View tasks") ); break; case VIEW_NOTES: @@ -457,8 +460,8 @@ void embed_room_banner(char *got, int navbar_style) { "" "" - "View notes" - "\n" + "%s" + "\n", _("View notes") ); break; case VIEW_MAILBOX: @@ -468,8 +471,8 @@ void embed_room_banner(char *got, int navbar_style) { "" "" - "View message list" - "\n" + "%s" + "\n", _("View message list") ); break; default: @@ -479,8 +482,8 @@ void embed_room_banner(char *got, int navbar_style) { "" "" - "Read all messages" - "\n" + "%s" + "\n", _("Read all messages") ); break; } @@ -493,8 +496,8 @@ void embed_room_banner(char *got, int navbar_style) { "" "" - "Add new contact" - "\n" + "%s" + "\n", _("Add new contact") ); break; case VIEW_CALENDAR: @@ -502,8 +505,8 @@ void embed_room_banner(char *got, int navbar_style) { "" "" - "Add new event" - "\n" + "%s" + "\n", _("Add new event") ); break; case VIEW_TASKS: @@ -511,8 +514,8 @@ void embed_room_banner(char *got, int navbar_style) { "" "" - "Add new task" - "\n" + "%s" + "\n", _("Add new task") ); break; case VIEW_NOTES: @@ -520,8 +523,8 @@ void embed_room_banner(char *got, int navbar_style) { "" "" - "Add new note" - "\n" + "%s" + "\n", _("Add new note") ); break; default: @@ -529,8 +532,8 @@ void embed_room_banner(char *got, int navbar_style) { "" "" - "Enter a message" - "\n" + "%s" + "\n", _("Enter a message") ); break; } @@ -539,19 +542,23 @@ void embed_room_banner(char *got, int navbar_style) { if (navbar_style == navbar_default) wprintf( "" "" + "TITLE=\"%s\">" "" - "Skip this room" - "\n" + "%s" + "\n", + _("Leave all messages marked as unread, go to next room with unread messages"), + _("Skip this room") ); if (navbar_style == navbar_default) wprintf( "" "" + "TITLE=\"%s\">" "" - "Goto next room" - "\n" + "%s" + "\n", + _("Mark all messages as read, go to next room with unread messages"), + _("Goto next room") ); wprintf("
\n"); @@ -846,7 +853,7 @@ void display_editroom(void) char node[SIZ]; char remote_room[SIZ]; char recp[SIZ]; - char er_name[20]; + char er_name[128]; char er_password[10]; char er_dirname[15]; char er_roomaide[26]; @@ -894,7 +901,7 @@ void display_editroom(void) else { wprintf(""); } - wprintf("Administration"); + wprintf(_("Administration")); if (!strcmp(tab, "admin")) { wprintf("\n"); } @@ -910,7 +917,7 @@ void display_editroom(void) else { wprintf(""); } - wprintf("Configuration"); + wprintf(_("Configuration")); if (!strcmp(tab, "config")) { wprintf("\n"); } @@ -926,7 +933,7 @@ void display_editroom(void) else { wprintf(""); } - wprintf("Message expire policy"); + wprintf(_("Message expire policy")); if (!strcmp(tab, "expire")) { wprintf("\n"); } @@ -942,7 +949,7 @@ void display_editroom(void) else { wprintf(""); } - wprintf("Access controls"); + wprintf(_("Access controls")); if (!strcmp(tab, "access")) { wprintf("\n"); } @@ -958,7 +965,7 @@ void display_editroom(void) else { wprintf(""); } - wprintf("Sharing"); + wprintf(_("Sharing")); if (!strcmp(tab, "sharing")) { wprintf("\n"); } @@ -974,7 +981,7 @@ void display_editroom(void) else { wprintf(""); } - wprintf("Mailing list service"); + wprintf(_("Mailing list service")); if (!strcmp(tab, "listserv")) { wprintf("\n"); } @@ -995,22 +1002,32 @@ void display_editroom(void) if (!strcmp(tab, "admin")) { wprintf(""); } if (!strcmp(tab, "config")) { wprintf("
\n"); - wprintf("
  • Name of room: "); - wprintf("\n", er_name); + wprintf("
    • "); + wprintf(_("Name of room: ")); + wprintf("\n", + er_name, + (sizeof(er_name)-1) + ); - wprintf("
    • Resides on floor: "); + wprintf("
    • "); + wprintf(_("Resides on floor: ")); wprintf("\n"); - wprintf("
    • Type of room:
        \n"); + wprintf("
      • "); + wprintf(_("Type of room:")); + wprintf("
          \n"); wprintf("
        • Public room\n"); + wprintf("> "); + wprintf(_("Public room")); + wprintf("\n"); wprintf("
        • Private - guess name\n"); + wprintf("> "); + wprintf(_("Private - guess name")); - wprintf("
        • Private - require password:\n"); - wprintf("\n", er_password); + wprintf("> "); + wprintf(_("Private - require password:")); + wprintf("\n\n", + er_password); wprintf("
        • Private - invitation only\n"); + wprintf("> "); + wprintf(_("Private - invitation only")); - wprintf("
        • If private, cause current users to forget room\n"); + wprintf("\n
        • "); + wprintf(_("If private, cause current users to forget room")); - wprintf("
        \n"); + wprintf("\n
      \n"); wprintf("
    • Preferred users only\n"); + wprintf("> "); + wprintf(_("Preferred users only")); - wprintf("
    • Read-only room\n"); + wprintf("> "); + wprintf(_("Read-only room")); /* directory stuff */ - wprintf("
    • File directory room\n"); + wprintf("> "); + wprintf(_("File directory room")); - wprintf("
      • Directory name: "); - wprintf("\n", er_dirname); + wprintf("\n
        • "); + wprintf(_("Directory name: ")); + wprintf("\n", + er_dirname); wprintf("
        • Uploading allowed\n"); + wprintf("> "); + wprintf(_("Uploading allowed")); - wprintf("
        • Downloading allowed\n"); + wprintf("> "); + wprintf(_("Downloading allowed")); - wprintf("
        • Visible directory
        \n"); + wprintf("> "); + wprintf(_("Visible directory")); + wprintf("
      \n"); /* end of directory stuff */ wprintf("
    • Network shared room\n"); + wprintf("> "); + wprintf(_("Network shared room")); - wprintf("
    • Permanent (does not auto-purge)\n"); + wprintf("> "); + wprintf(_("Permanent (does not auto-purge)")); /* start of anon options */ - wprintf("
    • Anonymous messages
        \n"); + wprintf("\n
      • "); + wprintf(_("Anonymous messages")); + wprintf("
          \n"); wprintf("
        • No anonymous messages\n"); + wprintf("> "); + wprintf(_("No anonymous messages")); - wprintf("
        • All messages are anonymous\n"); + wprintf("> "); + wprintf(_("All messages are anonymous")); - wprintf("
        • Prompt user when entering messages
        \n"); + wprintf("> "); + wprintf(_("Prompt user when entering messages")); + wprintf("
      \n"); /* end of anon options */ - wprintf("
    • Room aide: \n"); + wprintf("
    • "); + wprintf(_("Room aide: ")); serv_puts("GETA"); serv_getln(buf, sizeof buf); if (buf[0] != '2') { @@ -1135,10 +1179,12 @@ void display_editroom(void) wprintf("
    \n"); wprintf("\n" - "" + "" " " - "" - "
    \n" + "" + "\n", + _("Save changes"), + _("Cancel") ); } @@ -1192,16 +1238,21 @@ void display_editroom(void) /* Display the stuff */ wprintf("

    " "" - "" - "\n" + "" + "\n" "" "
    Shared withNot shared with
    "); + wprintf(_("Shared with")); + wprintf(""); + wprintf(_("Not shared with")); + wprintf("
    \n"); - wprintf("" - "" - "" - "" - "\n" - ); + wprintf("
    Remote node nameRemote room nameActions
    \n"); for (i=0; i\n"); wprintf(""); + "NAME=\"unshare_button\" VALUE=\"%s\">", _("Unshare")); wprintf("\n"); } } wprintf("
    "); + wprintf(_("Remote node name")); + wprintf(""); + wprintf(_("Remote room name")); + wprintf(""); + wprintf(_("Actions")); + wprintf("
    \n"); wprintf("
    \n"); - wprintf("" - "" - "" - "" - "\n" - ); + wprintf("
    Remote node nameRemote room nameActions
    \n"); for (i=0; i\n"); wprintf(""); + "NAME=\"add_button\" VALUE=\"%s\">", _("Share")); wprintf("\n"); } } @@ -1277,17 +1329,18 @@ void display_editroom(void) wprintf("
    "); + wprintf(_("Remote node name")); + wprintf(""); + wprintf(_("Remote room name")); + wprintf(""); + wprintf(_("Actions")); + wprintf("
    \n"); wprintf("

    \n" - "Notes:
    • When sharing a room, " + "%s
      • ", _("Notes:")); + wprintf(_("When sharing a room, " "it must be shared from both ends. Adding a node to " "the 'shared' list sends messages out, but in order to" " receive messages, the other nodes must be configured" - " to send messages out to your system as well.\n" + " to send messages out to your system as well. " "
      • If the remote room name is blank, it is assumed " "that the room name is identical on the remote node." "
      • If the remote room name is different, the remote " "node must also configure the name of the room here." "

      \n" - ); + )); } @@ -1298,10 +1351,10 @@ void display_editroom(void) "" "
      "); - wprintf("The contents of this room are being " + wprintf(_("The contents of this room are being " "mailed as individual messages " "to the following list recipients:" - "

      \n"); + "


      \n")); serv_puts("GNET"); serv_getln(buf, sizeof buf); @@ -1314,23 +1367,24 @@ void display_editroom(void) wprintf(" (remove)
      "); - + wprintf("&tab=listserv\">"); + wprintf(_("(remove)")); + wprintf("
      "); } } wprintf("
      \n" "\n" "\n"); wprintf("\n"); - wprintf(""); + wprintf("", _("Add")); wprintf("
      \n"); wprintf("
      \n"); - wprintf("The contents of this room are being " + wprintf(_("The contents of this room are being " "mailed in digest form " "to the following list recipients:" - "

      \n"); + "


      \n")); serv_puts("GNET"); serv_getln(buf, sizeof buf); @@ -1343,37 +1397,38 @@ void display_editroom(void) wprintf(" (remove)
      "); - + wprintf("&tab=listserv\">"); + wprintf(_("(remove)")); + wprintf("
      "); } } wprintf("
      \n" "\n" "\n"); wprintf("\n"); - wprintf(""); + wprintf("", _("Add")); wprintf("
      \n"); wprintf("

      \n"); if (self_service(999) == 1) { - wprintf("This room is configured to allow " - "self-service subscribe/unsubscribe requests." - " " - "Click to disable.
      \n" - "The URL for subscribe/unsubscribe is: " - "http://%s/listsub
      \n", - WC->http_host - ); + wprintf(_("This room is configured to allow " + "self-service subscribe/unsubscribe requests.")); + wprintf(""); + wprintf(_("Click to disable.")); + wprintf("
      \n"); + wprintf(_("The URL for subscribe/unsubscribe is: ")); + wprintf("%s://%s/listsub
      \n", + (is_https ? "https" : "http"), + WC->http_host); } else { - wprintf("This room is not configured to allow " - "self-service subscribe/unsubscribe requests." - " " - "Click to enable.
      \n" - ); + wprintf(_("This room is not configured to allow " + "self-service subscribe/unsubscribe requests.")); + wprintf(" "); + wprintf(_("Click to enable.")); + wprintf("
      \n"); } @@ -1400,52 +1455,63 @@ void display_editroom(void) wprintf("
      \n"); wprintf("\n"); - wprintf("\n"); if (WC->axlevel >= 6) { wprintf("\n"); - wprintf("\n"); wprintf("
      Message expire policy for this room
      ("); + wprintf("
      "); + wprintf(_("Message expire policy for this room")); + wprintf("
      ("); escputs(WC->wc_roomname); wprintf(")
      "); wprintf("", ((roompolicy == 0) ? "CHECKED" : "") ); - wprintf("Use the default policy for this floor
      \n"); + wprintf(_("Use the default policy for this floor")); + wprintf("
      \n"); wprintf("", ((roompolicy == 1) ? "CHECKED" : "") ); - wprintf("Never automatically expire messages
      \n"); + wprintf(_("Never automatically expire messages")); + wprintf("
      \n"); wprintf("", ((roompolicy == 2) ? "CHECKED" : "") ); wprintf("Expire by message count
      \n"); wprintf("", ((roompolicy == 3) ? "CHECKED" : "") ); - wprintf("Expire by message age
      "); - wprintf("Number of messages or days: "); + wprintf(_("Expire by message age")); + wprintf("
      "); + wprintf(_("Number of messages or days: ")); wprintf("", roomvalue); wprintf("

      Message expire policy for this floor
      ("); + wprintf("
      "); + wprintf(_("Message expire policy for this floor")); + wprintf("
      ("); escputs(floorlist[WC->wc_floor]); wprintf(")
      "); wprintf("", ((floorpolicy == 0) ? "CHECKED" : "") ); - wprintf("Use the system default
      \n"); + wprintf(_("Use the system default")); + wprintf("
      \n"); wprintf("", ((floorpolicy == 1) ? "CHECKED" : "") ); - wprintf("Never automatically expire messages
      \n"); + wprintf(_("Never automatically expire messages")); + wprintf("
      \n"); wprintf("", ((floorpolicy == 2) ? "CHECKED" : "") ); - wprintf("Expire by message count
      \n"); + wprintf(_("Expire by message count")); + wprintf("
      \n"); wprintf("", ((floorpolicy == 3) ? "CHECKED" : "") ); - wprintf("Expire by message age
      "); - wprintf("Number of messages or days: "); + wprintf(_("Expire by message age")); + wprintf("
      "); + wprintf(_("Number of messages or days: ")); wprintf("", floorvalue); } wprintf("
      \n"); wprintf("

      \n"); - wprintf(""); + wprintf("", _("Save changes")); wprintf(" "); - wprintf(""); + wprintf("", _("Cancel")); wprintf("
      \n" @@ -1486,7 +1552,7 @@ void toggle_self_service(void) { void editroom(void) { char buf[SIZ]; - char er_name[20]; + char er_name[128]; char er_password[10]; char er_dirname[15]; char er_roomaide[26]; @@ -1495,9 +1561,9 @@ void editroom(void) int bump; - if (strcmp(bstr("sc"), "OK")) { + if (strlen(bstr("ok_button")) == 0) { strcpy(WC->ImportantMessage, - "Cancelled. Changes were not saved."); + _("Cancelled. Changes were not saved.")); display_editroom(); return; } @@ -1525,9 +1591,10 @@ void editroom(void) } } strcpy(buf, bstr("er_name")); - buf[20] = 0; - if (strlen(buf) > 0) + buf[128] = 0; + if (strlen(buf) > 0) { strcpy(er_name, buf); + } strcpy(buf, bstr("er_password")); buf[10] = 0; @@ -1635,7 +1702,7 @@ void editroom(void) } } gotoroom(er_name); - strcpy(WC->ImportantMessage, "Your changes have been saved."); + strcpy(WC->ImportantMessage, _("Your changes have been saved.")); display_editroom(); return; } @@ -1658,7 +1725,7 @@ void do_invt_kick(void) { strcpy(username, bstr("username")); - if (!strcmp(bstr("sc"), "Kick")) { + if (strlen(bstr("kick_button")) > 0) { sprintf(buf, "KICK %s", username); serv_puts(buf); serv_getln(buf, sizeof buf); @@ -1667,12 +1734,12 @@ void do_invt_kick(void) { strcpy(WC->ImportantMessage, &buf[4]); } else { sprintf(WC->ImportantMessage, - "User %s kicked out of room %s.\n", + _("User %s kicked out of room %s.\n"), username, room); } } - if (!strcmp(bstr("sc"), "Invite")) { + if (strlen(bstr("invite_button")) > 0) { sprintf(buf, "INVT %s", username); serv_puts(buf); serv_getln(buf, sizeof buf); @@ -1681,7 +1748,7 @@ void do_invt_kick(void) { strcpy(WC->ImportantMessage, &buf[4]); } else { sprintf(WC->ImportantMessage, - "User %s invited to room %s.\n", + _("User %s invited to room %s.\n"), username, room); } } @@ -1708,10 +1775,11 @@ void display_whok(void) extract_token(room, &buf[4], 0, '|', sizeof room); - wprintf("" - "
      The users listed below have access to this room. " + wprintf("
      "); + wprintf(_("The users listed below have access to this room. " "To remove a user from the access list, select the user " - "name from the list and click 'Kick'.

      "); + "name from the list and click 'Kick'.")); + wprintf("

      "); wprintf("
      \n"); wprintf("\n"); @@ -1728,20 +1796,21 @@ void display_whok(void) } wprintf("
      \n"); - wprintf(""); + wprintf("", _("Kick")); wprintf("
      \n"); - wprintf("
      " - "To grant another user access to this room, enter the " - "user name in the box below and click 'Invite'.

      "); + wprintf("
      "); + wprintf(_("To grant another user access to this room, enter the " + "user name in the box below and click 'Invite'.")); + wprintf("

      "); wprintf("
      \n"); wprintf("\n"); wprintf("Invite: "); wprintf("
      \n" - "" - "" - "
      \n"); + "" + "" + "\n", _("Invite")); wprintf("
      \n"); wDumpContent(1); @@ -1769,7 +1838,9 @@ void display_entroom(void) output_headers(1, 1, 2, 0, 0, 0, 0); wprintf("
      \n" "
      " - "Create a new room" + ""); + wprintf(_("Create a new room")); + wprintf("" "
      \n" "
      \n
      \n" ); @@ -1779,10 +1850,12 @@ void display_entroom(void) wprintf("
      \n"); - wprintf("
      • Name of room: "); + wprintf("
        • "); + wprintf(_("Name of room: ")); wprintf("\n"); - wprintf("
        • Resides on floor: "); + wprintf("
        • "); + wprintf(_("Resides on floor: ")); load_floorlist(); wprintf("\n"); - wprintf("
        • Type of room:
            \n"); + wprintf("
          • "); + wprintf(_("Type of room:")); + wprintf("
              \n"); wprintf("
            • Public (automatically appears to everyone)\n"); + "\"> "); + wprintf(_("Public (automatically appears to everyone)")); - wprintf("
            • Private - hidden (accessible to anyone who knows its name)\n"); + "\"> "); + wprintf(_("Private - hidden (accessible to anyone who knows its name)")); - wprintf("
            • Private - require password:\n"); + "\"> "); + wprintf(_("Private - require password: ")); wprintf("\n"); wprintf("
            • Private - invitation only\n"); + "\"> "); + wprintf(_("Private - invitation only")); - wprintf("
            • Personal (mailbox for you only)\n"); + "\"> "); + wprintf(_("Personal (mailbox for you only)")); - wprintf("
            \n"); + wprintf("\n
          \n"); wprintf("
          \n"); - wprintf(""); + wprintf("", _("Create new room")); wprintf(" "); - wprintf(""); + wprintf("", _("Cancel")); wprintf("
          \n"); wprintf("
        • \n
          "); serv_printf("MESG roomaccess"); @@ -1922,9 +2003,9 @@ void entroom(void) int er_num_type; int er_view; - if (strcmp(bstr("sc"), "OK")) { + if (strlen(bstr("ok_button")) == 0) { strcpy(WC->ImportantMessage, - "Cancelled. No new room was created."); + _("Cancelled. No new room was created.")); display_main_menu(); return; } @@ -1966,7 +2047,9 @@ void display_private(char *rname, int req_pass) output_headers(1, 1, 2, 0, 0, 0, 0); wprintf("
          \n" "
          " - "Go to a hidden room" + ""); + wprintf(_("Go to a hidden room")); + wprintf("" "
          \n" "
          \n
          \n" ); @@ -1975,32 +2058,38 @@ void display_private(char *rname, int req_pass) "
          \n"); wprintf("
          \n"); - wprintf("
          If you know the name of a hidden (guess-name) or\n"); - wprintf("passworded room, you can enter that room by typing\n"); - wprintf("its name below. Once you gain access to a private\n"); - wprintf("room, it will appear in your regular room listings\n"); - wprintf("so you don't have to keep returning here.\n"); - wprintf("

          "); + wprintf("
          "); + wprintf(_("If you know the name of a hidden (guess-name) or " + "passworded room, you can enter that room by typing " + "its name below. Once you gain access to a private " + "room, it will appear in your regular room listings " + "so you don't have to keep returning here.")); + wprintf("\n

          "); wprintf("
          \n"); wprintf("\n" - "
          " - "Enter room name:" + "
          "); + wprintf(_("Enter room name:")); + wprintf("" "\n", rname); + "VALUE=\"%s\" MAXLENGTH=\"128\">\n", rname); if (req_pass) { wprintf("
          "); - wprintf("Enter room password:"); + wprintf(_("Enter room password:")); + wprintf(""); wprintf("\n"); } wprintf("

          \n"); - wprintf("" + wprintf("" " " - ""); + "", + _("Go there"), + _("Cancel") + ); wprintf("
          \n"); wprintf("
          \n"); wDumpContent(1); @@ -2014,7 +2103,7 @@ void goto_private(void) char hold_rm[SIZ]; char buf[SIZ]; - if (strcasecmp(bstr("sc"), "OK")) { + if (strlen(bstr("ok_button")) == 0) { display_main_menu(); return; } @@ -2050,18 +2139,20 @@ void display_zap(void) wprintf("
          \n"); wprintf("
          "); - wprintf("Zap (forget/unsubscribe) the current room\n"); + wprintf(""); + wprintf(_("Zap (forget/unsubscribe) the current room")); + wprintf("\n"); wprintf("
          \n"); wprintf("
          \n
          \n"); - wprintf("If you select this option, %s will ", WC->wc_roomname); - wprintf("disappear from your room list. Is this what you wish "); - wprintf("to do?
          \n"); + wprintf(_("If you select this option, %s will " + "disappear from your room list. Is this what you wish " + "to do?
          \n"), WC->wc_roomname); wprintf("
          \n"); - wprintf(""); + wprintf("", _("Zap this room")); wprintf(" "); - wprintf(""); + wprintf("", _("Cancel")); wprintf("
          \n"); wDumpContent(1); } @@ -2080,7 +2171,7 @@ void zap(void) */ strcpy(final_destination, WC->wc_roomname); - if (!strcasecmp(bstr("sc"), "OK")) { + if (strlen(bstr("ok_button")) > 0) { serv_printf("GOTO %s", WC->wc_roomname); serv_getln(buf, sizeof buf); if (buf[0] == '2') { @@ -2177,7 +2268,7 @@ void netedit(void) { serv_puts(buf); } - if (!strcasecmp(bstr("cmd"), "add")) { + if (strlen(bstr("add_button")) > 0) { serv_puts(line); } @@ -2639,9 +2730,9 @@ void knrooms() { void set_room_policy(void) { char buf[SIZ]; - if (strcmp(bstr("sc"), "OK")) { + if (strlen(bstr("ok_button")) == 0) { strcpy(WC->ImportantMessage, - "Cancelled. Changes were not saved."); + _("Cancelled. Changes were not saved.")); display_editroom(); return; } -- 2.39.2