X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Fwho.c;h=0a8cc142039b71b015dc2f363d830b5026a7019e;hb=3bd35c2e49089f725c1624a084c7d4ee4b50193d;hp=62b84388db34a02c07981f5dbc796cfbc7a31198;hpb=b3cbf76ad8bd244e31ee61cdf23f956b98babb36;p=citadel.git diff --git a/webcit/who.c b/webcit/who.c index 62b84388d..0a8cc1420 100644 --- a/webcit/who.c +++ b/webcit/who.c @@ -22,9 +22,9 @@ void who_inner_div(void) { wprintf("" "\n"); wprintf("\n"); - wprintf("\n"); - wprintf(""); - wprintf("\n\n"); + wprintf("\n", _("User name")); + wprintf("", _("Room")); + wprintf("\n\n", _("From host")); serv_puts("TIME"); serv_getln(buf, sizeof buf); @@ -57,12 +57,10 @@ void who_inner_div(void) { if ((WC->is_aide) && (sess != WC->ctdl_pid)) { wprintf(" [kill]"); + wprintf("\" onClick=\"return ConfirmKill();\">%s", _("(kill)")); } if (sess == WC->ctdl_pid) { - wprintf(" [edit]"); + wprintf(" %s", _("(edit)")); } wprintf(""); @@ -82,13 +80,13 @@ void who_inner_div(void) { wprintf(" " ""); + "alt=\"(idle)\" border=\"0\" />"); } else { wprintf(" " ""); + "alt=\"(active)\" border=\"0\" />"); } wprintf("\n
User NameRoomFrom host
%s%s%s
"); @@ -160,16 +158,15 @@ void who_inner_html(void) { */ void who(void) { - /* - output_headers(1, 1, 2, 0, 1, 0, 0); old refresh30 version - */ + char title[256]; + output_headers(1, 1, 2, 0, 0, 0, 0); wprintf("\n" + "\n", _("Do you really want to kill this session?") ); wprintf("
\n"); @@ -178,8 +175,11 @@ void who(void) "ALIGN=MIDDLE " ">"); /* "onLoad=\"javascript:bodyOnLoad()\" " */ - wprintf(" Users currently on "); - escputs(serv_info.serv_humannode); + wprintf(" "); + + snprintf(title, sizeof title, _("Users currently on %s"), serv_info.serv_humannode); + escputs(title); + wprintf("
"); offer_start_page(); wprintf("
\n"); @@ -191,29 +191,28 @@ void who(void) who_inner_div(); /* Actual data handled by another function */ wprintf("\n"); - wprintf("
" - "Click on a name to read user info. Click on " - "" - " to send an instant message to that user.
\n"); + wprintf("
"); + wprintf(_("Click on a name to read user info. Click on %s " + "to send an instant message to that user."), + "\"(p)\"" + ); + wprintf("
\n"); /* JavaScript to make the ajax refresh happen: * 1. Register the request 'getWholist' which calls the WebCit action 'who_inner_html' * 2. Register the 'fix_scrollbar_bug' div as one we're interested in ajaxifying * 3. setInterval to make the ajax refresh happen every 30 seconds. The random number - * in the request is there to prevent IE from caching the XML even though it's been - * told not to. Die, Microsoft, Die. + * in the request is there to prevent the eternally moronic Internet Explorer from + * caching the XML even though it's been told not to. */ wprintf( -" \n" -" \n" + " \n" ); - wDumpContent(1); } @@ -235,63 +234,72 @@ void edit_me(void) { char buf[SIZ]; - if (!strcasecmp(bstr("sc"), "Change room name")) { + if (strlen(bstr("change_room_name_button")) > 0) { serv_printf("RCHG %s", bstr("fake_roomname")); serv_getln(buf, sizeof buf); http_redirect("/who"); - } else if (!strcasecmp(bstr("sc"), "Change host name")) { + } else if (strlen(bstr("change_host_name_button")) > 0) { serv_printf("HCHG %s", bstr("fake_hostname")); serv_getln(buf, sizeof buf); http_redirect("/who"); - } else if (!strcasecmp(bstr("sc"), "Change user name")) { + } else if (strlen(bstr("change_user_name_button")) > 0) { serv_printf("UCHG %s", bstr("fake_username")); serv_getln(buf, sizeof buf); http_redirect("/who"); - } else if (!strcasecmp(bstr("sc"), "Cancel")) { + } else if (strlen(bstr("cancel_button")) > 0) { http_redirect("/who"); } else { - output_headers(1, 1, 0, 0, 0, 0, 0); wprintf("
\n"); wprintf("
"); wprintf(""); - wprintf("Edit your session display"); + wprintf(_("Edit your session display")); wprintf("
\n"); wprintf("
\n
\n"); - wprintf("This screen allows you to change the way your\n"); - wprintf("session appears in the 'Who is online' listing.\n"); - wprintf("To turn off any 'fake' name you've previously\n"); - wprintf("set, simply click the appropriate 'change' button\n"); - wprintf("without typing anything in the corresponding box.\n"); + wprintf(_("This screen allows you to change the way your " + "session appears in the 'Who is online' listing. " + "To turn off any 'fake' name you've previously " + "set, simply click the appropriate 'change' button " + "without typing anything in the corresponding box. ")); wprintf("
\n"); wprintf("
\n"); wprintf("\n"); - wprintf("\n\n\n\n\n"); - wprintf("\n\n\n"); if (WC->is_aide) { - wprintf("\n\n\n"); } wprintf("
Room name:"); + wprintf("
"); + wprintf(_("Room name:")); + wprintf(""); wprintf("\n"); wprintf(""); - wprintf(""); + wprintf("", + _("Change room name")); wprintf("
Host name:"); + wprintf("
"); + wprintf(_("Host name:")); + wprintf(""); wprintf("\n"); wprintf(""); - wprintf(""); + wprintf("", + _("Change host name")); wprintf("
User name:"); + wprintf("
"); + wprintf(_("User name:")); + wprintf(""); wprintf("\n"); wprintf(""); - wprintf(""); + wprintf("", + _("Change user name")); wprintf("
"); - wprintf(""); + wprintf("", + _("Cancel")); wprintf("
\n"); wprintf("
\n"); wDumpContent(1);