Moving towards better i18n support in SWAT. This commit contains a
authorTim Potter <tpot@samba.org>
Fri, 3 Oct 2003 01:42:53 +0000 (01:42 +0000)
committerTim Potter <tpot@samba.org>
Fri, 3 Oct 2003 01:42:53 +0000 (01:42 +0000)
bunch of updates to bug 413 from Monyo:

1) pick up proper strings to call msg strings for example to add
  strings in wizard menu in web/swat.c, web/statuspage.c and
  param/loadparm.c.

2) define N_() macro in include/intl.h to pick up some strings
  in param/loadparm.c

3) quote all name and value tag with '"'
  For example in swat.c:720 the "Edit Parameter Values" string is
  displayd only as "Edit" because value tag is not quoted like:
  value=Edit Parameter Values
  These tags should be quoted though it sometimes works well
  without quotation.

4) modify the msg strings not to contain HTML tags or other
  non-message strings. For example
  dprintf(_("test\n")); is modified to dprintf("%s\n", _("test"));
(This used to be commit 351d16956d8125bc689ca84adcb71e0a57d6b7cc)

source3/include/intl.h
source3/param/loadparm.c
source3/web/statuspage.c
source3/web/swat.c

index 5b56d9aa2c9ca673861dbbff6d72052c848110c2..01fa3bad9766df1fac149e15f58e4714b1975c0a 100644 (file)
@@ -22,3 +22,4 @@
 /* ideally we would have a static mapping, but that precludes
    dynamic loading. This is a reasonable compromise */
 #define _(x) lang_msg_rotate(x)
