From e78df325a7ac1b7aa213335a39dfb2ef1f0b0202 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Mon, 22 Aug 2005 20:21:21 +0000 Subject: [PATCH] * useredit.c: i18n --- webcit/ChangeLog | 4 +++ webcit/useredit.c | 92 +++++++++++++++++++++++++++-------------------- 2 files changed, 57 insertions(+), 39 deletions(-) diff --git a/webcit/ChangeLog b/webcit/ChangeLog index d67cda898..5994602bf 100644 --- a/webcit/ChangeLog +++ b/webcit/ChangeLog @@ -1,4 +1,7 @@ $Log$ +Revision 621.27 2005/08/22 20:21:21 ajc +* useredit.c: i18n + Revision 621.26 2005/08/22 19:26:09 ajc * subst.c summary.c sysmsgs.c : i18n @@ -2886,3 +2889,4 @@ Sun Dec 6 19:50:55 EST 1998 Art Cancro 1998-12-03 Nathan Bryant * webserver.c: warning fix + diff --git a/webcit/useredit.c b/webcit/useredit.c index 64f4b428e..604dbf24b 100644 --- a/webcit/useredit.c +++ b/webcit/useredit.c @@ -20,9 +20,9 @@ void select_user_to_edit(char *message, char *preselect) wprintf("" "
" "" - "" - "Edit or delete users" - "
\n" + ""); + wprintf(_("Edit or delete users")); + wprintf("\n" "\n
\n" ); @@ -30,27 +30,29 @@ void select_user_to_edit(char *message, char *preselect) wprintf("
\n"); - svprintf("BOXTITLE", WCS_STRING, "Add users"); + svprintf("BOXTITLE", WCS_STRING, _("Add users")); do_template("beginbox"); - wprintf("To create a new user account, enter the desired " - "user name in the box below and click 'Create'.

"); + wprintf(_("To create a new user account, enter the desired " + "user name in the box below and click 'Create'.")); + wprintf("

"); wprintf("
\n"); - wprintf("New user: "); - wprintf("
\n" - "" - "
\n"); + wprintf(_("New user: ")); + wprintf("
\n" + "" + "\n", _("Create")); do_template("endbox"); wprintf("
"); - svprintf("BOXTITLE", WCS_STRING, "Edit or Delete users"); + svprintf("BOXTITLE", WCS_STRING, _("Edit or Delete users")); do_template("beginbox"); - wprintf("To edit an existing user account, select the user " - "name from the list and click 'Edit'.

"); + wprintf(_("To edit an existing user account, select the user " + "name from the list and click 'Edit'.")); + wprintf("

"); wprintf("
" "
\n"); @@ -71,10 +73,10 @@ void select_user_to_edit(char *message, char *preselect) } wprintf("
\n"); - wprintf(""); - wprintf(""); - wprintf(""); + wprintf("", _("Edit configuration")); + wprintf("", _("Edit address book entry")); + wprintf("", _("Delete user"), _("Delete this user?")); wprintf("
\n"); do_template("endbox"); @@ -186,9 +188,8 @@ void display_edit_address_book_entry(char *username, long usernum) { if (vcard_msgnum < 0) { sprintf(error_message, - "" - "Could not create/edit vCard" - "

\n" + "%s

\n", + _("An error occurred while trying to create or edit this address book entry.") ); select_user_to_edit(error_message, username); return; @@ -250,12 +251,12 @@ void display_edituser(char *supplied_username, int is_new) { lastcall = extract_long(&buf[4], 7); purgedays = extract_long(&buf[4], 8); - if (!strcmp(bstr("sc"), "Edit address book entry")) { + if (strlen(bstr("edit_abe_button")) > 0) { display_edit_address_book_entry(username, usernum); return; } - if (!strcmp(bstr("sc"), "Delete user")) { + if (strlen(bstr("delete_button")) > 0) { delete_user(username); return; } @@ -263,8 +264,8 @@ void display_edituser(char *supplied_username, int is_new) { output_headers(1, 1, 2, 0, 0, 0, 0); wprintf("
\n"); wprintf("
"); - wprintf("" - "Edit user account: "); + wprintf(""); + wprintf(_("Edit user account: ")); escputs(username); wprintf("
\n"); wprintf("
\n
\n"); @@ -283,22 +284,30 @@ void display_edituser(char *supplied_username, int is_new) { wprintf("
"); - wprintf("\n"); - wprintf("\n"); - wprintf("\n"); - wprintf("\n"); - wprintf("\n"); now = time(NULL); - wprintf(""); - wprintf("\n"); wprintf("
Password" + wprintf("
"); + wprintf(_("Password")); + wprintf("" "
Times logged in" + wprintf("
"); + wprintf(_("Number of logins")); + wprintf("" "
Messages posted" + wprintf("
"); + wprintf(_("Messages submitted")); + wprintf("" "
Access level" + wprintf("
"); + wprintf(_("Access level")); + wprintf("" "
User ID number" + wprintf("
"); + wprintf(_("User ID number")); + wprintf("" "
Date/time of last login" + wprintf("
"); + wprintf(_("Date and time of last login")); + wprintf("" "
Auto-purge after days" + wprintf("
"); + wprintf(_("Auto-purge after this many days")); + wprintf("" "
\n"); - wprintf("\n" + wprintf("\n" " " - "\n" - "

\n"); + "\n" + "

\n", _("Save changes"), _("Cancel")); wprintf("
\n"); wprintf("
\n"); @@ -356,10 +371,9 @@ void edituser(void) { is_new = atoi(bstr("is_new")); - if (strcasecmp(bstr("action"), "OK")) { - safestrncpy(message, "Edit user cancelled.", sizeof message); + if (strlen(bstr("ok_button")) == 0) { + safestrncpy(message, _("Changes were not saved."), sizeof message); } - else { serv_printf("ASUP %s|%s|%s|%s|%s|%s|%s|%s|%s|", @@ -427,8 +441,8 @@ void create_user(void) { serv_getln(buf, sizeof buf); if (buf[0] == '2') { - /* sprintf(error_message, "User has been created."); - select_user_to_edit(error_message, username); */ + sprintf(WC->ImportantMessage, + _("A new user has been created.")); display_edituser(username, 1); } else { -- 2.39.2