X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Ffloors.c;h=5d1ba0ce42278554ff4a5029107cd4ea93c3e838;hb=83a596532ec7b9b8da83137ea18425bd525ba9ac;hp=31cd1c8106a46d9231c66180556f751741b5b28e;hpb=8eacce58cbc89e62b60fbdd0d3e1c5238f2bef1a;p=citadel.git diff --git a/webcit/floors.c b/webcit/floors.c index 31cd1c810..5d1ba0ce4 100644 --- a/webcit/floors.c +++ b/webcit/floors.c @@ -6,25 +6,6 @@ */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include "webcit.h" #include "webserver.h" @@ -46,7 +27,9 @@ void display_floorconfig(char *prepend_html) output_headers(1, 1, 2, 0, 0, 0, 0); wprintf("
\n" "
" - "Add/change/delete floors" + ""); + wprintf(_("Add/change/delete floors")); + wprintf("" "
\n" "
\n
\n" ); @@ -58,40 +41,46 @@ void display_floorconfig(char *prepend_html) } serv_printf("LFLR"); - serv_gets(buf); + serv_getln(buf, sizeof buf); if (buf[0] != '1') { wprintf("
"); - wprintf("Error\n"); + wprintf(""); + wprintf(_("Error")); + wprintf("\n"); wprintf("
\n"); wprintf("%s
\n", &buf[4]); wDumpContent(1); return; } - wprintf("
\n" - "" - "" - "\n" - ); - - while (serv_gets(buf), strcmp(buf, "000")) { + wprintf("
" + "
Floor numberFloor nameNumber of rooms
\n" + "\n"); + + while (serv_getln(buf, sizeof buf), strcmp(buf, "000")) { floornum = extract_int(buf, 0); - extract(floorname, buf, 1); + extract_token(floorname, buf, 1, '|', sizeof floorname); refcount = extract_int(buf, 2); wprintf("
"); + wprintf(_("Floor number")); + wprintf(""); + wprintf(_("Floor name")); + wprintf(""); + wprintf(_("Number of rooms")); + wprintf("
%d", floornum); if (refcount == 0) { wprintf("" "" - "(delete floor)" - "
", floornum - ); + "", floornum); + wprintf(_("(delete floor)")); + wprintf("
"); } wprintf("" "(edit graphic)", - floornum); - wprintf("
"); + "which_floor=%d\">", floornum); + wprintf(_("(edit graphic)")); + wprintf("
"); wprintf(""); wprintf("" @@ -102,8 +91,8 @@ void display_floorconfig(char *prepend_html) "VALUE=\"%s\" MAXLENGTH=\"250\">\n", floornum, floorname); wprintf("" - ""); + "VALUE=\"%s\">" + "", _("Change name")); wprintf("%d\n", refcount); } @@ -113,11 +102,11 @@ void display_floorconfig(char *prepend_html) "\n" "" + "VALUE=\"%s\">" "" - " \n"); + " \n", _("Create new floor")); - wprintf("
\n"); + wprintf("
\n"); wDumpContent(1); } @@ -131,10 +120,10 @@ void delete_floor(void) { floornum = atoi(bstr("floornum")); serv_printf("KFLR %d|1", floornum); - serv_gets(buf); + serv_getln(buf, sizeof buf); if (buf[0] == '2') { - sprintf(message, "Floor has been deleted."); + sprintf(message, _("Floor has been deleted.")); } else { sprintf(message, "%s", &buf[4]); @@ -152,10 +141,10 @@ void create_floor(void) { strcpy(floorname, bstr("floorname")); serv_printf("CFLR %s|1", floorname); - serv_gets(buf); + serv_getln(buf, sizeof buf); if (buf[0] == '2') { - sprintf(message, "New floor has been created."); + sprintf(message, _("New floor has been created.")); } else { sprintf(message, "%s", &buf[4]); } @@ -174,7 +163,7 @@ void rename_floor(void) { strcpy(floorname, bstr("floorname")); serv_printf("EFLR %d|%s", floornum, floorname); - serv_gets(buf); + serv_getln(buf, sizeof buf); sprintf(message, "%s", &buf[4]);