+#define N_(x) (x)
index 45626192dbe9ce78afff468878a8d8ab85714d5e..5a5ac4a2cc1a2f983f8d3b5e97babe7cd145ebb6 100644 (file)
@@ -752,7 +752,7 @@ static const struct enum_list enum_map_to_guest[] = {
  */
 
 static struct parm_struct parm_table[] = {
-       {"Base Options", P_SEP, P_SEPARATOR}, 
+       {N_("Base Options"), P_SEP, P_SEPARATOR}, 
 
        {"dos charset", P_STRING, P_GLOBAL, &Globals.dos_charset, handle_charset, NULL, FLAG_ADVANCED}, 
        {"unix charset", P_STRING, P_GLOBAL, &Globals.unix_charset, handle_charset, NULL, FLAG_ADVANCED}, 
@@ -772,7 +772,7 @@ static struct parm_struct parm_table[] = {
        {"interfaces", P_LIST, P_GLOBAL, &Globals.szInterfaces, NULL, NULL, FLAG_BASIC | FLAG_ADVANCED | FLAG_WIZARD}, 
        {"bind interfaces only", P_BOOL, P_GLOBAL, &Globals.bBindInterfacesOnly, NULL, NULL, FLAG_ADVANCED | FLAG_WIZARD}, 
 
-       {"Security Options", P_SEP, P_SEPARATOR}, 
+       {N_("Security Options"), P_SEP, P_SEPARATOR}, 
 
        {"security", P_ENUM, P_GLOBAL, &Globals.security, NULL, enum_security, FLAG_BASIC | FLAG_ADVANCED | FLAG_WIZARD}, 
        {"auth methods", P_LIST, P_GLOBAL, &Globals.AuthMethods, NULL, NULL, FLAG_ADVANCED}, 
@@ -856,7 +856,7 @@ static struct parm_struct parm_table[] = {
        {"deny hosts", P_LIST, P_LOCAL, &sDefault.szHostsdeny, NULL, NULL, FLAG_HIDE}, 
        {"preload modules", P_LIST, P_GLOBAL, &Globals.szPreloadModules, NULL, NULL, FLAG_ADVANCED | FLAG_GLOBAL}, 
 
-       {"Logging Options", P_SEP, P_SEPARATOR}, 
+       {N_("Logging Options"), P_SEP, P_SEPARATOR}, 
 
        {"log level", P_STRING, P_GLOBAL, &Globals.szLogLevel, handle_debug_list, NULL, FLAG_ADVANCED}, 
        {"debuglevel", P_STRING, P_GLOBAL, &Globals.szLogLevel, handle_debug_list, NULL, FLAG_HIDE}, 
@@ -871,7 +871,7 @@ static struct parm_struct parm_table[] = {
        {"debug pid", P_BOOL, P_GLOBAL, &Globals.bDebugPid, NULL, NULL, FLAG_ADVANCED}, 
        {"debug uid", P_BOOL, P_GLOBAL, &Globals.bDebugUid, NULL, NULL, FLAG_ADVANCED}, 
 
-       {"Protocol Options", P_SEP, P_SEPARATOR}, 
+       {N_("Protocol Options"), P_SEP, P_SEPARATOR}, 
 
        {"smb ports", P_STRING, P_GLOBAL, &Globals.smb_ports, NULL, NULL, FLAG_ADVANCED}, 
        {"protocol", P_ENUM, P_GLOBAL, &Globals.maxprotocol, NULL, enum_protocol, FLAG_ADVANCED}, 
@@ -908,7 +908,7 @@ static struct parm_struct parm_table[] = {
        {"server signing", P_ENUM, P_GLOBAL, &Globals.server_signing, NULL, enum_smb_signing_vals, FLAG_ADVANCED}, 
        {"client use spnego", P_BOOL, P_GLOBAL, &Globals.bClientUseSpnego, NULL, NULL, FLAG_ADVANCED}, 
 
-       {"Tuning Options", P_SEP, P_SEPARATOR}, 
+       {N_("Tuning Options"), P_SEP, P_SEPARATOR}, 
 
        {"block size", P_INTEGER, P_LOCAL, &sDefault.iBlock_size, NULL, NULL, FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL}, 
        {"change notify timeout", P_INTEGER, P_GLOBAL, &Globals.change_notify_timeout, NULL, NULL, FLAG_ADVANCED}, 
@@ -937,7 +937,7 @@ static struct parm_struct parm_table[] = {
 
        {"name cache timeout", P_INTEGER, P_GLOBAL, &Globals.name_cache_timeout, NULL, NULL, FLAG_ADVANCED}, 
 
-       {"Printing Options", P_SEP, P_SEPARATOR}, 
+       {N_("Printing Options"), P_SEP, P_SEPARATOR}, 
 
        {"max reported print jobs", P_INTEGER, P_LOCAL, &sDefault.iMaxReportedPrintJobs, NULL, NULL, FLAG_ADVANCED | FLAG_PRINT}, 
        {"max print jobs", P_INTEGER, P_LOCAL, &sDefault.iMaxPrintJobs, NULL, NULL, FLAG_ADVANCED | FLAG_PRINT}, 
@@ -967,7 +967,7 @@ static struct parm_struct parm_table[] = {
        {"use client driver", P_BOOL, P_LOCAL, &sDefault.bUseClientDriver, NULL, NULL, FLAG_ADVANCED | FLAG_PRINT}, 
        {"default devmode", P_BOOL, P_LOCAL, &sDefault.bDefaultDevmode, NULL, NULL, FLAG_ADVANCED | FLAG_PRINT}, 
 
-       {"Filename Handling", P_SEP, P_SEPARATOR}, 
+       {N_("Filename Handling"), P_SEP, P_SEPARATOR}, 
        {"mangling method", P_STRING, P_GLOBAL, &Globals.szManglingMethod, NULL, NULL, FLAG_ADVANCED}, 
        {"mangle prefix", P_INTEGER, P_GLOBAL, &Globals.mangle_prefix, NULL, NULL, FLAG_ADVANCED}, 
 
@@ -993,11 +993,11 @@ static struct parm_struct parm_table[] = {
        {"mangled map", P_STRING, P_LOCAL, &sDefault.szMangledMap, NULL, NULL, FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL | FLAG_DEPRECATED }, 
        {"stat cache", P_BOOL, P_GLOBAL, &Globals.bStatCache, NULL, NULL, FLAG_ADVANCED}, 
 
-       {"Domain Options", P_SEP, P_SEPARATOR}, 
+       {N_("Domain Options"), P_SEP, P_SEPARATOR}, 
 
        {"machine password timeout", P_INTEGER, P_GLOBAL, &Globals.machine_password_timeout, NULL, NULL, FLAG_ADVANCED | FLAG_WIZARD}, 
 
-       {"Logon Options", P_SEP, P_SEPARATOR}, 
+       {N_("Logon Options"), P_SEP, P_SEPARATOR}, 
 
        {"add user script", P_STRING, P_GLOBAL, &Globals.szAddUserScript, NULL, NULL, FLAG_ADVANCED}, 
        {"delete user script", P_STRING, P_GLOBAL, &Globals.szDelUserScript, NULL, NULL, FLAG_ADVANCED}, 
@@ -1016,7 +1016,7 @@ static struct parm_struct parm_table[] = {
        {"logon home", P_STRING, P_GLOBAL, &Globals.szLogonHome, NULL, NULL, FLAG_ADVANCED}, 
        {"domain logons", P_BOOL, P_GLOBAL, &Globals.bDomainLogons, NULL, NULL, FLAG_ADVANCED}, 
 
-       {"Browse Options", P_SEP, P_SEPARATOR}, 
+       {N_("Browse Options"), P_SEP, P_SEPARATOR}, 
 
        {"os level", P_INTEGER, P_GLOBAL, &Globals.os_level, NULL, NULL, FLAG_BASIC | FLAG_ADVANCED}, 
        {"lm announce", P_ENUM, P_GLOBAL, &Globals.lm_announce, NULL, enum_bool_auto, FLAG_ADVANCED}, 
@@ -1030,7 +1030,7 @@ static struct parm_struct parm_table[] = {
        {"browsable", P_BOOL, P_LOCAL, &sDefault.bBrowseable, NULL, NULL, FLAG_HIDE}, 
        {"enhanced browsing", P_BOOL, P_GLOBAL, &Globals.enhanced_browsing, NULL, NULL, FLAG_ADVANCED}, 
 
-       {"WINS Options", P_SEP, P_SEPARATOR}, 
+       {N_("WINS Options"), P_SEP, P_SEPARATOR}, 
 
        {"dns proxy", P_BOOL, P_GLOBAL, &Globals.bDNSproxy, NULL, NULL, FLAG_ADVANCED}, 
        {"wins proxy", P_BOOL, P_GLOBAL, &Globals.bWINSproxy, NULL, NULL, FLAG_ADVANCED}, 
@@ -1040,7 +1040,7 @@ static struct parm_struct parm_table[] = {
        {"wins hook", P_STRING, P_GLOBAL, &Globals.szWINSHook, NULL, NULL, FLAG_ADVANCED}, 
        {"wins partners", P_STRING, P_GLOBAL, &Globals.szWINSPartners, NULL, NULL, FLAG_ADVANCED | FLAG_WIZARD}, 
 
-       {"Locking Options", P_SEP, P_SEPARATOR}, 
+       {N_("Locking Options"), P_SEP, P_SEPARATOR}, 
 
        {"blocking locks", P_BOOL, P_LOCAL, &sDefault.bBlockingLocks, NULL, NULL, FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL}, 
        {"csc policy", P_ENUM, P_LOCAL, &sDefault.iCSCPolicy, NULL, enum_csc_policy, FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL}, 
@@ -1058,7 +1058,7 @@ static struct parm_struct parm_table[] = {
        {"strict locking", P_BOOL, P_LOCAL, &sDefault.bStrictLocking, NULL, NULL, FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL}, 
        {"share modes", P_BOOL, P_LOCAL,  &sDefault.bShareModes, NULL, NULL, FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL}, 
 
-       {"Ldap Options", P_SEP, P_SEPARATOR}, 
+       {N_("Ldap Options"), P_SEP, P_SEPARATOR}, 
 
 #ifdef WITH_LDAP_SAMCONFIG
        {"ldap server", P_STRING, P_GLOBAL, &Globals.szLdapServer, NULL, NULL, FLAG_ADVANCED}, 
@@ -1075,7 +1075,7 @@ static struct parm_struct parm_table[] = {
        {"ldap passwd sync", P_ENUM, P_GLOBAL, &Globals.ldap_passwd_sync, NULL, enum_ldap_passwd_sync, FLAG_ADVANCED}, 
        {"ldap delete dn", P_BOOL, P_GLOBAL, &Globals.ldap_delete_dn, NULL, NULL, FLAG_ADVANCED}, 
 
-       {"Miscellaneous Options", P_SEP, P_SEPARATOR}, 
+       {N_("Miscellaneous Options"), P_SEP, P_SEPARATOR}, 
        {"add share command", P_STRING, P_GLOBAL, &Globals.szAddShareCommand, NULL, NULL, FLAG_ADVANCED}, 
        {"change share command", P_STRING, P_GLOBAL, &Globals.szChangeShareCommand, NULL, NULL, FLAG_ADVANCED}, 
        {"delete share command", P_STRING, P_GLOBAL, &Globals.szDeleteShareCommand, NULL, NULL, FLAG_ADVANCED}, 
@@ -1135,7 +1135,7 @@ static struct parm_struct parm_table[] = {
        {"panic action", P_STRING, P_GLOBAL, &Globals.szPanicAction, NULL, NULL, FLAG_ADVANCED}, 
        {"hide local users", P_BOOL, P_GLOBAL, &Globals.bHideLocalUsers, NULL, NULL, FLAG_ADVANCED}, 
 
-       {"VFS module options", P_SEP, P_SEPARATOR}, 
+       {N_("VFS module options"), P_SEP, P_SEPARATOR}, 
 
        {"vfs objects", P_LIST, P_LOCAL, &sDefault.szVfsObjects, NULL, NULL, FLAG_ADVANCED | FLAG_SHARE}, 
        {"vfs object", P_LIST, P_LOCAL, &sDefault.szVfsObjects, NULL, NULL, FLAG_HIDE}, 
@@ -1145,7 +1145,7 @@ static struct parm_struct parm_table[] = {
        {"msdfs proxy", P_STRING, P_LOCAL, &sDefault.szMSDfsProxy, NULL, NULL, FLAG_ADVANCED | FLAG_SHARE}, 
        {"host msdfs", P_BOOL, P_GLOBAL, &Globals.bHostMSDfs, NULL, NULL, FLAG_ADVANCED}, 
 
-       {"Winbind options", P_SEP, P_SEPARATOR}, 
+       {N_("Winbind options"), P_SEP, P_SEPARATOR}, 
 
        {"enable rid algorithm", P_BOOL, P_GLOBAL, &Globals.bEnableRidAlgorithm, NULL, NULL, FLAG_DEPRECATED}, 
        {"idmap backend", P_STRING, P_GLOBAL, &Globals.szIdmapBackend, NULL, NULL, FLAG_ADVANCED}, 
index 21d7e4573893fe4c50c266775cf1ce061388cc7c..9ce9c05b19fb49ba6a45d372e608e6b5d2921d7b 100644 (file)
@@ -120,9 +120,9 @@ static void print_share_mode(share_mode_entry *e, char *fname)
 
        d_printf("<td>");
        switch (e->share_mode&0xF) {
-       case 0: d_printf("RDONLY     "); break;
-       case 1: d_printf("WRONLY     "); break;
-       case 2: d_printf("RDWR       "); break;
+       case 0: d_printf("%s", _("RDONLY     ")); break;
+       case 1: d_printf("%s", _("WRONLY     ")); break;
+       case 2: d_printf("%s", _("RDWR       ")); break;
        }
        d_printf("</td>");
 
@@ -297,6 +297,10 @@ void status_page(void)
                PID_or_Machine = 1;
        }
 
+       if (cgi_variable("show_pid_in_col_1")) {
+               PID_or_Machine = 0;
+       }
+
        tdb = tdb_open_log(lock_path("connections.tdb"), 0, TDB_DEFAULT, O_RDONLY, 0);
        if (tdb) tdb_traverse(tdb, traverse_fn1, NULL);
  
@@ -307,14 +311,14 @@ void status_page(void)
        d_printf("<FORM method=post>\n");
 
        if (!autorefresh) {
-               d_printf("<input type=submit value=\"%s\" name=autorefresh>\n", _("Auto Refresh"));
+               d_printf("<input type=submit value=\"%s\" name=\"autorefresh\">\n", _("Auto Refresh"));
                d_printf("<br>%s", _("Refresh Interval: "));
-               d_printf("<input type=text size=2 name=\"refresh_interval\" value=%d>\n", 
+               d_printf("<input type=text size=2 name=\"refresh_interval\" value=\"%d\">\n", 
                       refresh_interval);
        } else {
-               d_printf("<input type=submit value=\"%s\" name=norefresh>\n", _("Stop Refreshing"));
+               d_printf("<input type=submit value=\"%s\" name=\"norefresh\">\n", _("Stop Refreshing"));
                d_printf("<br>%s%d\n", _("Refresh Interval: "), refresh_interval);
-               d_printf("<input type=hidden name=refresh value=1>\n");
+               d_printf("<input type=hidden name=\"refresh\" value=\"1\">\n");
        }
 
        d_printf("<p>\n");
@@ -418,8 +422,8 @@ void status_page(void)
 
        if (tdb) tdb_close(tdb);
 
-       d_printf("<br><input type=submit name=\"show_client_in_col_1\" value=\"Show Client in col 1\">\n");
-       d_printf("<input type=submit name=\"show_pid_in_col_1\" value=\"Show PID in col 1\">\n");
+       d_printf("<br><input type=submit name=\"show_client_in_col_1\" value=\"%s\">\n", _("Show Client in col 1"));
+       d_printf("<input type=submit name=\"show_pid_in_col_1\" value=\"%s\">\n", _("Show PID in col 1"));
 
        d_printf("</FORM>\n");
 
index 2b2686cc5ae131c7b776a23942603a3c5ebf0b2c..f4046b46a2629f0b64b5600bd65e33800f18f807 100644 (file)
@@ -114,7 +114,8 @@ static int include_html(const char *fname)
        fd = web_open(fname, O_RDONLY, 0);
 
        if (fd == -1) {
-               d_printf("ERROR: Can't open %s\n", fname);
+               d_printf(_("ERROR: Can't open %s"), fname);
+               d_printf("\n");
                return 0;
        }
 
@@ -261,7 +262,7 @@ static void show_parameter(int snum, struct parm_struct *parm)
                break;
 
        case P_INTEGER:
-               d_printf("<input type=text size=8 name=\"parm_%s\" value=%d>", make_parm_name(parm->label), *(int *)ptr);
+               d_printf("<input type=text size=8 name=\"parm_%s\" value=\"%d\">", make_parm_name(parm->label), *(int *)ptr);
                d_printf("<input type=button value=\"%s\" onClick=\"swatform.parm_%s.value=\'%d\'\">",
                        _("Set Default"), make_parm_name(parm->label),(int)(parm->def.ivalue));
                break;
@@ -404,7 +405,8 @@ static int save_reload(int snum)
 
        f = sys_fopen(dyn_CONFIGFILE,"w");
        if (!f) {
-               d_printf("failed to open %s for writing\n", dyn_CONFIGFILE);
+               d_printf(_("failed to open %s for writing"), dyn_CONFIGFILE);
+               d_printf("\n");
                return 0;
        }
 
@@ -426,7 +428,8 @@ static int save_reload(int snum)
        lp_killunused(NULL);
 
        if (!load_config(False)) {
-                d_printf("Can't reload %s\n", dyn_CONFIGFILE);
+                d_printf(_("Can't reload %s"), dyn_CONFIGFILE);
+               d_printf("\n");
                 return 0;
         }
        iNumNonAutoPrintServices = lp_numservices();
@@ -495,7 +498,8 @@ static void show_main_buttons(void)
        char *p;
        
        if ((p = cgi_user_name()) && strcmp(p, "root")) {
-               d_printf(_("Logged in as <b>%s</b><p>\n"), p);
+               d_printf(_("Logged in as <b>%s</b>"), p);
+               d_printf("<p>\n");
        }
 
        image_link(_("Home"), "", "images/home.gif");
@@ -519,10 +523,10 @@ static void show_main_buttons(void)
  ****************************************************************************/
 static void ViewModeBoxes(int mode)
 {
-       d_printf("<p>%s\n", _("Current View Is:&nbsp \n"));
-       d_printf("<input type=radio name=\"ViewMode\" value=0 %s>Basic\n", (mode == 0) ? "checked" : "");
-       d_printf("<input type=radio name=\"ViewMode\" value=1 %s>Advanced\n", (mode == 1) ? "checked" : "");
-       d_printf("<br>%s\n", _("Change View To:&nbsp"));
+       d_printf("<p>%s:&nbsp;\n", _("Current View Is"));
+       d_printf("<input type=radio name=\"ViewMode\" value=0 %s>%s\n", ((mode == 0) ? "checked" : ""), _("Basic"));
+       d_printf("<input type=radio name=\"ViewMode\" value=1 %s>%s\n", ((mode == 1) ? "checked" : ""), _("Advanced"));
+       d_printf("<br>%s:&nbsp;\n", _("Change View To"));
        d_printf("<input type=submit name=\"BasicMode\" value=\"%s\">\n", _("Basic"));
        d_printf("<input type=submit name=\"AdvMode\" value=\"%s\">\n", _("Advanced"));
        d_printf("</p><br>\n");
@@ -572,7 +576,7 @@ static void wizard_params_page(void)
        /* Here we first set and commit all the parameters that were selected
           in the previous screen. */
 
-       d_printf("<H2>Wizard Parameter Edit Page</H2>\n");
+       d_printf("<H2>%s</H2>\n", _("Wizard Parameter Edit Page"));
 
        if (cgi_variable("Commit")) {
                commit_parameters(GLOBAL_SECTION_SNUM);
@@ -601,7 +605,7 @@ static void rewritecfg_file(void)
 {
        commit_parameters(GLOBAL_SECTION_SNUM);
        save_reload(0);
-       d_printf("<H2>Note: smb.conf %s</H2>\n", _("file has been read and rewritten"));
+       d_printf("<H2>%s</H2>\n", _("Note: smb.conf file has been read and rewritten"));
 }
 
 /****************************************************************************
@@ -709,37 +713,36 @@ static void wizard_page(void)
        role = lp_server_role();
        
        /* Here we go ... */
-       d_printf("<H2>Samba Configuration Wizard</H2>\n");
+       d_printf("<H2>%s</H2>\n", _("Samba Configuration Wizard"));
        d_printf("<form method=post action=wizard>\n");
 
        if (have_write_access) {
-               d_printf(_("The \"Rewrite smb.conf file\" button will clear the smb.conf file of all default values and of comments.\n"));
-               d_printf(_("The same will happen if you press the commit button."));
-               d_printf("<br><br>");
+               d_printf("%s\n", _("The \"Rewrite smb.conf file\" button will clear the smb.conf file of all default values and of comments."));
+               d_printf("%s", _("The same will happen if you press the commit button."));
+               d_printf("<br><br>\n");
                d_printf("<center>");
-               d_printf("<input type=submit name=\"Rewrite\" value=%s> &nbsp;&nbsp;",_("Rewrite smb.conf file"));
-               d_printf("<input type=submit name=\"Commit\" value=%s> &nbsp;&nbsp;",_("Commit"));
-               d_printf("<input type=submit name=\"GetWizardParams\" value=%s>", _("Edit Parameter Values"));
-               d_printf("</center>");
+               d_printf("<input type=submit name=\"Rewrite\" value=\"%s\"> &nbsp;&nbsp;",_("Rewrite smb.conf file"));
+               d_printf("<input type=submit name=\"Commit\" value=\"%s\"> &nbsp;&nbsp;",_("Commit"));
+               d_printf("<input type=submit name=\"GetWizardParams\" value=\"%s\">", _("Edit Parameter Values"));
+               d_printf("</center>\n");
        }
 
        d_printf("<hr>");
        d_printf("<center><table border=0>");
-       d_printf("<tr><td><b>%s</b></td>\n", "Server Type:&nbsp;");
-       d_printf("<td><input type=radio name=\"ServerType\" value=0 %s> Stand Alone&nbsp;</td>", (role == ROLE_STANDALONE) ? "checked" : "");
-       d_printf("<td><input type=radio name=\"ServerType\" value=1 %s> Domain Member&nbsp;</td>", (role == ROLE_DOMAIN_MEMBER) ? "checked" : ""); 
-       d_printf("<td><input type=radio name=\"ServerType\" value=2 %s> Domain Controller&nbsp;</td>", (role == ROLE_DOMAIN_PDC) ? "checked" : "");
-       d_printf("</tr>");
+       d_printf("<tr><td><b>%s:&nbsp;</b></td>\n", _("Server Type"));
+       d_printf("<td><input type=radio name=\"ServerType\" value=\"0\" %s> %s&nbsp;</td>", ((role == ROLE_STANDALONE) ? "checked" : ""), _("Stand Alone"));
+       d_printf("<td><input type=radio name=\"ServerType\" value=\"1\" %s> %s&nbsp;</td>", ((role == ROLE_DOMAIN_MEMBER) ? "checked" : ""), _("Domain Member")); 
+       d_printf("<td><input type=radio name=\"ServerType\" value=\"2\" %s> %s&nbsp;</td>", ((role == ROLE_DOMAIN_PDC) ? "checked" : ""), _("Domain Controller"));
+       d_printf("</tr>\n");
        if (role == ROLE_DOMAIN_BDC) {
-               d_printf("<tr><td></td><td colspan=3><font color=\"#ff0000\">Unusual Type in smb.conf - Please Select New Mode</font></td></tr>");
+               d_printf("<tr><td></td><td colspan=3><font color=\"#ff0000\">%s</font></td></tr>\n", _("Unusual Type in smb.conf - Please Select New Mode"));
        }
-       d_printf("<tr><td><b>%s</b></td>\n", "Configure WINS As:&nbsp;");
-       d_printf("<td><input type=radio name=\"WINSType\" value=0 %s> Not Used&nbsp;</td>", (winstype == 0) ? "checked" : "");
-       d_printf("<td><input type=radio name=\"WINSType\" value=1 %s> Server for client use&nbsp;</td>", (winstype == 1) ? "checked" : "");
-       d_printf("<td><input type=radio name=\"WINSType\" value=2 %s> Client of another WINS server&nbsp;</td>", (winstype == 2) ? "checked" : "");
-       d_printf("</tr>\n");    
-
-       d_printf("<tr><td></td><td></td><td></td><td>Remote WINS Server&nbsp;<input type=text size=\"16\" name=\"WINSAddr\" value=\"");
+       d_printf("<tr><td><b>%s:&nbsp;</b></td>\n", _("Configure WINS As"));
+       d_printf("<td><input type=radio name=\"WINSType\" value=\"0\" %s> %s&nbsp;</td>", ((winstype == 0) ? "checked" : ""), _("Not Used"));
+       d_printf("<td><input type=radio name=\"WINSType\" value=\"1\" %s> %s&nbsp;</td>", ((winstype == 1) ? "checked" : ""), _("Server for client use"));
+       d_printf("<td><input type=radio name=\"WINSType\" value=\"2\" %s> %s&nbsp;</td>", ((winstype == 2) ? "checked" : ""), _("Client of another WINS server"));
+       d_printf("</tr>\n");
+       d_printf("<tr><td></td><td></td><td></td><td>%s&nbsp;<input type=text size=\"16\" name=\"WINSAddr\" value=\"", _("Remote WINS Server"));
 
        /* Print out the list of wins servers */
        if(lp_wins_server_list()) {
@@ -748,27 +751,27 @@ static void wizard_page(void)
                for(i = 0; wins_servers[i]; i++) d_printf("%s ", wins_servers[i]);
        }
        
-       d_printf("\"></td></tr>");
+       d_printf("\"></td></tr>\n");
        if (winstype == 3) {
-               d_printf("<tr><td></td><td colspan=3><font color=\"#ff0000\">Error: WINS Server Mode and WINS Support both set in smb.conf</font></td></tr>");
-               d_printf("<tr><td></td><td colspan=3><font color=\"#ff0000\">Please Select desired WINS mode above.</font></td></tr>");
+               d_printf("<tr><td></td><td colspan=3><font color=\"#ff0000\">%s</font></td></tr>\n", _("Error: WINS Server Mode and WINS Support both set in smb.conf"));
+               d_printf("<tr><td></td><td colspan=3><font color=\"#ff0000\">%s</font></td></tr>\n", _("Please Select desired WINS mode above."));
        }
-       d_printf("<tr><td><b>%s</b></td>\n","Expose Home Directories:&nbsp;");
-       d_printf("<td><input type=radio name=\"HomeExpo\" value=1 %s> Yes</td>", (have_home == -1) ? "" : "checked ");
-       d_printf("<td><input type=radio name=\"HomeExpo\" value=0 %s> No</td>", (have_home == -1 ) ? "checked" : "");
-       d_printf("<td></td></tr>");
+       d_printf("<tr><td><b>%s:&nbsp;</b></td>\n", _("Expose Home Directories"));
+       d_printf("<td><input type=radio name=\"HomeExpo\" value=\"1\" %s> Yes</td>", (have_home == -1) ? "" : "checked ");
+       d_printf("<td><input type=radio name=\"HomeExpo\" value=\"0\" %s> No</td>", (have_home == -1 ) ? "checked" : "");
+       d_printf("<td></td></tr>\n");
        
        /* Enable this when we are ready ....
-        * d_printf("<tr><td><b>%s</b></td>\n","Is Print Server:&nbsp;");
-        * d_printf("<td><input type=radio name=\"PtrSvr\" value=1 %s> Yes</td>");
-        * d_printf("<td><input type=radio name=\"PtrSvr\" value=0 %s> No</td>");
-        * d_printf("<td></td></tr>");
+        * d_printf("<tr><td><b>%s:&nbsp;</b></td>\n", _("Is Print Server"));
+        * d_printf("<td><input type=radio name=\"PtrSvr\" value=\"1\" %s> Yes</td>");
+        * d_printf("<td><input type=radio name=\"PtrSvr\" value=\"0\" %s> No</td>");
+        * d_printf("<td></td></tr>\n");
         */
        
        d_printf("</table></center>");
        d_printf("<hr>");
 
-       d_printf(_("The above configuration options will set multiple parameters and will generally assist with rapid Samba deployment.\n"));
+       d_printf("%s\n", _("The above configuration options will set multiple parameters and will generally assist with rapid Samba deployment."));
        d_printf("</form>\n");
 }
 
@@ -938,7 +941,7 @@ static BOOL change_password(const char *remote_machine, const char *user_name,
        pstring msg_str;
 
        if (demo_mode) {
-               d_printf("%s<p>", _("password change in demo mode rejected\n"));
+               d_printf("%s\n<p>", _("password change in demo mode rejected"));
                return False;
        }
        
@@ -951,7 +954,7 @@ static BOOL change_password(const char *remote_machine, const char *user_name,
        }
 
        if(!initialize_password_db(True)) {
-               d_printf("Can't setup password database vectors.\n<p>");
+               d_printf("%s\n<p>", _("Can't setup password database vectors."));
                return False;
        }
        
@@ -977,7 +980,7 @@ static void chg_passwd(void)
 
        /* Make sure users name has been specified */
        if (strlen(cgi_variable(SWAT_USER)) == 0) {
-               d_printf("<p>%s", _(" Must specify \"User Name\" \n"));
+               d_printf("<p>%s\n", _(" Must specify \"User Name\" "));
                return;
        }
 
@@ -993,26 +996,26 @@ static void chg_passwd(void)
                 */
                if (((!am_root()) && (strlen( cgi_variable(OLD_PSWD)) <= 0)) ||
                    ((cgi_variable(CHG_R_PASSWD_FLAG)) &&  (strlen( cgi_variable(OLD_PSWD)) <= 0))) {
-                       d_printf("<p>%s", _(" Must specify \"Old Password\" \n"));
+                       d_printf("<p>%s\n", _(" Must specify \"Old Password\" "));
                        return;
                }
 
                /* If changing a users password on a remote hosts we have to know what host */
                if ((cgi_variable(CHG_R_PASSWD_FLAG)) && (strlen( cgi_variable(RHOST)) <= 0)) {
-                       d_printf("<p>%s", _(" Must specify \"Remote Machine\" \n"));
+                       d_printf("<p>%s\n", _(" Must specify \"Remote Machine\" "));
                        return;
                }
 
                /* Make sure new passwords have been specified */
                if ((strlen( cgi_variable(NEW_PSWD)) <= 0) ||
                    (strlen( cgi_variable(NEW2_PSWD)) <= 0)) {
-                       d_printf("<p>%s", _(" Must specify \"New, and Re-typed Passwords\" \n"));
+                       d_printf("<p>%s\n", _(" Must specify \"New, and Re-typed Passwords\" "));
                        return;
                }
 
                /* Make sure new passwords was typed correctly twice */
                if (strcmp(cgi_variable(NEW_PSWD), cgi_variable(NEW2_PSWD)) != 0) {
-                       d_printf("<p>%s", _(" Re-typed password didn't match new password\n"));
+                       d_printf("<p>%s\n", _(" Re-typed password didn't match new password "));
                        return;
                }
        }
@@ -1042,9 +1045,11 @@ static void chg_passwd(void)
        if(local_flags == 0) {
                d_printf("<p>");
                if (rslt == True) {
-                       d_printf(_(" The passwd for '%s' has been changed. \n"), cgi_variable(SWAT_USER));
+                       d_printf(_(" The passwd for '%s' has been changed."), cgi_variable(SWAT_USER));
+                       d_printf("\n");
                } else {
-                       d_printf(_(" The passwd for '%s' has NOT been changed. \n"), cgi_variable(SWAT_USER));
+                       d_printf(_(" The passwd for '%s' has NOT been changed."), cgi_variable(SWAT_USER));
+                       d_printf("\n");
                }
        }
        
@@ -1077,15 +1082,15 @@ static void passwd_page(void)
        /* 
         * Create all the dialog boxes for data collection
         */
-       d_printf("<tr><td>%s</td>\n", _(" User Name : "));
+       d_printf("<tr><td> %s : </td>\n", _("User Name"));
        d_printf("<td><input type=text size=30 name=%s value=%s></td></tr> \n", SWAT_USER, new_name);
        if (!am_root()) {
-               d_printf("<tr><td>%s</td>\n", _(" Old Password : "));
+               d_printf("<tr><td> %s : </td>\n", _("Old Password"));
                d_printf("<td><input type=password size=30 name=%s></td></tr> \n",OLD_PSWD);
        }
-       d_printf("<tr><td>%s</td>\n", _(" New Password : "));
+       d_printf("<tr><td> %s : </td>\n", _("New Password"));
        d_printf("<td><input type=password size=30 name=%s></td></tr>\n",NEW_PSWD);
-       d_printf("<tr><td>%s</td>\n", _(" Re-type New Password : "));
+       d_printf("<tr><td> %s : </td>\n", _("Re-type New Password"));
        d_printf("<td><input type=password size=30 name=%s></td></tr>\n",NEW2_PSWD);
        d_printf("</table>\n");
 
@@ -1124,15 +1129,15 @@ static void passwd_page(void)
        /* 
         * Create all the dialog boxes for data collection
         */
-       d_printf("<tr><td>%s</td>\n", _(" User Name : "));
+       d_printf("<tr><td> %s : </td>\n", _("User Name"));
        d_printf("<td><input type=text size=30 name=%s value=%s></td></tr>\n",SWAT_USER, new_name);
-       d_printf("<tr><td>%s</td>\n", _(" Old Password : "));
+       d_printf("<tr><td> %s : </td>\n", _("Old Password"));
        d_printf("<td><input type=password size=30 name=%s></td></tr>\n",OLD_PSWD);
-       d_printf("<tr><td>%s</td>\n", _(" New Password : "));
+       d_printf("<tr><td> %s : </td>\n", _("New Password"));
        d_printf("<td><input type=password size=30 name=%s></td></tr>\n",NEW_PSWD);
-       d_printf("<tr><td>%s</td>\n", _(" Re-type New Password : "));
+       d_printf("<tr><td> %s : </td>\n", _("Re-type New Password"));
        d_printf("<td><input type=password size=30 name=%s></td></tr>\n",NEW2_PSWD);
-       d_printf("<tr><td>%s</td>\n", _(" Remote Machine : "));
+       d_printf("<tr><td> %s : </td>\n", _("Remote Machine"));
        d_printf("<td><input type=text size=30 name=%s></td></tr>\n",RHOST);
 
        d_printf("</table>");
@@ -1177,7 +1182,7 @@ static void printers_page(void)
         d_printf(_("Printer names marked with [*] in the Choose Printer drop-down box "));
         d_printf(_("are autoloaded printers from "));
         d_printf("<A HREF=\"/swat/help/smb.conf.5.html#printcapname\" target=\"docs\">%s</A>\n", _("Printcap Name"));
-        d_printf(_("Attempting to delete these printers from SWAT will have no effect.\n"));
+        d_printf("%s\n", _("Attempting to delete these printers from SWAT will have no effect."));
 
        if (cgi_variable("Commit") && snum >= 0) {
                commit_parameters(snum);
@@ -1223,8 +1228,8 @@ static void printers_page(void)
                        break;
        }
        d_printf("<table>\n");
-       d_printf("<tr><td><input type=submit name=selectshare value=\"%s\"></td>\n", _("Choose Printer"));
-       d_printf("<td><select name=share>\n");
+       d_printf("<tr><td><input type=submit name=\"selectshare\" value=\"%s\"></td>\n", _("Choose Printer"));
+       d_printf("<td><select name=\"share\">\n");
        if (snum < 0 || !lp_print_ok(snum))
                d_printf("<option value=\" \"> \n");
        for (i=0;i<lp_numservices();i++) {
@@ -1249,8 +1254,8 @@ static void printers_page(void)
 
        if (have_write_access) {
                d_printf("<table>\n");
-               d_printf("<tr><td><input type=submit name=createshare value=\"%s\"></td>\n", _("Create Printer"));
-               d_printf("<td><input type=text size=30 name=newshare></td></tr>\n");
+               d_printf("<tr><td><input type=submit name=\"createshare\" value=\"%s\"></td>\n", _("Create Printer"));
+               d_printf("<td><input type=text size=30 name=\"newshare\"></td></tr>\n");
                d_printf("</table>");
        }