diff options
-rw-r--r-- | source3/Makefile.in | 48 | ||||
-rw-r--r-- | source3/acconfig.h | 9 | ||||
-rw-r--r-- | source3/aclocal.m4 | 407 | ||||
-rw-r--r-- | source3/configure.in | 81 | ||||
-rw-r--r-- | source3/include/config.h.in | 20 | ||||
-rw-r--r-- | source3/include/webintl.h | 52 | ||||
-rw-r--r-- | source3/param/loadparm.c | 677 | ||||
-rwxr-xr-x | source3/script/installman.sh | 82 | ||||
-rwxr-xr-x | source3/script/mkinstalldirs | 40 | ||||
-rwxr-xr-x | source3/script/uninstallman.sh | 28 | ||||
-rw-r--r-- | source3/web/cgi.c | 20 | ||||
-rw-r--r-- | source3/web/neg_lang.c | 378 | ||||
-rw-r--r-- | source3/web/statuspage.c | 72 | ||||
-rw-r--r-- | source3/web/swat.c | 235 |
14 files changed, 1623 insertions, 526 deletions
diff --git a/source3/Makefile.in b/source3/Makefile.in index 342105be76..8dd1dbbdd1 100644 --- a/source3/Makefile.in +++ b/source3/Makefile.in @@ -7,7 +7,7 @@ prefix=@prefix@ exec_prefix=@exec_prefix@ mandir=@mandir@ -LIBS=@LIBS@ +LIBS=@LIBS@ @INTLLIBS@ CC=@CC@ SHLD=@SHLD@ CFLAGS=@CFLAGS@ @@ -58,12 +58,22 @@ SWATDIR = @swatdir@ # the directory where lock files go LOCKDIR = @lockdir@ +# swat i18n with gettext +I18N_PACKAGE = @PACKAGE@ +i18n_datadir = $(prefix)/@DATADIRNAME@ +i18n_localedir = $(i18n_datadir)/locale +intlsubdirs = po intl +top_srcdir = @top_srcdir@ + +# man pages language(s) +man_langs = "@manlangs@" + PASSWD_FLAGS = -DSMB_PASSWD_FILE=\"$(SMB_PASSWD_FILE)\" -DPRIVATE_DIR=\"$(PRIVATE_DIR)\" FLAGS1 = $(CFLAGS) -Iinclude -I$(srcdir)/include -I$(srcdir)/ubiqx -I$(srcdir)/smbwrapper $(CPPFLAGS) -DLOGFILEBASE=\"$(LOGFILEBASE)\" FLAGS2 = -DCONFIGFILE=\"$(CONFIGFILE)\" -DLMHOSTSFILE=\"$(LMHOSTSFILE)\" FLAGS3 = -DSWATDIR=\"$(SWATDIR)\" -DSBINDIR=\"$(SBINDIR)\" -DLOCKDIR=\"$(LOCKDIR)\" FLAGS4 = -DDRIVERFILE=\"$(DRIVERFILE)\" -DBINDIR=\"$(BINDIR)\" -DFORMSFILE=\"$(FORMSFILE)\" -DNTDRIVERSDIR=\"$(NTDRIVERSDIR)\" -FLAGS5 = $(FLAGS1) $(FLAGS2) $(FLAGS3) $(FLAGS4) -DHAVE_INCLUDES_H +FLAGS5 = $(FLAGS1) $(FLAGS2) $(FLAGS3) $(FLAGS4) -DHAVE_INCLUDES_H -DI18N_PACKAGE=\"$(I18N_PACKAGE)\" -DI18N_LOCALEDIR=\"$(i18n_localedir)\" -Iintl -I$(srcdir)/intl FLAGS = $(ISA) $(FLAGS5) $(PASSWD_FLAGS) FLAGS32 = $(ISA32) $(FLAGS5) $(PASSWD_FLAGS) @@ -224,9 +234,10 @@ NMBD_OBJ = $(NMBD_OBJ1) $(PARAM_OBJ) $(LIBSMB_OBJ) $(UBIQX_OBJ) \ $(PROFILE_OBJ) $(LIB_OBJ) SWAT_OBJ = web/cgi.o web/diagnose.o web/startstop.o web/statuspage.o \ - web/swat.o $(PRINTING_OBJ) $(LIBSMB_OBJ) $(LOCKING_OBJ) \ + web/swat.o web/neg_lang.o $(PRINTING_OBJ) $(LIBSMB_OBJ) $(LOCKING_OBJ) \ $(PARAM_OBJ) $(PASSDB_OBJ) $(RPC_CLIENT_OBJ) $(RPC_PARSE_OBJ) \ - $(UBIQX_OBJ) $(LIB_OBJ) $(GROUPDB_OBJ) $(PLAINTEXT_AUTH_OBJ) + $(UBIQX_OBJ) $(LIB_OBJ) $(GROUPDB_OBJ) $(PLAINTEXT_AUTH_OBJ) \ + smbwrapper/shared.o SMBSH_OBJ = smbwrapper/smbsh.o smbwrapper/shared.o \ $(PARAM_OBJ) $(UBIQX_OBJ) $(LIB_OBJ) @@ -406,7 +417,7 @@ WINBIND_NSS_PICOBJS = $(WINBIND_NSS_OBJ:.o=.po) ###################################################################### # now the rules... ###################################################################### -all : CHECK $(SPROGS) $(PROGS) $(SHLIBS) nsswitch +all : CHECK I18N-SUPPORT-ALL include/proto.h $(SPROGS) $(PROGS) $(SHLIBS) nsswitch pam_smbpass : CHECK bin/pam_smbpass.@SHLIBEXT@ @@ -649,7 +660,7 @@ bin/pam_smbpass.@SHLIBEXT@: $(PAM_SMBPASS_PICOOBJ) @echo "Linking shared library $@" $(LD) @LDSHFLAGS@ -symbolic -o $@ $(PAM_SMBPASS_PICOOBJ) -lpam $(LIBS) -lc -install: installbin installman installscripts installswat +install: installbin installman installscripts installswat I18N-SUPPORT-INSTALL installdirs: -$(SHELL) $(srcdir)/install-sh -d -m $(INSTALLPERMS) \ @@ -679,12 +690,12 @@ revert: @$(SHELL) $(srcdir)/script/revert.sh $(BINDIR) $(PROGS) $(SCRIPTS) installman: - @$(SHELL) $(srcdir)/script/installman.sh $(MANDIR) $(srcdir) "@ROFF@" + @$(SHELL) $(srcdir)/script/installman.sh $(MANDIR) $(srcdir) $(man_langs) "@ROFF@" uninstall: uninstallman uninstallbin uninstallscripts uninstallman: - @$(SHELL) $(srcdir)/script/uninstallman.sh $(MANDIR) $(srcdir) + @$(SHELL) $(srcdir)/script/uninstallman.sh $(MANDIR) $(srcdir) $(man_langs) uninstallbin: @$(SHELL) $(srcdir)/script/uninstallbin.sh $(INSTALLPERMS) $(BASEDIR) $(SBINDIR) $(LIBDIR) $(VARDIR) $(SPROGS) @@ -693,8 +704,11 @@ uninstallbin: uninstallscripts: @$(SHELL) $(srcdir)/script/uninstallscripts.sh $(INSTALLPERMS) $(BINDIR) $(SCRIPTS) -clean: +clean: I18N-SUPPORT-CLEAN + @test -d intl/po || mkdir intl/po + -mv po/* intl/po -rm -f core */*~ *~ */*.o */*.po */*.po32 */*.@SHLIBEXT@ $(PROGS) $(SPROGS) include/build_env.h + -mv intl/po/* po/ winbindd_proto: @cd $(srcdir) && $(SHELL) script/mkproto.sh $(AWK) \ @@ -763,3 +777,19 @@ config.status: $(srcdir)/configure Makefile: $(srcdir)/Makefile.in config.status @echo "WARNING: you need to run ./config.status" + +# SWAT i18n +I18N-SUPPORT-ALL: + @for I in ${intlsubdirs}; do (cd $$I; ${MAKE} all || exit 1); done + +I18N-SUPPORT-INSTALL: + @for I in ${intlsubdirs}; do (cd $$I; ${MAKE} install || exit 1); done + +I18N-SUPPORT-CLEAN: + @for I in ${intlsubdirs}; do (cd $$I; ${MAKE} clean || exit 1); done + +I18N-SUPPORT-DISTCLEAN: + @for I in ${intlsubdirs}; do (cd $$I; ${MAKE} distclean || exit 1); done + +I18N-SUPPORT-UNINSTALL: + @for I in ${intlsubdirs}; do (cd $$I; ${MAKE} uninstall || exit 1); done diff --git a/source3/acconfig.h b/source3/acconfig.h index e0b276ef2d..01d31a2922 100644 --- a/source3/acconfig.h +++ b/source3/acconfig.h @@ -168,3 +168,12 @@ #undef WITH_TDBSAM #undef LINUX_QUOTAS_1 #undef LINUX_QUOTAS_2 +#undef PACKAGE +#undef VERSION +#undef HAVE_LC_MESSAGES +#undef ENABLE_NLS +#undef HAVE_CATGETS +#undef HAVE_GETTEXT +#undef HAVE_STPCPY +#undef I18N_SWAT +#undef I18N_DEFAULT_PREF_LANG diff --git a/source3/aclocal.m4 b/source3/aclocal.m4 index 13788f99be..caf5ab461b 100644 --- a/source3/aclocal.m4 +++ b/source3/aclocal.m4 @@ -147,6 +147,413 @@ AC_SUBST(LIBTOOL)dnl exec 5>>./config.log ]) +# Macro to add for using GNU gettext. +# Ulrich Drepper <drepper@cygnus.com>, 1995. +# +# This file can be copied and used freely without restrictions. It can +# be used in projects which are not available under the GNU Public License +# but which still want to provide support for the GNU gettext functionality. +# Please note that the actual code is *not* freely available. + +# serial 5 + +AC_DEFUN(AM_WITH_NLS, + [AC_MSG_CHECKING([whether NLS is requested]) + dnl Default is enabled NLS + AC_ARG_ENABLE(nls, + [ --disable-nls do not use Native Language Support], + USE_NLS=$enableval, USE_NLS=yes) + AC_MSG_RESULT($USE_NLS) + AC_SUBST(USE_NLS) + + USE_INCLUDED_LIBINTL=no + + dnl If we use NLS figure out what method + if test "$USE_NLS" = "yes"; then + AC_DEFINE(ENABLE_NLS) +# AC_MSG_CHECKING([whether included gettext is requested]) +# AC_ARG_WITH(included-gettext, +# [ --with-included-gettext use the GNU gettext library included here], +# nls_cv_force_use_gnu_gettext=$withval, +# nls_cv_force_use_gnu_gettext=no) +# AC_MSG_RESULT($nls_cv_force_use_gnu_gettext) + + dnl ad-hoc fix to prevent configure from detecting + dnl gettext on the system. use included-gettext as default.(rkawa) + nls_cv_force_use_gnu_gettext="yes" + + nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" + if test "$nls_cv_force_use_gnu_gettext" != "yes"; then + dnl User does not insist on using GNU NLS library. Figure out what + dnl to use. If gettext or catgets are available (in this order) we + dnl use this. Else we have to fall back to GNU NLS library. + dnl catgets is only used if permitted by option --with-catgets. + nls_cv_header_intl= + nls_cv_header_libgt= + CATOBJEXT=NONE + + AC_CHECK_HEADER(libintl.h, + [AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc, + [AC_TRY_LINK([#include <libintl.h>], [return (int) gettext ("")], + gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)]) + + if test "$gt_cv_func_gettext_libc" != "yes"; then + AC_CHECK_LIB(intl, bindtextdomain, + [AC_CACHE_CHECK([for gettext in libintl], + gt_cv_func_gettext_libintl, + [AC_CHECK_LIB(intl, gettext, + gt_cv_func_gettext_libintl=yes, + gt_cv_func_gettext_libintl=no)], + gt_cv_func_gettext_libintl=no)]) + fi + + if test "$gt_cv_func_gettext_libc" = "yes" \ + || test "$gt_cv_func_gettext_libintl" = "yes"; then + AC_DEFINE(HAVE_GETTEXT) + AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, + [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl + if test "$MSGFMT" != "no"; then + AC_CHECK_FUNCS(dcgettext) + AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) + AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, + [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) + AC_TRY_LINK(, [extern int _nl_msg_cat_cntr; + return _nl_msg_cat_cntr], + [CATOBJEXT=.gmo + DATADIRNAME=share], + [CATOBJEXT=.mo + DATADIRNAME=lib]) + INSTOBJEXT=.mo + fi + fi + ]) + + if test "$CATOBJEXT" = "NONE"; then +# AC_MSG_CHECKING([whether catgets can be used]) +# AC_ARG_WITH(catgets, +# [ --with-catgets use catgets functions if available], +# nls_cv_use_catgets=$withval, nls_cv_use_catgets=no) +# AC_MSG_RESULT($nls_cv_use_catgets) + + dnl ad-hoc fix to prevent configure to detect catgets library. + dnl (rkawa) + nls_cv_use_catgets="no" + + if test "$nls_cv_use_catgets" = "yes"; then + dnl No gettext in C library. Try catgets next. + AC_CHECK_LIB(i, main) + AC_CHECK_FUNC(catgets, + [AC_DEFINE(HAVE_CATGETS) + INTLOBJS="\$(CATOBJS)" + AC_PATH_PROG(GENCAT, gencat, no)dnl + if test "$GENCAT" != "no"; then + AC_PATH_PROG(GMSGFMT, gmsgfmt, no) + if test "$GMSGFMT" = "no"; then + AM_PATH_PROG_WITH_TEST(GMSGFMT, msgfmt, + [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no) + fi + AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, + [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) + USE_INCLUDED_LIBINTL=yes + CATOBJEXT=.cat + INSTOBJEXT=.cat + DATADIRNAME=lib + INTLDEPS='$(top_builddir)/intl/libintl.a' + INTLLIBS=$INTLDEPS + LIBS=`echo $LIBS | sed -e 's/-lintl//'` + nls_cv_header_intl=intl/libintl.h + nls_cv_header_libgt=intl/libgettext.h + fi]) + fi + fi + + if test "$CATOBJEXT" = "NONE"; then + dnl Neither gettext nor catgets in included in the C library. + dnl Fall back on GNU gettext library. + nls_cv_use_gnu_gettext=yes + fi + fi + + if test "$nls_cv_use_gnu_gettext" = "yes"; then + dnl Mark actions used to generate GNU NLS library. + INTLOBJS="\$(GETTOBJS)" + AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, + [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt) + AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) + AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, + [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) + AC_SUBST(MSGFMT) + USE_INCLUDED_LIBINTL=yes + CATOBJEXT=.gmo + INSTOBJEXT=.mo + DATADIRNAME=share + INTLDEPS='$(top_builddir)/intl/libintl.a' + INTLLIBS=$INTLDEPS + LIBS=`echo $LIBS | sed -e 's/-lintl//'` + nls_cv_header_intl=intl/libintl.h + nls_cv_header_libgt=intl/libgettext.h + fi + + dnl Test whether we really found GNU xgettext. + if test "$XGETTEXT" != ":"; then + dnl If it is no GNU xgettext we define it as : so that the + dnl Makefiles still can work. + if $XGETTEXT --omit-header /dev/null 2> /dev/null; then + : ; + else + AC_MSG_RESULT( + [found xgettext program is not GNU xgettext; ignore it]) + XGETTEXT=":" + fi + fi + + # We need to process the po/ directory. + POSUB=po + else + DATADIRNAME=share + nls_cv_header_intl=intl/libintl.h + nls_cv_header_libgt=intl/libgettext.h + fi + + dnl the next line has been modified by rkawa to avoid + dnl misconfiguration of intl/libintl.h symlink. + rm -f intl/libintl.h + + AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl) + AC_OUTPUT_COMMANDS( + [case "$CONFIG_FILES" in *po/Makefile.in*) + sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile + esac]) + + + # If this is used in GNU gettext we have to set USE_NLS to `yes' + # because some of the sources are only built for this goal. + if test "$PACKAGE" = gettext; then + USE_NLS=yes + USE_INCLUDED_LIBINTL=yes + fi + + dnl These rules are solely for the distribution goal. While doing this + dnl we only have to keep exactly one list of the available catalogs + dnl in configure.in. + for lang in $ALL_LINGUAS; do + GMOFILES="$GMOFILES $lang.gmo" + POFILES="$POFILES $lang.po" + done + + dnl Make all variables we use known to autoconf. + AC_SUBST(USE_INCLUDED_LIBINTL) + AC_SUBST(CATALOGS) + AC_SUBST(CATOBJEXT) + AC_SUBST(DATADIRNAME) + AC_SUBST(GMOFILES) + AC_SUBST(INSTOBJEXT) + AC_SUBST(INTLDEPS) + AC_SUBST(INTLLIBS) + AC_SUBST(INTLOBJS) + AC_SUBST(POFILES) + AC_SUBST(POSUB) + ]) + +AC_DEFUN(AM_GNU_GETTEXT, + [AC_REQUIRE([AC_PROG_MAKE_SET])dnl + AC_REQUIRE([AC_PROG_CC])dnl + AC_REQUIRE([AC_PROG_RANLIB])dnl + AC_REQUIRE([AC_ISC_POSIX])dnl + AC_REQUIRE([AC_HEADER_STDC])dnl + AC_REQUIRE([AC_C_CONST])dnl + AC_REQUIRE([AC_C_INLINE])dnl + AC_REQUIRE([AC_TYPE_OFF_T])dnl + AC_REQUIRE([AC_TYPE_SIZE_T])dnl + AC_REQUIRE([AC_FUNC_ALLOCA])dnl + AC_REQUIRE([AC_FUNC_MMAP])dnl + + AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \ +unistd.h sys/param.h]) + AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \ +strdup __argz_count __argz_stringify __argz_next]) + + if test "${ac_cv_func_stpcpy+set}" != "set"; then + AC_CHECK_FUNCS(stpcpy) + fi + if test "${ac_cv_func_stpcpy}" = "yes"; then + AC_DEFINE(HAVE_STPCPY) + fi + + AM_LC_MESSAGES + AM_WITH_NLS + + + if test "x$CATOBJEXT" != "x"; then + if test "x$ALL_LINGUAS" = "x"; then + LINGUAS= + else + AC_MSG_CHECKING(for catalogs to be installed) + NEW_LINGUAS= + for lang in ${LINGUAS=$ALL_LINGUAS}; do + case "$ALL_LINGUAS" in + *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;; + esac + done + LINGUAS=$NEW_LINGUAS + AC_MSG_RESULT($LINGUAS) + fi + + dnl Construct list of names of catalog files to be constructed. + if test -n "$LINGUAS"; then + for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done + fi + fi + + dnl The reference to <locale.h> in the installed <libintl.h> file + dnl must be resolved because we cannot expect the users of this + dnl to define HAVE_LOCALE_H. + if test $ac_cv_header_locale_h = yes; then + INCLUDE_LOCALE_H="#include <locale.h>" + else + INCLUDE_LOCALE_H="\ +/* The system does not provide the header <locale.h>. Take care yourself. */" + fi + AC_SUBST(INCLUDE_LOCALE_H) + dnl Determine which catalog format we have (if any is needed) + dnl For now we know about two different formats: + dnl Linux libc-5 and the normal X/Open format + test -d intl || mkdir intl + if test "$CATOBJEXT" = ".cat"; then + AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen) + + dnl Transform the SED scripts while copying because some dumb SEDs + dnl cannot handle comments. + sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed + + dnl To avoid XPG incompatible SED to be used, .msg files of + dnl x/open format are included to the archive, rather than + dnl compiled in the installation. If the system uses linux libc5 + dnl format, then x/open files are removed and the sed script + dnl creates the files of the correct format. (rkawa) + if test "$msgformat" = "linux"; then + rm -f $srcdir/po/*.msg + fi + fi + dnl po2tbl.sed is always needed. + sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \ + $srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed + + dnl In the intl/Makefile.in we have a special dependency which makes + dnl only sense for gettext. We comment this out for non-gettext + dnl packages. + if test "$PACKAGE" = "gettext"; then + GT_NO="#NO#" + GT_YES= + else + GT_NO= + GT_YES="#YES#" + fi + AC_SUBST(GT_NO) + AC_SUBST(GT_YES) + + dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly + dnl find the mkinstalldirs script in another subdir but ($top_srcdir). + dnl Try to locate is. + MKINSTALLDIRS= + if test -n "$ac_aux_dir"; then + MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" + fi + if test -z "$MKINSTALLDIRS"; then + MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" + fi + AC_SUBST(MKINSTALLDIRS) + + dnl *** For now the libtool support in intl/Makefile is not for real. + l= + AC_SUBST(l) + + dnl Generate list of files to be processed by xgettext which will + dnl be included in po/Makefile. + test -d po || mkdir po + if test "x$srcdir" != "x."; then + if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then + posrcprefix="$srcdir/" + else + posrcprefix="../$srcdir/" + fi + else + posrcprefix="../" + fi + rm -f po/POTFILES + sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ + < $srcdir/po/POTFILES.in > po/POTFILES + ]) + +# Check whether LC_MESSAGES is available in <locale.h>. +# Ulrich Drepper <drepper@cygnus.com>, 1995. +# +# This file can be copied and used freely without restrictions. It can +# be used in projects which are not available under the GNU Public License +# but which still want to provide support for the GNU gettext functionality. +# Please note that the actual code is *not* freely available. + +# serial 1 + +AC_DEFUN(AM_LC_MESSAGES, + [if test $ac_cv_header_locale_h = yes; then + AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, + [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES], + am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) + if test $am_cv_val_LC_MESSAGES = yes; then + AC_DEFINE(HAVE_LC_MESSAGES) + fi + fi]) + +# Search path for a program which passes the given test. +# Ulrich Drepper <drepper@cygnus.com>, 1996. +# +# This file can be copied and used freely without restrictions. It can +# be used in projects which are not available under the GNU Public License +# but which still want to provide support for the GNU gettext functionality. +# Please note that the actual code is *not* freely available. + +# serial 1 + +dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, +dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) +AC_DEFUN(AM_PATH_PROG_WITH_TEST, +[# Extract the first word of "$2", so it can be a program name with args. +set dummy $2; ac_word=[$]2 +AC_MSG_CHECKING([for $ac_word]) +AC_CACHE_VAL(ac_cv_path_$1, +[case "[$]$1" in + /*) + ac_cv_path_$1="[$]$1" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in ifelse([$5], , $PATH, [$5]); do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if [$3]; then + ac_cv_path_$1="$ac_dir/$ac_word" + break + fi + fi + done + IFS="$ac_save_ifs" +dnl If no 4th arg is given, leave the cache variable unset, +dnl so AC_PATH_PROGS will keep looking. +ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" +])dnl + ;; +esac])dnl +$1="$ac_cv_path_$1" +if test -n "[$]$1"; then + AC_MSG_RESULT([$]$1) +else + AC_MSG_RESULT(no) +fi +AC_SUBST($1)dnl +]) + + AC_DEFUN(AC_LIBTOOL_SETUP, [AC_PREREQ(2.13)dnl AC_REQUIRE([AC_ENABLE_SHARED])dnl diff --git a/source3/configure.in b/source3/configure.in index 030a273480..b9e8c94b42 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -2027,6 +2027,76 @@ AC_ARG_WITH(swatdir, ) ################################################# +# check for i18n'ed SWAT compiling +AC_MSG_CHECKING(whether to use i18n'ed SWAT) +AC_ARG_WITH(i18n-swat, +[ --with-i18n-swat Use i18n'ed SWAT + --without-i18n-swat Don't use i18n'ed SWAT (default)], +[ case "$withval" in + yes) + AC_MSG_RESULT(yes) + AC_DEFINE(I18N_SWAT) + ;; + *) + AC_MSG_RESULT(no) + ;; + esac ], + AC_MSG_RESULT(no) +) + +################################################# +# set SWAT default language for old web browsers. +AC_MSG_CHECKING(whether to use default SWAT language) +AC_ARG_WITH(swat-def-lang, +[ --with-swat-def-lang=LN default SWAT language for old web browsers (empty)], +[ + default_pref_lang="" + case "$withval" in + yes) + AC_MSG_WARN([--with-swat-def-lang called without argument - will use default]) + ;; + no) + AC_MSG_RESULT(no) + ;; + *) + default_pref_lang="$withval" + AC_MSG_RESULT($withval) + ;; + esac + AC_DEFINE_UNQUOTED(I18N_DEFAULT_PREF_LANG, "$default_pref_lang") +], +[ + default_pref_lang="" + AC_MSG_RESULT(no) + AC_DEFINE_UNQUOTED(I18N_DEFAULT_PREF_LANG, "$default_pref_lang") +] +) + +################################################# +# choose native language(s) of man pages +AC_MSG_CHECKING(chosen man pages' language(s)) +AC_ARG_WITH(manpages-langs, +[ --with-manpages-langs={en,ja,pl} Choose man pages' language(s). (en)], +[ case "$withval" in + yes|no) + AC_MSG_WARN(--with-manpages-langs called without argument - will use default) + manlangs="en" + ;; + *) + manlangs="$withval" + ;; + esac + + AC_MSG_RESULT($manlangs) + manlangs=${manlangs//,/ } # replacing commas with spaces to produce a list + AC_SUBST(manlangs)], + + [manlangs="en" + AC_MSG_RESULT($manlangs) + AC_SUBST(manlangs)] +) + +################################################# # these tests are taken from the GNU fileutils package AC_CHECKING(how to get filesystem space usage) space=no @@ -2394,6 +2464,15 @@ AC_SUBST(WINBIND_LTARGETS) AC_SUBST(WINBIND_PAM_PROGS) ################################################# +# Check for SWAT i18n support + +PACKAGE=i18n_swat +AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE") +AC_SUBST(PACKAGE) +ALL_LINGUAS="en ja pl tr" +AM_GNU_GETTEXT + +################################################# # final configure stuff echo "checking configure summary" @@ -2404,4 +2483,4 @@ AC_TRY_RUN([#include "${srcdir-.}/tests/summary.c"], builddir=`pwd` AC_SUBST(builddir) -AC_OUTPUT(include/stamp-h Makefile) +AC_OUTPUT(include/stamp-h Makefile intl/Makefile po/Makefile.in) diff --git a/source3/include/config.h.in b/source3/include/config.h.in index 5cb0bb2ad8..53bd6794b3 100644 --- a/source3/include/config.h.in +++ b/source3/include/config.h.in @@ -232,6 +232,23 @@ #undef LINUX_QUOTAS_1 #undef LINUX_QUOTAS_2 +/* Define to the name of the distribution. */ +#undef PACKAGE +/* Define to the version of the distribution. */ +#undef VERSION +/* Define if your locale.h file contains LC_MESSAGES. */ +#undef HAVE_LC_MESSAGES +/* Define to 1 if NLS is requested. */ +#undef ENABLE_NLS +/* Define as 1 if you have gettext and don't want to use GNU gettext. */ +#undef HAVE_GETTEXT +/* Define as 1 if you have the stpcpy function. */ +#undef HAVE_STPCPY +/* ???? (rkawa) */ +#undef I18N_SWAT +/* Define to the default SWAT language for old browsers. */ +#undef I18N_DEFAULT_PREF_LANG + /* The number of bytes in a int. */ #undef SIZEOF_INT @@ -799,6 +816,9 @@ /* Define if you have the <limits.h> header file. */ #undef HAVE_LIMITS_H +/* Define if you have the <locale.h> header file. */ +#undef HAVE_LOCALE_H + /* Define if you have the <memory.h> header file. */ #undef HAVE_MEMORY_H diff --git a/source3/include/webintl.h b/source3/include/webintl.h new file mode 100644 index 0000000000..12626a5f19 --- /dev/null +++ b/source3/include/webintl.h @@ -0,0 +1,52 @@ +#ifndef I18N_H_INCLUDED +#define I18N_H_INCLUDED 1 + +/* + * I18N_ORIGINAL_LANG ...the language of the original document files (*.html). + */ +#define I18N_ORIGINAL_LANG "en" + +/* these constants are defined in Makefile. + * + * I18N_PACKAGE ...package name "i18n_swat" defined in configure.in. + * I18N_LOCALEDIR ...directory to put message catalogs. + * I18N_LOCALE_FILE ...filename of the language-locale map file. + */ + +#ifdef ENABLE_NLS +#define I18N_GETTEXT 1 +#endif /* ENABLE_NLS */ + +/* if NLS is disabled (ENABLE_NLS == 0), configure script will + * automatically creates intl/libintl.h -> intl/libgettext.h (symlink) + * and gettext(str) is defined as (str) in that file. + */ +#include <libintl.h> +#define _(String) gettext(String) +#define N_(String) (String) + +#if I18N_SWAT +#define LN_(fname) ln_get_pref_file_n_o(fname) +#else +#define LN_(fname) (fname) +#endif /* I18N_SWAT */ + +/* global function pointers defined in kanji.c. */ +extern char *(*dos_to_dos)(char *to, const char *from); + +/* ****************************************************************** + * macros for debugging. + ***************************************************************** */ +#define LN_R_NODEBUG 1 +#ifdef LN_R_NODEBUG +#define rassert(b) (void)0 +#define rstrace(s) (void)0 + +#else +void ln_debug_error(const char *info, int nLine); +void rassert_help(BOOL b, int l); +#define rassert(b) rassert_help((BOOL)(b), (__LINE__)) +#define rstrace(s) ln_debug_error((s), (__LINE__)) +#endif /* LN_R_NODEBUG */ + +#endif /* I18N_H_INCLUDED */ diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 1ead342ebe..9b0759b2d5 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -50,6 +50,7 @@ */ #include "includes.h" +#include "webintl.h" BOOL in_client = False; /* Not in the client by default */ BOOL bLoaded = False; @@ -637,395 +638,395 @@ static struct enum_list enum_ssl_version[] = { /* note that we do not initialise the defaults union - it is not allowed in ANSI C */ static struct parm_struct parm_table[] = { - {"Base Options", P_SEP, P_SEPARATOR}, - - {"dos charset", P_STRING, P_GLOBAL, &Globals.dos_charset, NULL, NULL, 0}, - {"unix charset", P_STRING, P_GLOBAL, &Globals.unix_charset, NULL, NULL, 0}, - {"display charset", P_STRING, P_GLOBAL, &Globals.display_charset, NULL, NULL, 0}, - {"comment", P_STRING, P_LOCAL, &sDefault.comment, NULL, NULL, FLAG_BASIC | FLAG_SHARE | FLAG_PRINT}, - {"path", P_STRING, P_LOCAL, &sDefault.szPath, NULL, NULL, FLAG_BASIC | FLAG_SHARE | FLAG_PRINT}, - {"directory", P_STRING, P_LOCAL, &sDefault.szPath, NULL, NULL, 0}, - {"workgroup", P_USTRING, P_GLOBAL, &Globals.szWorkGroup, NULL, NULL, FLAG_BASIC}, - {"netbios name", P_UGSTRING, P_GLOBAL, global_myname, handle_netbios_name, NULL, FLAG_BASIC}, - {"netbios aliases", P_LIST, P_GLOBAL, &Globals.szNetbiosAliases, NULL, NULL, 0}, - {"netbios scope", P_UGSTRING, P_GLOBAL, global_scope, NULL, NULL, 0}, - {"server string", P_STRING, P_GLOBAL, &Globals.szServerString, NULL, NULL, FLAG_BASIC }, - {"interfaces", P_LIST, P_GLOBAL, &Globals.szInterfaces, NULL, NULL, FLAG_BASIC}, - {"bind interfaces only", P_BOOL, P_GLOBAL, &Globals.bBindInterfacesOnly, NULL, NULL, 0}, - - {"Security Options", P_SEP, P_SEPARATOR}, + {N_("Base Options"), P_SEP, P_SEPARATOR}, + + {N_("dos charset"), P_STRING, P_GLOBAL, &Globals.dos_charset, NULL, NULL, 0}, + {N_("unix charset"), P_STRING, P_GLOBAL, &Globals.unix_charset, NULL, NULL, 0}, + {N_("display charset"), P_STRING, P_GLOBAL, &Globals.display_charset, NULL, NULL, 0}, + {N_("comment"), P_STRING, P_LOCAL, &sDefault.comment, NULL, NULL, FLAG_BASIC | FLAG_SHARE | FLAG_PRINT}, + {N_("path"), P_STRING, P_LOCAL, &sDefault.szPath, NULL, NULL, FLAG_BASIC | FLAG_SHARE | FLAG_PRINT}, + {N_("directory"), P_STRING, P_LOCAL, &sDefault.szPath, NULL, NULL, 0}, + {N_("workgroup"), P_USTRING, P_GLOBAL, &Globals.szWorkGroup, NULL, NULL, FLAG_BASIC}, + {N_("netbios name"), P_UGSTRING, P_GLOBAL, global_myname, handle_netbios_name, NULL, FLAG_BASIC}, + {N_("netbios aliases"), P_LIST, P_GLOBAL, &Globals.szNetbiosAliases, NULL, NULL, 0}, + {N_("netbios scope"), P_UGSTRING, P_GLOBAL, global_scope, NULL, NULL, 0}, + {N_("server string"), P_STRING, P_GLOBAL, &Globals.szServerString, NULL, NULL, FLAG_BASIC }, + {N_("interfaces"), P_LIST, P_GLOBAL, &Globals.szInterfaces, NULL, NULL, FLAG_BASIC}, + {N_("bind interfaces only"), P_BOOL, P_GLOBAL, &Globals.bBindInterfacesOnly, NULL, NULL, 0}, + + {N_("Security Options"), P_SEP, P_SEPARATOR}, - {"security", P_ENUM, P_GLOBAL, &Globals.security, NULL, enum_security, FLAG_BASIC}, - {"encrypt passwords", P_BOOL, P_GLOBAL, &Globals.bEncryptPasswords, NULL, NULL, FLAG_BASIC}, - {"update encrypted", P_BOOL, P_GLOBAL, &Globals.bUpdateEncrypt, NULL, NULL, FLAG_BASIC}, - {"allow trusted domains", P_BOOL, P_GLOBAL, &Globals.bAllowTrustedDomains, NULL, NULL, 0}, - {"alternate permissions", P_BOOL, P_LOCAL, &sDefault.bAlternatePerm, NULL, NULL, FLAG_GLOBAL | FLAG_DEPRECATED}, - {"hosts equiv", P_STRING, P_GLOBAL, &Globals.szHostsEquiv, NULL, NULL, 0}, - {"min passwd length", P_INTEGER, P_GLOBAL, &Globals.min_passwd_length, NULL, NULL, 0}, - {"min password length", P_INTEGER, P_GLOBAL, &Globals.min_passwd_length, NULL, NULL, 0}, - {"map to guest", P_ENUM, P_GLOBAL, &Globals.map_to_guest, NULL, enum_map_to_guest, 0}, - {"null passwords", P_BOOL, P_GLOBAL, &Globals.bNullPasswords, NULL, NULL, 0}, - {"obey pam restrictions", P_BOOL, P_GLOBAL, &Globals.bObeyPamRestrictions, NULL, NULL, 0}, - {"password server", P_STRING, P_GLOBAL, &Globals.szPasswordServer, NULL, NULL, 0}, - {"smb passwd file", P_STRING, P_GLOBAL, &Globals.szSMBPasswdFile, NULL, NULL, 0}, - {"private dir", P_STRING, P_GLOBAL, &Globals.szPrivateDir, NULL, NULL, 0}, - {"passdb module path", P_STRING, P_GLOBAL, &Globals.szPassdbModulePath, NULL, NULL, 0}, - {"root directory", P_STRING, P_GLOBAL, &Globals.szRootdir, NULL, NULL, 0}, - {"root dir", P_STRING, P_GLOBAL, &Globals.szRootdir, NULL, NULL, 0}, - {"root", P_STRING, P_GLOBAL, &Globals.szRootdir, NULL, NULL, 0}, + {N_("security"), P_ENUM, P_GLOBAL, &Globals.security, NULL, enum_security, FLAG_BASIC}, + {N_("encrypt passwords"), P_BOOL, P_GLOBAL, &Globals.bEncryptPasswords, NULL, NULL, FLAG_BASIC}, + {N_("update encrypted"), P_BOOL, P_GLOBAL, &Globals.bUpdateEncrypt, NULL, NULL, FLAG_BASIC}, + {N_("allow trusted domains"), P_BOOL, P_GLOBAL, &Globals.bAllowTrustedDomains, NULL, NULL, 0}, + {N_("alternate permissions"), P_BOOL, P_LOCAL, &sDefault.bAlternatePerm, NULL, NULL, FLAG_GLOBAL | FLAG_DEPRECATED}, + {N_("hosts equiv"), P_STRING, P_GLOBAL, &Globals.szHostsEquiv, NULL, NULL, 0}, + {N_("min passwd length"), P_INTEGER, P_GLOBAL, &Globals.min_passwd_length, NULL, NULL, 0}, + {N_("min password length"), P_INTEGER, P_GLOBAL, &Globals.min_passwd_length, NULL, NULL, 0}, + {N_("map to guest"), P_ENUM, P_GLOBAL, &Globals.map_to_guest, NULL, enum_map_to_guest, 0}, + {N_("null passwords"), P_BOOL, P_GLOBAL, &Globals.bNullPasswords, NULL, NULL, 0}, + {N_("obey pam restrictions"), P_BOOL, P_GLOBAL, &Globals.bObeyPamRestrictions, NULL, NULL, 0}, + {N_("password server"), P_STRING, P_GLOBAL, &Globals.szPasswordServer, NULL, NULL, 0}, + {N_("smb passwd file"), P_STRING, P_GLOBAL, &Globals.szSMBPasswdFile, NULL, NULL, 0}, + {N_("private dir"), P_STRING, P_GLOBAL, &Globals.szPrivateDir, NULL, NULL, 0}, + {N_("passdb module path"), P_STRING, P_GLOBAL, &Globals.szPassdbModulePath, NULL, NULL, 0}, + {N_("root directory"), P_STRING, P_GLOBAL, &Globals.szRootdir, NULL, NULL, 0}, + {N_("root dir"), P_STRING, P_GLOBAL, &Globals.szRootdir, NULL, NULL, 0}, + {N_("root"), P_STRING, P_GLOBAL, &Globals.szRootdir, NULL, NULL, 0}, - {"pam password change", P_BOOL, P_GLOBAL, &Globals.bPamPasswordChange, NULL, NULL, 0}, - {"passwd program", P_STRING, P_GLOBAL, &Globals.szPasswdProgram, NULL, NULL, 0}, - {"passwd chat", P_STRING, P_GLOBAL, &Globals.szPasswdChat, NULL, NULL, 0}, - {"passwd chat debug", P_BOOL, P_GLOBAL, &Globals.bPasswdChatDebug, NULL, NULL, 0}, - {"username map", P_STRING, P_GLOBAL, &Globals.szUsernameMap, NULL, NULL, 0}, - {"password level", P_INTEGER, P_GLOBAL, &Globals.pwordlevel, NULL, NULL, 0}, - {"username level", P_INTEGER, P_GLOBAL, &Globals.unamelevel, NULL, NULL, 0}, - {"unix password sync", P_BOOL, P_GLOBAL, &Globals.bUnixPasswdSync, NULL, NULL, 0}, - {"restrict anonymous", P_BOOL, P_GLOBAL, &Globals.bRestrictAnonymous, NULL, NULL, 0}, - {"lanman auth", P_BOOL, P_GLOBAL, &Globals.bLanmanAuth, NULL, NULL, 0}, - {"ntlm auth", P_BOOL, P_GLOBAL, &Globals.bNTLMAuth, NULL, NULL, 0}, - {"plaintext to smbpasswd", P_BOOL, P_GLOBAL, &Globals.bPlaintextToSmbpasswd, NULL, NULL, 0}, - {"use rhosts", P_BOOL, P_GLOBAL, &Globals.bUseRhosts, NULL, NULL, 0}, + {N_("pam password change"), P_BOOL, P_GLOBAL, &Globals.bPamPasswordChange, NULL, NULL, 0}, + {N_("passwd program"), P_STRING, P_GLOBAL, &Globals.szPasswdProgram, NULL, NULL, 0}, + {N_("passwd chat"), P_STRING, P_GLOBAL, &Globals.szPasswdChat, NULL, NULL, 0}, + {N_("passwd chat debug"), P_BOOL, P_GLOBAL, &Globals.bPasswdChatDebug, NULL, NULL, 0}, + {N_("username map"), P_STRING, P_GLOBAL, &Globals.szUsernameMap, NULL, NULL, 0}, + {N_("password level"), P_INTEGER, P_GLOBAL, &Globals.pwordlevel, NULL, NULL, 0}, + {N_("username level"), P_INTEGER, P_GLOBAL, &Globals.unamelevel, NULL, NULL, 0}, + {N_("unix password sync"), P_BOOL, P_GLOBAL, &Globals.bUnixPasswdSync, NULL, NULL, 0}, + {N_("restrict anonymous"), P_BOOL, P_GLOBAL, &Globals.bRestrictAnonymous, NULL, NULL, 0}, + {N_("lanman auth"), P_BOOL, P_GLOBAL, &Globals.bLanmanAuth, NULL, NULL, 0}, + {N_("ntlm auth"), P_BOOL, P_GLOBAL, &Globals.bNTLMAuth, NULL, NULL, 0}, + {N_("plaintext to smbpasswd"), P_BOOL, P_GLOBAL, &Globals.bPlaintextToSmbpasswd, NULL, NULL, 0}, + {N_("use rhosts"), P_BOOL, P_GLOBAL, &Globals.bUseRhosts, NULL, NULL, 0}, - {"username", P_STRING, P_LOCAL, &sDefault.szUsername, NULL, NULL, FLAG_GLOBAL | FLAG_SHARE}, - {"user", P_STRING, P_LOCAL, &sDefault.szUsername, NULL, NULL, 0}, - {"users", P_STRING, P_LOCAL, &sDefault.szUsername, NULL, NULL, 0}, + {N_("username"), P_STRING, P_LOCAL, &sDefault.szUsername, NULL, NULL, FLAG_GLOBAL | FLAG_SHARE}, + {N_("user"), P_STRING, P_LOCAL, &sDefault.szUsername, NULL, NULL, 0}, + {N_("users"), P_STRING, P_LOCAL, &sDefault.szUsername, NULL, NULL, 0}, - {"guest account", P_STRING, P_LOCAL, &sDefault.szGuestaccount, NULL, NULL, FLAG_BASIC | FLAG_SHARE | FLAG_PRINT | FLAG_GLOBAL}, - {"invalid users", P_LIST, P_LOCAL, &sDefault.szInvalidUsers, NULL, NULL, FLAG_GLOBAL | FLAG_SHARE}, - {"valid users", P_LIST, P_LOCAL, &sDefault.szValidUsers, NULL, NULL, FLAG_GLOBAL | FLAG_SHARE}, - {"admin users", P_LIST, P_LOCAL, &sDefault.szAdminUsers, NULL, NULL, FLAG_GLOBAL | FLAG_SHARE}, - {"read list", P_LIST, P_LOCAL, &sDefault.readlist, NULL, NULL, FLAG_GLOBAL | FLAG_SHARE}, - {"write list", P_LIST, P_LOCAL, &sDefault.writelist, NULL, NULL, FLAG_GLOBAL | FLAG_SHARE}, - {"printer admin", P_LIST, P_LOCAL, &sDefault.printer_admin, NULL, NULL, FLAG_GLOBAL | FLAG_PRINT}, - {"force user", P_STRING, P_LOCAL, &sDefault.force_user, NULL, NULL, FLAG_SHARE}, - {"force group", P_STRING, P_LOCAL, &sDefault.force_group, NULL, NULL, FLAG_SHARE}, - {"group", P_STRING, P_LOCAL, &sDefault.force_group, NULL, NULL, 0}, + {N_("guest account"), P_STRING, P_LOCAL, &sDefault.szGuestaccount, NULL, NULL, FLAG_BASIC | FLAG_SHARE | FLAG_PRINT | FLAG_GLOBAL}, + {N_("invalid users"), P_LIST, P_LOCAL, &sDefault.szInvalidUsers, NULL, NULL, FLAG_GLOBAL | FLAG_SHARE}, + {N_("valid users"), P_LIST, P_LOCAL, &sDefault.szValidUsers, NULL, NULL, FLAG_GLOBAL | FLAG_SHARE}, + {N_("admin users"), P_LIST, P_LOCAL, &sDefault.szAdminUsers, NULL, NULL, FLAG_GLOBAL | FLAG_SHARE}, + {N_("read list"), P_LIST, P_LOCAL, &sDefault.readlist, NULL, NULL, FLAG_GLOBAL | FLAG_SHARE}, + {N_("write list"), P_LIST, P_LOCAL, &sDefault.writelist, NULL, NULL, FLAG_GLOBAL | FLAG_SHARE}, + {N_("printer admin"), P_LIST, P_LOCAL, &sDefault.printer_admin, NULL, NULL, FLAG_GLOBAL | FLAG_PRINT}, + {N_("force user"), P_STRING, P_LOCAL, &sDefault.force_user, NULL, NULL, FLAG_SHARE}, + {N_("force group"), P_STRING, P_LOCAL, &sDefault.force_group, NULL, NULL, FLAG_SHARE}, + {N_("group"), P_STRING, P_LOCAL, &sDefault.force_group, NULL, NULL, 0}, - {"read only", P_BOOL, P_LOCAL, &sDefault.bRead_only, NULL, NULL, FLAG_BASIC | FLAG_SHARE}, - {"write ok", P_BOOLREV, P_LOCAL, &sDefault.bRead_only, NULL, NULL, 0}, - {"writeable", P_BOOLREV, P_LOCAL, &sDefault.bRead_only, NULL, NULL, 0}, - {"writable", P_BOOLREV, P_LOCAL, &sDefault.bRead_only, NULL, NULL, 0}, + {N_("read only"), P_BOOL, P_LOCAL, &sDefault.bRead_only, NULL, NULL, FLAG_BASIC | FLAG_SHARE}, + {N_("write ok"), P_BOOLREV, P_LOCAL, &sDefault.bRead_only, NULL, NULL, 0}, + {N_("writeable"), P_BOOLREV, P_LOCAL, &sDefault.bRead_only, NULL, NULL, 0}, + {N_("writable"), P_BOOLREV, P_LOCAL, &sDefault.bRead_only, NULL, NULL, 0}, - {"create mask", P_OCTAL, P_LOCAL, &sDefault.iCreate_mask, NULL, NULL, FLAG_GLOBAL | FLAG_SHARE}, - {"create mode", P_OCTAL, P_LOCAL, &sDefault.iCreate_mask, NULL, NULL, FLAG_GLOBAL}, - {"force create mode", P_OCTAL, P_LOCAL, &sDefault.iCreate_force_mode, NULL, NULL, FLAG_GLOBAL | FLAG_SHARE}, - {"security mask", P_OCTAL, P_LOCAL, &sDefault.iSecurity_mask, NULL, NULL, FLAG_GLOBAL | FLAG_SHARE}, - {"force security mode", P_OCTAL, P_LOCAL, &sDefault.iSecurity_force_mode, NULL, NULL, FLAG_GLOBAL | FLAG_SHARE}, - {"directory mask", P_OCTAL, P_LOCAL, &sDefault.iDir_mask, NULL, NULL, FLAG_GLOBAL | FLAG_SHARE}, - {"directory mode", P_OCTAL, P_LOCAL, &sDefault.iDir_mask, NULL, NULL, FLAG_GLOBAL}, - {"force directory mode", P_OCTAL, P_LOCAL, &sDefault.iDir_force_mode, NULL, NULL, FLAG_GLOBAL | FLAG_SHARE}, - {"directory security mask", P_OCTAL, P_LOCAL, &sDefault.iDir_Security_mask, NULL, NULL, FLAG_GLOBAL | FLAG_SHARE}, - {"force directory security mode", P_OCTAL, P_LOCAL, &sDefault.iDir_Security_force_mode, NULL, NULL, FLAG_GLOBAL | FLAG_SHARE}, - {"inherit permissions", P_BOOL, P_LOCAL, &sDefault.bInheritPerms, NULL, NULL, FLAG_SHARE}, - {"guest only", P_BOOL, P_LOCAL, &sDefault.bGuest_only, NULL, NULL, FLAG_SHARE}, - {"only guest", P_BOOL, P_LOCAL, &sDefault.bGuest_only, NULL, NULL, 0}, - - {"guest ok", P_BOOL, P_LOCAL, &sDefault.bGuest_ok, NULL, NULL, FLAG_BASIC | FLAG_SHARE | FLAG_PRINT}, - {"public", P_BOOL, P_LOCAL, &sDefault.bGuest_ok, NULL, NULL, 0}, + {N_("create mask"), P_OCTAL, P_LOCAL, &sDefault.iCreate_mask, NULL, NULL, FLAG_GLOBAL | FLAG_SHARE}, + {N_("create mode"), P_OCTAL, P_LOCAL, &sDefault.iCreate_mask, NULL, NULL, FLAG_GLOBAL}, + {N_("force create mode"), P_OCTAL, P_LOCAL, &sDefault.iCreate_force_mode, NULL, NULL, FLAG_GLOBAL | FLAG_SHARE}, + {N_("security mask"), P_OCTAL, P_LOCAL, &sDefault.iSecurity_mask, NULL, NULL, FLAG_GLOBAL | FLAG_SHARE}, + {N_("force security mode"), P_OCTAL, P_LOCAL, &sDefault.iSecurity_force_mode, NULL, NULL, FLAG_GLOBAL | FLAG_SHARE}, + {N_("directory mask"), P_OCTAL, P_LOCAL, &sDefault.iDir_mask, NULL, NULL, FLAG_GLOBAL | FLAG_SHARE}, + {N_("directory mode"), P_OCTAL, P_LOCAL, &sDefault.iDir_mask, NULL, NULL, FLAG_GLOBAL}, + {N_("force directory mode"), P_OCTAL, P_LOCAL, &sDefault.iDir_force_mode, NULL, NULL, FLAG_GLOBAL | FLAG_SHARE}, + {N_("directory security mask"), P_OCTAL, P_LOCAL, &sDefault.iDir_Security_mask, NULL, NULL, FLAG_GLOBAL | FLAG_SHARE}, + {N_("force directory security mode"), P_OCTAL, P_LOCAL, &sDefault.iDir_Security_force_mode, NULL, NULL, FLAG_GLOBAL | FLAG_SHARE}, + {N_("inherit permissions"), P_BOOL, P_LOCAL, &sDefault.bInheritPerms, NULL, NULL, FLAG_SHARE}, + {N_("guest only"), P_BOOL, P_LOCAL, &sDefault.bGuest_only, NULL, NULL, FLAG_SHARE}, + {N_("only guest"), P_BOOL, P_LOCAL, &sDefault.bGuest_only, NULL, NULL, 0}, + + {N_("guest ok"), P_BOOL, P_LOCAL, &sDefault.bGuest_ok, NULL, NULL, FLAG_BASIC | FLAG_SHARE | FLAG_PRINT}, + {N_("public"), P_BOOL, P_LOCAL, &sDefault.bGuest_ok, NULL, NULL, 0}, - {"only user", P_BOOL, P_LOCAL, &sDefault.bOnlyUser, NULL, NULL, FLAG_SHARE}, - {"hosts allow", P_LIST, P_LOCAL, &sDefault.szHostsallow, NULL, NULL, FLAG_GLOBAL | FLAG_BASIC | FLAG_SHARE | FLAG_PRINT}, - {"allow hosts", P_LIST, P_LOCAL, &sDefault.szHostsallow, NULL, NULL, 0}, - {"hosts deny", P_LIST, P_LOCAL, &sDefault.szHostsdeny, NULL, NULL, FLAG_GLOBAL | FLAG_BASIC | FLAG_SHARE | FLAG_PRINT}, - {"deny hosts", P_LIST, P_LOCAL, &sDefault.szHostsdeny, NULL, NULL, 0}, + {N_("only user"), P_BOOL, P_LOCAL, &sDefault.bOnlyUser, NULL, NULL, FLAG_SHARE}, + {N_("hosts allow"), P_LIST, P_LOCAL, &sDefault.szHostsallow, NULL, NULL, FLAG_GLOBAL | FLAG_BASIC | FLAG_SHARE | FLAG_PRINT}, + {N_("allow hosts"), P_LIST, P_LOCAL, &sDefault.szHostsallow, NULL, NULL, 0}, + {N_("hosts deny"), P_LIST, P_LOCAL, &sDefault.szHostsdeny, NULL, NULL, FLAG_GLOBAL | FLAG_BASIC | FLAG_SHARE | FLAG_PRINT}, + {N_("deny hosts"), P_LIST, P_LOCAL, &sDefault.szHostsdeny, NULL, NULL, 0}, #ifdef WITH_SSL - {"Secure Socket Layer Options", P_SEP, P_SEPARATOR}, - {"ssl", P_BOOL, P_GLOBAL, &Globals.sslEnabled, NULL, NULL, 0}, + {N_("Secure Socket Layer Options"), P_SEP, P_SEPARATOR}, + {N_("ssl"), P_BOOL, P_GLOBAL, &Globals.sslEnabled, NULL, NULL, 0}, - {"ssl hosts", P_LIST, P_GLOBAL, &Globals.sslHostsRequire, NULL, NULL, 0}, - {"ssl hosts resign", P_LIST, P_GLOBAL, &Globals.sslHostsResign, NULL, NULL, 0}, - {"ssl CA certDir", P_STRING, P_GLOBAL, &Globals.sslCaCertDir, NULL, NULL, 0}, - {"ssl CA certFile", P_STRING, P_GLOBAL, &Globals.sslCaCertFile, NULL, NULL, 0}, - {"ssl server cert", P_STRING, P_GLOBAL, &Globals.sslCert, NULL, NULL, 0}, - {"ssl server key", P_STRING, P_GLOBAL, &Globals.sslPrivKey, NULL, NULL, 0}, - {"ssl client cert", P_STRING, P_GLOBAL, &Globals.sslClientCert, NULL, NULL, 0}, - {"ssl client key", P_STRING, P_GLOBAL, &Globals.sslClientPrivKey, NULL, NULL, 0}, - {"ssl require clientcert", P_BOOL, P_GLOBAL, &Globals.sslReqClientCert, NULL, NULL, 0}, - {"ssl require servercert", P_BOOL, P_GLOBAL, &Globals.sslReqServerCert, NULL, NULL, 0}, - {"ssl ciphers", P_STRING, P_GLOBAL, &Globals.sslCiphers, NULL, NULL, 0}, - {"ssl version", P_ENUM, P_GLOBAL, &Globals.sslVersion, NULL, enum_ssl_version, 0}, - {"ssl compatibility", P_BOOL, P_GLOBAL, &Globals.sslCompatibility, NULL, NULL, 0}, + {N_("ssl hosts"), P_LIST, P_GLOBAL, &Globals.sslHostsRequire, NULL, NULL, 0}, + {N_("ssl hosts resign"), P_LIST, P_GLOBAL, &Globals.sslHostsResign, NULL, NULL, 0}, + {N_("ssl CA certDir"), P_STRING, P_GLOBAL, &Globals.sslCaCertDir, NULL, NULL, 0}, + {N_("ssl CA certFile"), P_STRING, P_GLOBAL, &Globals.sslCaCertFile, NULL, NULL, 0}, + {N_("ssl server cert"), P_STRING, P_GLOBAL, &Globals.sslCert, NULL, NULL, 0}, + {N_("ssl server key"), P_STRING, P_GLOBAL, &Globals.sslPrivKey, NULL, NULL, 0}, + {N_("ssl client cert"), P_STRING, P_GLOBAL, &Globals.sslClientCert, NULL, NULL, 0}, + {N_("ssl client key"), P_STRING, P_GLOBAL, &Globals.sslClientPrivKey, NULL, NULL, 0}, + {N_("ssl require clientcert"), P_BOOL, P_GLOBAL, &Globals.sslReqClientCert, NULL, NULL, 0}, + {N_("ssl require servercert"), P_BOOL, P_GLOBAL, &Globals.sslReqServerCert, NULL, NULL, 0}, + {N_("ssl ciphers"), P_STRING, P_GLOBAL, &Globals.sslCiphers, NULL, NULL, 0}, + {N_("ssl version"), P_ENUM, P_GLOBAL, &Globals.sslVersion, NULL, enum_ssl_version, 0}, + {N_("ssl compatibility"), P_BOOL, P_GLOBAL, &Globals.sslCompatibility, NULL, NULL, 0}, #endif /* WITH_SSL */ - {"Logging Options", P_SEP, P_SEPARATOR}, - {"log level", P_INTEGER, P_GLOBAL, &DEBUGLEVEL_CLASS[DBGC_ALL], handle_debug_list, NULL, 0}, - {"debuglevel", P_INTEGER, P_GLOBAL, &DEBUGLEVEL_CLASS[DBGC_ALL], handle_debug_list, NULL, 0}, - {"syslog", P_INTEGER, P_GLOBAL, &Globals.syslog, NULL, NULL, 0}, - {"syslog only", P_BOOL, P_GLOBAL, &Globals.bSyslogOnly, NULL, NULL, 0}, - {"log file", P_STRING, P_GLOBAL, &Globals.szLogFile, NULL, NULL, 0}, + {N_("Logging Options"), P_SEP, P_SEPARATOR}, + {N_("log level"), P_INTEGER, P_GLOBAL, &DEBUGLEVEL_CLASS[DBGC_ALL], handle_debug_list, NULL, 0}, + {N_("debuglevel"), P_INTEGER, P_GLOBAL, &DEBUGLEVEL_CLASS[DBGC_ALL], handle_debug_list, NULL, 0}, + {N_("syslog"), P_INTEGER, P_GLOBAL, &Globals.syslog, NULL, NULL, 0}, + {N_("syslog only"), P_BOOL, P_GLOBAL, &Globals.bSyslogOnly, NULL, NULL, 0}, + {N_("log file"), P_STRING, P_GLOBAL, &Globals.szLogFile, NULL, NULL, 0}, - {"max log size", P_INTEGER, P_GLOBAL, &Globals.max_log_size, NULL, NULL, 0}, - {"timestamp logs", P_BOOL, P_GLOBAL, &Globals.bTimestampLogs, NULL, NULL, 0}, - {"debug timestamp", P_BOOL, P_GLOBAL, &Globals.bTimestampLogs, NULL, NULL, 0}, - {"debug hires timestamp", P_BOOL, P_GLOBAL, &Globals.bDebugHiresTimestamp, NULL, NULL, 0}, - {"debug pid", P_BOOL, P_GLOBAL, &Globals.bDebugPid, NULL, NULL, 0}, - {"debug uid", P_BOOL, P_GLOBAL, &Globals.bDebugUid, NULL, NULL, 0}, + {N_("max log size"), P_INTEGER, P_GLOBAL, &Globals.max_log_size, NULL, NULL, 0}, + {N_("timestamp logs"), P_BOOL, P_GLOBAL, &Globals.bTimestampLogs, NULL, NULL, 0}, + {N_("debug timestamp"), P_BOOL, P_GLOBAL, &Globals.bTimestampLogs, NULL, NULL, 0}, + {N_("debug hires timestamp"), P_BOOL, P_GLOBAL, &Globals.bDebugHiresTimestamp, NULL, NULL, 0}, + {N_("debug pid"), P_BOOL, P_GLOBAL, &Globals.bDebugPid, NULL, NULL, 0}, + {N_("debug uid"), P_BOOL, P_GLOBAL, &Globals.bDebugUid, NULL, NULL, 0}, - {"Protocol Options", P_SEP, P_SEPARATOR}, + {N_("Protocol Options"), P_SEP, P_SEPARATOR}, - {"protocol", P_ENUM, P_GLOBAL, &Globals.maxprotocol, NULL, enum_protocol, 0}, - {"large readwrite", P_BOOL, P_GLOBAL, &Globals.bLargeReadwrite, NULL, NULL, 0}, - {"max protocol", P_ENUM, P_GLOBAL, &Globals.maxprotocol, NULL, enum_protocol, 0}, - {"min protocol", P_ENUM, P_GLOBAL, &Globals.minprotocol, NULL, enum_protocol, 0}, - {"unicode", P_BOOL, P_GLOBAL, &Globals.bUnicode, NULL, NULL, 0}, - {"read bmpx", P_BOOL, P_GLOBAL, &Globals.bReadbmpx, NULL, NULL, 0}, - {"read raw", P_BOOL, P_GLOBAL, &Globals.bReadRaw, NULL, NULL, 0}, - {"write raw", P_BOOL, P_GLOBAL, &Globals.bWriteRaw, NULL, NULL, 0}, + {N_("protocol"), P_ENUM, P_GLOBAL, &Globals.maxprotocol, NULL, enum_protocol, 0}, + {N_("large readwrite"), P_BOOL, P_GLOBAL, &Globals.bLargeReadwrite, NULL, NULL, 0}, + {N_("max protocol"), P_ENUM, P_GLOBAL, &Globals.maxprotocol, NULL, enum_protocol, 0}, + {N_("min protocol"), P_ENUM, P_GLOBAL, &Globals.minprotocol, NULL, enum_protocol, 0}, + {N_("unicode"), P_BOOL, P_GLOBAL, &Globals.bUnicode, NULL, NULL, 0}, + {N_("read bmpx"), P_BOOL, P_GLOBAL, &Globals.bReadbmpx, NULL, NULL, 0}, + {N_("read raw"), P_BOOL, P_GLOBAL, &Globals.bReadRaw, NULL, NULL, 0}, + {N_("write raw"), P_BOOL, P_GLOBAL, &Globals.bWriteRaw, NULL, NULL, 0}, - {"nt pipe support", P_BOOL, P_GLOBAL, &Globals.bNTPipeSupport, NULL, NULL, 0}, - {"nt acl support", P_BOOL, P_GLOBAL, &Globals.bNTAclSupport, NULL, NULL, 0}, - {"announce version", P_STRING, P_GLOBAL, &Globals.szAnnounceVersion, NULL, NULL, 0}, - {"announce as", P_ENUM, P_GLOBAL, &Globals.announce_as, NULL, enum_announce_as, 0}, - {"max mux", P_INTEGER, P_GLOBAL, &Globals.max_mux, NULL, NULL, 0}, - {"max xmit", P_INTEGER, P_GLOBAL, &Globals.max_xmit, NULL, NULL, 0}, + {N_("nt pipe support"), P_BOOL, P_GLOBAL, &Globals.bNTPipeSupport, NULL, NULL, 0}, + {N_("nt acl support"), P_BOOL, P_GLOBAL, &Globals.bNTAclSupport, NULL, NULL, 0}, + {N_("announce version"), P_STRING, P_GLOBAL, &Globals.szAnnounceVersion, NULL, NULL, 0}, + {N_("announce as"), P_ENUM, P_GLOBAL, &Globals.announce_as, NULL, enum_announce_as, 0}, + {N_("max mux"), P_INTEGER, P_GLOBAL, &Globals.max_mux, NULL, NULL, 0}, + {N_("max xmit"), P_INTEGER, P_GLOBAL, &Globals.max_xmit, NULL, NULL, 0}, - {"name resolve order", P_STRING, P_GLOBAL, &Globals.szNameResolveOrder, NULL, NULL, 0}, - {"max packet", P_INTEGER, P_GLOBAL, &Globals.max_packet, NULL, NULL, 0}, - {"packet size", P_INTEGER, P_GLOBAL, &Globals.max_packet, NULL, NULL, 0}, - {"max ttl", P_INTEGER, P_GLOBAL, &Globals.max_ttl, NULL, NULL, 0}, - {"max wins ttl", P_INTEGER, P_GLOBAL, &Globals.max_wins_ttl, NULL, NULL, 0}, - {"min wins ttl", P_INTEGER, P_GLOBAL, &Globals.min_wins_ttl, NULL, NULL, 0}, - {"time server", P_BOOL, P_GLOBAL, &Globals.bTimeServer, NULL, NULL, 0}, - - {"Tuning Options", P_SEP, P_SEPARATOR}, + {N_("name resolve order"), P_STRING, P_GLOBAL, &Globals.szNameResolveOrder, NULL, NULL, 0}, + {N_("max packet"), P_INTEGER, P_GLOBAL, &Globals.max_packet, NULL, NULL, 0}, + {N_("packet size"), P_INTEGER, P_GLOBAL, &Globals.max_packet, NULL, NULL, 0}, + {N_("max ttl"), P_INTEGER, P_GLOBAL, &Globals.max_ttl, NULL, NULL, 0}, + {N_("max wins ttl"), P_INTEGER, P_GLOBAL, &Globals.max_wins_ttl, NULL, NULL, 0}, + {N_("min wins ttl"), P_INTEGER, P_GLOBAL, &Globals.min_wins_ttl, NULL, NULL, 0}, + {N_("time server"), P_BOOL, P_GLOBAL, &Globals.bTimeServer, NULL, NULL, 0}, + + {N_("Tuning Options"), P_SEP, P_SEPARATOR}, - {"change notify timeout", P_INTEGER, P_GLOBAL, &Globals.change_notify_timeout, NULL, NULL, 0}, - {"deadtime", P_INTEGER, P_GLOBAL, &Globals.deadtime, NULL, NULL, 0}, - {"getwd cache", P_BOOL, P_GLOBAL, &use_getwd_cache, NULL, NULL, 0}, - {"keepalive", P_INTEGER, P_GLOBAL, &keepalive, NULL, NULL, 0}, + {N_("change notify timeout"), P_INTEGER, P_GLOBAL, &Globals.change_notify_timeout, NULL, NULL, 0}, + {N_("deadtime"), P_INTEGER, P_GLOBAL, &Globals.deadtime, NULL, NULL, 0}, + {N_("getwd cache"), P_BOOL, P_GLOBAL, &use_getwd_cache, NULL, NULL, 0}, + {N_("keepalive"), P_INTEGER, P_GLOBAL, &keepalive, NULL, NULL, 0}, - {"lpq cache time", P_INTEGER, P_GLOBAL, &Globals.lpqcachetime, NULL, NULL, 0}, - {"max smbd processes", P_INTEGER, P_GLOBAL, &Globals.iMaxSmbdProcesses, NULL, NULL, 0}, - {"max connections", P_INTEGER, P_LOCAL, &sDefault.iMaxConnections, NULL, NULL, FLAG_SHARE}, - {"paranoid server security", P_BOOL, P_GLOBAL, &Globals.paranoid_server_security, NULL, NULL, 0}, - {"max disk size", P_INTEGER, P_GLOBAL, &Globals.maxdisksize, NULL, NULL, 0}, - {"max open files", P_INTEGER, P_GLOBAL, &Globals.max_open_files, NULL, NULL, 0}, - {"min print space", P_INTEGER, P_LOCAL, &sDefault.iMinPrintSpace, NULL, NULL, FLAG_PRINT}, - {"read size", P_INTEGER, P_GLOBAL, &Globals.ReadSize, NULL, NULL, 0}, + {N_("lpq cache time"), P_INTEGER, P_GLOBAL, &Globals.lpqcachetime, NULL, NULL, 0}, + {N_("max smbd processes"), P_INTEGER, P_GLOBAL, &Globals.iMaxSmbdProcesses, NULL, NULL, 0}, + {N_("max connections"), P_INTEGER, P_LOCAL, &sDefault.iMaxConnections, NULL, NULL, FLAG_SHARE}, + {N_("paranoid server security"), P_BOOL, P_GLOBAL, &Globals.paranoid_server_security, NULL, NULL, 0}, + {N_("max disk size"), P_INTEGER, P_GLOBAL, &Globals.maxdisksize, NULL, NULL, 0}, + {N_("max open files"), P_INTEGER, P_GLOBAL, &Globals.max_open_files, NULL, NULL, 0}, + {N_("min print space"), P_INTEGER, P_LOCAL, &sDefault.iMinPrintSpace, NULL, NULL, FLAG_PRINT}, + {N_("read size"), P_INTEGER, P_GLOBAL, &Globals.ReadSize, NULL, NULL, 0}, - {"socket options", P_GSTRING, P_GLOBAL, user_socket_options, NULL, NULL, 0}, - {"stat cache size", P_INTEGER, P_GLOBAL, &Globals.stat_cache_size, NULL, NULL, 0}, - {"strict allocate", P_BOOL, P_LOCAL, &sDefault.bStrictAllocate, NULL, NULL, FLAG_SHARE}, - {"strict sync", P_BOOL, P_LOCAL, &sDefault.bStrictSync, NULL, NULL, FLAG_SHARE}, - {"sync always", P_BOOL, P_LOCAL, &sDefault.bSyncAlways, NULL, NULL, FLAG_SHARE}, - {"use mmap", P_BOOL, P_GLOBAL, &Globals.bUseMmap, NULL, NULL, 0}, - {"hostname lookups", P_BOOL, P_GLOBAL, &Globals.bHostnameLookups, NULL, NULL, 0}, - {"write cache size", P_INTEGER, P_LOCAL, &sDefault.iWriteCacheSize, NULL, NULL, FLAG_SHARE}, - - {"Printing Options", P_SEP, P_SEPARATOR}, + {N_("socket options"), P_GSTRING, P_GLOBAL, user_socket_options, NULL, NULL, 0}, + {N_("stat cache size"), P_INTEGER, P_GLOBAL, &Globals.stat_cache_size, NULL, NULL, 0}, + {N_("strict allocate"), P_BOOL, P_LOCAL, &sDefault.bStrictAllocate, NULL, NULL, FLAG_SHARE}, + {N_("strict sync"), P_BOOL, P_LOCAL, &sDefault.bStrictSync, NULL, NULL, FLAG_SHARE}, + {N_("sync always"), P_BOOL, P_LOCAL, &sDefault.bSyncAlways, NULL, NULL, FLAG_SHARE}, + {N_("use mmap"), P_BOOL, P_GLOBAL, &Globals.bUseMmap, NULL, NULL, 0}, + {N_("hostname lookups"), P_BOOL, P_GLOBAL, &Globals.bHostnameLookups, NULL, NULL, 0}, + {N_("write cache size"), P_INTEGER, P_LOCAL, &sDefault.iWriteCacheSize, NULL, NULL, FLAG_SHARE}, + + {N_("Printing Options"), P_SEP, P_SEPARATOR}, - {"total print jobs", P_INTEGER, P_GLOBAL, &Globals.iTotalPrintJobs, NULL, NULL, FLAG_PRINT}, - {"max print jobs", P_INTEGER, P_LOCAL, &sDefault.iMaxPrintJobs, NULL, NULL, FLAG_PRINT}, - {"load printers", P_BOOL, P_GLOBAL, &Globals.bLoadPrinters, NULL, NULL, FLAG_PRINT}, - {"printcap name", P_STRING, P_GLOBAL, &Globals.szPrintcapname, NULL, NULL, FLAG_PRINT}, - {"printcap", P_STRING, P_GLOBAL, &Globals.szPrintcapname, NULL, NULL, 0}, - {"printable", P_BOOL, P_LOCAL, &sDefault.bPrint_ok, NULL, NULL, FLAG_PRINT}, - {"print ok", P_BOOL, P_LOCAL, &sDefault.bPrint_ok, NULL, NULL, 0}, - {"postscript", P_BOOL, P_LOCAL, &sDefault.bPostscript, NULL, NULL, FLAG_PRINT}, - {"printing", P_ENUM, P_LOCAL, &sDefault.iPrinting, NULL, enum_printing, FLAG_PRINT | FLAG_GLOBAL}, - {"print command", P_STRING, P_LOCAL, &sDefault.szPrintcommand, NULL, NULL, FLAG_PRINT | FLAG_GLOBAL}, - {"disable spoolss", P_BOOL, P_GLOBAL, &Globals.bDisableSpoolss, NULL, NULL, FLAG_PRINT | FLAG_GLOBAL}, - {"lpq command", P_STRING, P_LOCAL, &sDefault.szLpqcommand, NULL, NULL, FLAG_PRINT | FLAG_GLOBAL}, - {"lprm command", P_STRING, P_LOCAL, &sDefault.szLprmcommand, NULL, NULL, FLAG_PRINT | FLAG_GLOBAL}, - {"lppause command", P_STRING, P_LOCAL, &sDefault.szLppausecommand, NULL, NULL, FLAG_PRINT | FLAG_GLOBAL}, - {"lpresume command", P_STRING, P_LOCAL, &sDefault.szLpresumecommand, NULL, NULL, FLAG_PRINT | FLAG_GLOBAL}, - {"queuepause command", P_STRING, P_LOCAL, &sDefault.szQueuepausecommand, NULL, NULL, FLAG_PRINT | FLAG_GLOBAL}, - {"queueresume command", P_STRING, P_LOCAL, &sDefault.szQueueresumecommand, NULL, NULL, FLAG_PRINT | FLAG_GLOBAL}, - - {"enumports command", P_STRING, P_GLOBAL, &Globals.szEnumPortsCommand, NULL, NULL, 0}, - {"addprinter command", P_STRING, P_GLOBAL, &Globals.szAddPrinterCommand, NULL, NULL, 0}, - {"deleteprinter command", P_STRING, P_GLOBAL, &Globals.szDeletePrinterCommand, NULL, NULL, 0}, - {"show add printer wizard", P_BOOL, P_GLOBAL, &Globals.bMsAddPrinterWizard, NULL, NULL, 0}, - {"os2 driver map", P_STRING, P_GLOBAL, &Globals.szOs2DriverMap, NULL, NULL, 0}, + {N_("total print jobs"), P_INTEGER, P_GLOBAL, &Globals.iTotalPrintJobs, NULL, NULL, FLAG_PRINT}, + {N_("max print jobs"), P_INTEGER, P_LOCAL, &sDefault.iMaxPrintJobs, NULL, NULL, FLAG_PRINT}, + {N_("load printers"), P_BOOL, P_GLOBAL, &Globals.bLoadPrinters, NULL, NULL, FLAG_PRINT}, + {N_("printcap name"), P_STRING, P_GLOBAL, &Globals.szPrintcapname, NULL, NULL, FLAG_PRINT}, + {N_("printcap"), P_STRING, P_GLOBAL, &Globals.szPrintcapname, NULL, NULL, 0}, + {N_("printable"), P_BOOL, P_LOCAL, &sDefault.bPrint_ok, NULL, NULL, FLAG_PRINT}, + {N_("print ok"), P_BOOL, P_LOCAL, &sDefault.bPrint_ok, NULL, NULL, 0}, + {N_("postscript"), P_BOOL, P_LOCAL, &sDefault.bPostscript, NULL, NULL, FLAG_PRINT}, + {N_("printing"), P_ENUM, P_LOCAL, &sDefault.iPrinting, NULL, enum_printing, FLAG_PRINT | FLAG_GLOBAL}, + {N_("print command"), P_STRING, P_LOCAL, &sDefault.szPrintcommand, NULL, NULL, FLAG_PRINT | FLAG_GLOBAL}, + {N_("disable spoolss"), P_BOOL, P_GLOBAL, &Globals.bDisableSpoolss, NULL, NULL, FLAG_PRINT | FLAG_GLOBAL}, + {N_("lpq command"), P_STRING, P_LOCAL, &sDefault.szLpqcommand, NULL, NULL, FLAG_PRINT | FLAG_GLOBAL}, + {N_("lprm command"), P_STRING, P_LOCAL, &sDefault.szLprmcommand, NULL, NULL, FLAG_PRINT | FLAG_GLOBAL}, + {N_("lppause command"), P_STRING, P_LOCAL, &sDefault.szLppausecommand, NULL, NULL, FLAG_PRINT | FLAG_GLOBAL}, + {N_("lpresume command"), P_STRING, P_LOCAL, &sDefault.szLpresumecommand, NULL, NULL, FLAG_PRINT | FLAG_GLOBAL}, + {N_("queuepause command"), P_STRING, P_LOCAL, &sDefault.szQueuepausecommand, NULL, NULL, FLAG_PRINT | FLAG_GLOBAL}, + {N_("queueresume command"), P_STRING, P_LOCAL, &sDefault.szQueueresumecommand, NULL, NULL, FLAG_PRINT | FLAG_GLOBAL}, + + {N_("enumports command"), P_STRING, P_GLOBAL, &Globals.szEnumPortsCommand, NULL, NULL, 0}, + {N_("addprinter command"), P_STRING, P_GLOBAL, &Globals.szAddPrinterCommand, NULL, NULL, 0}, + {N_("deleteprinter command"), P_STRING, P_GLOBAL, &Globals.szDeletePrinterCommand, NULL, NULL, 0}, + {N_("show add printer wizard"), P_BOOL, P_GLOBAL, &Globals.bMsAddPrinterWizard, NULL, NULL, 0}, + {N_("os2 driver map"), P_STRING, P_GLOBAL, &Globals.szOs2DriverMap, NULL, NULL, 0}, - {"printer name", P_STRING, P_LOCAL, &sDefault.szPrintername, NULL, NULL, FLAG_PRINT}, - {"printer", P_STRING, P_LOCAL, &sDefault.szPrintername, NULL, NULL, 0}, - {"use client driver", P_BOOL, P_LOCAL, &sDefault.bUseClientDriver, NULL, NULL, FLAG_PRINT}, - {"printer driver", P_STRING, P_LOCAL, &sDefault.szPrinterDriver, NULL, NULL, FLAG_PRINT}, - {"printer driver file", P_STRING, P_LOCAL, &sDefault.szDriverFile, NULL, NULL, FLAG_PRINT}, - {"printer driver location", P_STRING, P_LOCAL, &sDefault.szPrinterDriverLocation, NULL, NULL, FLAG_PRINT | FLAG_GLOBAL}, - - {"Filename Handling", P_SEP, P_SEPARATOR}, - {"strip dot", P_BOOL, P_GLOBAL, &Globals.bStripDot, NULL, NULL, 0}, + {N_("printer name"), P_STRING, P_LOCAL, &sDefault.szPrintername, NULL, NULL, FLAG_PRINT}, + {N_("printer"), P_STRING, P_LOCAL, &sDefault.szPrintername, NULL, NULL, 0}, + {N_("use client driver"), P_BOOL, P_LOCAL, &sDefault.bUseClientDriver, NULL, NULL, FLAG_PRINT}, + {N_("printer driver"), P_STRING, P_LOCAL, &sDefault.szPrinterDriver, NULL, NULL, FLAG_PRINT}, + {N_("printer driver file"), P_STRING, P_LOCAL, &sDefault.szDriverFile, NULL, NULL, FLAG_PRINT}, + {N_("printer driver location"), P_STRING, P_LOCAL, &sDefault.szPrinterDriverLocation, NULL, NULL, FLAG_PRINT | FLAG_GLOBAL}, + + {N_("Filename Handling"), P_SEP, P_SEPARATOR}, + {N_("strip dot"), P_BOOL, P_GLOBAL, &Globals.bStripDot, NULL, NULL, 0}, - {"mangled stack", P_INTEGER, P_GLOBAL, &Globals.mangled_stack, NULL, NULL, 0}, - {"default case", P_ENUM, P_LOCAL, &sDefault.iDefaultCase, NULL, enum_case, FLAG_SHARE}, - {"case sensitive", P_BOOL, P_LOCAL, &sDefault.bCaseSensitive, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, - {"casesignames", P_BOOL, P_LOCAL, &sDefault.bCaseSensitive, NULL, NULL, 0}, - {"preserve case", P_BOOL, P_LOCAL, &sDefault.bCasePreserve, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, - {"short preserve case", P_BOOL, P_LOCAL, &sDefault.bShortCasePreserve, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, - {"mangle case", P_BOOL, P_LOCAL, &sDefault.bCaseMangle, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, - {"mangling char", P_CHAR, P_LOCAL, &sDefault.magic_char, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, - {"hide dot files", P_BOOL, P_LOCAL, &sDefault.bHideDotFiles, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, - {"hide unreadable", P_BOOL, P_LOCAL, &sDefault.bHideUnReadable, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, - {"delete veto files", P_BOOL, P_LOCAL, &sDefault.bDeleteVetoFiles, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, - {"veto files", P_STRING, P_LOCAL, &sDefault.szVetoFiles, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL }, - {"hide files", P_STRING, P_LOCAL, &sDefault.szHideFiles, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL }, - {"veto oplock files", P_STRING, P_LOCAL, &sDefault.szVetoOplockFiles, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL }, - {"map system", P_BOOL, P_LOCAL, &sDefault.bMap_system, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, - {"map hidden", P_BOOL, P_LOCAL, &sDefault.bMap_hidden, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, - {"map archive", P_BOOL, P_LOCAL, &sDefault.bMap_archive, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, - {"mangled names", P_BOOL, P_LOCAL, &sDefault.bMangledNames, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, - {"mangled map", P_STRING, P_LOCAL, &sDefault.szMangledMap, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, - {"stat cache", P_BOOL, P_GLOBAL, &Globals.bStatCache, NULL, NULL, 0}, - - {"Domain Options", P_SEP, P_SEPARATOR}, + {N_("mangled stack"), P_INTEGER, P_GLOBAL, &Globals.mangled_stack, NULL, NULL, 0}, + {N_("default case"), P_ENUM, P_LOCAL, &sDefault.iDefaultCase, NULL, enum_case, FLAG_SHARE}, + {N_("case sensitive"), P_BOOL, P_LOCAL, &sDefault.bCaseSensitive, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, + {N_("casesignames"), P_BOOL, P_LOCAL, &sDefault.bCaseSensitive, NULL, NULL, 0}, + {N_("preserve case"), P_BOOL, P_LOCAL, &sDefault.bCasePreserve, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, + {N_("short preserve case"), P_BOOL, P_LOCAL, &sDefault.bShortCasePreserve, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, + {N_("mangle case"), P_BOOL, P_LOCAL, &sDefault.bCaseMangle, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, + {N_("mangling char"), P_CHAR, P_LOCAL, &sDefault.magic_char, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, + {N_("hide dot files"), P_BOOL, P_LOCAL, &sDefault.bHideDotFiles, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, + {N_("hide unreadable"), P_BOOL, P_LOCAL, &sDefault.bHideUnReadable, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, + {N_("delete veto files"), P_BOOL, P_LOCAL, &sDefault.bDeleteVetoFiles, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, + {N_("veto files"), P_STRING, P_LOCAL, &sDefault.szVetoFiles, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL }, + {N_("hide files"), P_STRING, P_LOCAL, &sDefault.szHideFiles, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL }, + {N_("veto oplock files"), P_STRING, P_LOCAL, &sDefault.szVetoOplockFiles, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL }, + {N_("map system"), P_BOOL, P_LOCAL, &sDefault.bMap_system, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, + {N_("map hidden"), P_BOOL, P_LOCAL, &sDefault.bMap_hidden, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, + {N_("map archive"), P_BOOL, P_LOCAL, &sDefault.bMap_archive, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, + {N_("mangled names"), P_BOOL, P_LOCAL, &sDefault.bMangledNames, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, + {N_("mangled map"), P_STRING, P_LOCAL, &sDefault.szMangledMap, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, + {N_("stat cache"), P_BOOL, P_GLOBAL, &Globals.bStatCache, NULL, NULL, 0}, + + {N_("Domain Options"), P_SEP, P_SEPARATOR}, - {"domain admin group", P_LIST, P_GLOBAL, &Globals.szDomainAdminGroup, NULL, NULL, 0}, - {"domain guest group", P_LIST, P_GLOBAL, &Globals.szDomainGuestGroup, NULL, NULL, 0}, + {N_("domain admin group"), P_LIST, P_GLOBAL, &Globals.szDomainAdminGroup, NULL, NULL, 0}, + {N_("domain guest group"), P_LIST, P_GLOBAL, &Globals.szDomainGuestGroup, NULL, NULL, 0}, #ifdef USING_GROUPNAME_MAP - {"groupname map", P_STRING, P_GLOBAL, &Globals.szGroupnameMap, NULL, NULL, 0}, + {N_("groupname map"), P_STRING, P_GLOBAL, &Globals.szGroupnameMap, NULL, NULL, 0}, #endif /* USING_GROUPNAME_MAP */ - {"machine password timeout", P_INTEGER, P_GLOBAL, &Globals.machine_password_timeout, NULL, NULL, 0}, + {N_("machine password timeout"), P_INTEGER, P_GLOBAL, &Globals.machine_password_timeout, NULL, NULL, 0}, - {"Logon Options", P_SEP, P_SEPARATOR}, + {N_("Logon Options"), P_SEP, P_SEPARATOR}, - {"add user script", P_STRING, P_GLOBAL, &Globals.szAddUserScript, NULL, NULL, 0}, - {"delete user script", P_STRING, P_GLOBAL, &Globals.szDelUserScript, NULL, NULL, 0}, - {"add group script", P_STRING, P_GLOBAL, &Globals.szAddGroupScript, NULL, NULL, 0}, - {"delete group script", P_STRING, P_GLOBAL, &Globals.szDelGroupScript, NULL, NULL, 0}, - {"add user to group script", P_STRING, P_GLOBAL, &Globals.szAddUserToGroupScript, NULL, NULL, 0}, - {"delete user from group script", P_STRING, P_GLOBAL, &Globals.szDelUserToGroupScript, NULL, NULL, 0}, - {"add machine script", P_STRING, P_GLOBAL, &Globals.szAddMachineScript, NULL, NULL, 0}, - {"shutdown script", P_STRING, P_GLOBAL, &Globals.szShutdownScript, NULL, NULL, 0}, - {"abort shutdown script", P_STRING, P_GLOBAL, &Globals.szAbortShutdownScript, NULL, NULL, 0}, - - {"logon script", P_STRING, P_GLOBAL, &Globals.szLogonScript, NULL, NULL, 0}, - {"logon path", P_STRING, P_GLOBAL, &Globals.szLogonPath, NULL, NULL, 0}, - {"logon drive", P_STRING, P_GLOBAL, &Globals.szLogonDrive, NULL, NULL, 0}, - {"logon home", P_STRING, P_GLOBAL, &Globals.szLogonHome, NULL, NULL, 0}, - {"domain logons", P_BOOL, P_GLOBAL, &Globals.bDomainLogons, NULL, NULL, 0}, - - {"Browse Options", P_SEP, P_SEPARATOR}, + {N_("add user script"), P_STRING, P_GLOBAL, &Globals.szAddUserScript, NULL, NULL, 0}, + {N_("delete user script"), P_STRING, P_GLOBAL, &Globals.szDelUserScript, NULL, NULL, 0}, + {N_("add group script"), P_STRING, P_GLOBAL, &Globals.szAddGroupScript, NULL, NULL, 0}, + {N_("delete group script"), P_STRING, P_GLOBAL, &Globals.szDelGroupScript, NULL, NULL, 0}, + {N_("add user to group script"), P_STRING, P_GLOBAL, &Globals.szAddUserToGroupScript, NULL, NULL, 0}, + {N_("delete user from group script"), P_STRING, P_GLOBAL, &Globals.szDelUserToGroupScript, NULL, NULL, 0}, + {N_("add machine script"), P_STRING, P_GLOBAL, &Globals.szAddMachineScript, NULL, NULL, 0}, + {N_("shutdown script"), P_STRING, P_GLOBAL, &Globals.szShutdownScript, NULL, NULL, 0}, + {N_("abort shutdown script"), P_STRING, P_GLOBAL, &Globals.szAbortShutdownScript, NULL, NULL, 0}, + + {N_("logon script"), P_STRING, P_GLOBAL, &Globals.szLogonScript, NULL, NULL, 0}, + {N_("logon path"), P_STRING, P_GLOBAL, &Globals.szLogonPath, NULL, NULL, 0}, + {N_("logon drive"), P_STRING, P_GLOBAL, &Globals.szLogonDrive, NULL, NULL, 0}, + {N_("logon home"), P_STRING, P_GLOBAL, &Globals.szLogonHome, NULL, NULL, 0}, + {N_("domain logons"), P_BOOL, P_GLOBAL, &Globals.bDomainLogons, NULL, NULL, 0}, + + {N_("Browse Options"), P_SEP, P_SEPARATOR}, - {"os level", P_INTEGER, P_GLOBAL, &Globals.os_level, NULL, NULL, FLAG_BASIC}, - {"lm announce", P_ENUM, P_GLOBAL, &Globals.lm_announce, NULL, enum_bool_auto, 0}, - {"lm interval", P_INTEGER, P_GLOBAL, &Globals.lm_interval, NULL, NULL, 0}, - {"preferred master", P_ENUM, P_GLOBAL, &Globals.bPreferredMaster, NULL, enum_bool_auto, FLAG_BASIC}, - {"prefered master", P_ENUM, P_GLOBAL, &Globals.bPreferredMaster, NULL, enum_bool_auto, FLAG_HIDE}, - {"local master", P_BOOL, P_GLOBAL, &Globals.bLocalMaster, NULL, NULL, FLAG_BASIC}, - {"domain master", P_ENUM, P_GLOBAL, &Globals.bDomainMaster, NULL, enum_bool_auto, FLAG_BASIC}, - {"browse list", P_BOOL, P_GLOBAL, &Globals.bBrowseList, NULL, NULL, 0}, - {"browseable", P_BOOL, P_LOCAL, &sDefault.bBrowseable, NULL, NULL, FLAG_BASIC | FLAG_SHARE | FLAG_PRINT}, - {"browsable", P_BOOL, P_LOCAL, &sDefault.bBrowseable, NULL, NULL, 0}, - {"enhanced browsing", P_BOOL, P_GLOBAL, &Globals.enhanced_browsing, NULL, NULL}, - - {"WINS Options", P_SEP, P_SEPARATOR}, - {"dns proxy", P_BOOL, P_GLOBAL, &Globals.bDNSproxy, NULL, NULL, 0}, - {"wins proxy", P_BOOL, P_GLOBAL, &Globals.bWINSproxy, NULL, NULL, 0}, + {N_("os level"), P_INTEGER, P_GLOBAL, &Globals.os_level, NULL, NULL, FLAG_BASIC}, + {N_("lm announce"), P_ENUM, P_GLOBAL, &Globals.lm_announce, NULL, enum_bool_auto, 0}, + {N_("lm interval"), P_INTEGER, P_GLOBAL, &Globals.lm_interval, NULL, NULL, 0}, + {N_("preferred master"), P_ENUM, P_GLOBAL, &Globals.bPreferredMaster, NULL, enum_bool_auto, FLAG_BASIC}, + {N_("prefered master"), P_ENUM, P_GLOBAL, &Globals.bPreferredMaster, NULL, enum_bool_auto, FLAG_HIDE}, + {N_("local master"), P_BOOL, P_GLOBAL, &Globals.bLocalMaster, NULL, NULL, FLAG_BASIC}, + {N_("domain master"), P_ENUM, P_GLOBAL, &Globals.bDomainMaster, NULL, enum_bool_auto, FLAG_BASIC}, + {N_("browse list"), P_BOOL, P_GLOBAL, &Globals.bBrowseList, NULL, NULL, 0}, + {N_("browseable"), P_BOOL, P_LOCAL, &sDefault.bBrowseable, NULL, NULL, FLAG_BASIC | FLAG_SHARE | FLAG_PRINT}, + {N_("browsable"), P_BOOL, P_LOCAL, &sDefault.bBrowseable, NULL, NULL, 0}, + {N_("enhanced browsing"), P_BOOL, P_GLOBAL, &Globals.enhanced_browsing, NULL, NULL}, + + {N_("WINS Options"), P_SEP, P_SEPARATOR}, + {N_("dns proxy"), P_BOOL, P_GLOBAL, &Globals.bDNSproxy, NULL, NULL, 0}, + {N_("wins proxy"), P_BOOL, P_GLOBAL, &Globals.bWINSproxy, NULL, NULL, 0}, - {"wins server", P_STRING, P_GLOBAL, &Globals.szWINSserver, handle_wins_server_list, NULL, FLAG_BASIC}, - {"wins support", P_BOOL, P_GLOBAL, &Globals.bWINSsupport, NULL, NULL, FLAG_BASIC}, - {"wins hook", P_STRING, P_GLOBAL, &Globals.szWINSHook, NULL, NULL, 0}, + {N_("wins server"), P_STRING, P_GLOBAL, &Globals.szWINSserver, handle_wins_server_list, NULL, FLAG_BASIC}, + {N_("wins support"), P_BOOL, P_GLOBAL, &Globals.bWINSsupport, NULL, NULL, FLAG_BASIC}, + {N_("wins hook"), P_STRING, P_GLOBAL, &Globals.szWINSHook, NULL, NULL, 0}, - {"Locking Options", P_SEP, P_SEPARATOR}, + {N_("Locking Options"), P_SEP, P_SEPARATOR}, - {"blocking locks", P_BOOL, P_LOCAL, &sDefault.bBlockingLocks, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, - {"fake oplocks", P_BOOL, P_LOCAL, &sDefault.bFakeOplocks, NULL, NULL, FLAG_SHARE}, - {"kernel oplocks", P_BOOL, P_GLOBAL, &Globals.bKernelOplocks, NULL, NULL, FLAG_GLOBAL}, - {"locking", P_BOOL, P_LOCAL, &sDefault.bLocking, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, + {N_("blocking locks"), P_BOOL, P_LOCAL, &sDefault.bBlockingLocks, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, + {N_("fake oplocks"), P_BOOL, P_LOCAL, &sDefault.bFakeOplocks, NULL, NULL, FLAG_SHARE}, + {N_("kernel oplocks"), P_BOOL, P_GLOBAL, &Globals.bKernelOplocks, NULL, NULL, FLAG_GLOBAL}, + {N_("locking"), P_BOOL, P_LOCAL, &sDefault.bLocking, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, - {"oplocks", P_BOOL, P_LOCAL, &sDefault.bOpLocks, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, - {"level2 oplocks", P_BOOL, P_LOCAL, &sDefault.bLevel2OpLocks, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, - {"oplock break wait time", P_INTEGER, P_GLOBAL, &Globals.oplock_break_wait_time, NULL, NULL, FLAG_GLOBAL}, - {"oplock contention limit", P_INTEGER, P_LOCAL, &sDefault.iOplockContentionLimit, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, - {"posix locking", P_BOOL, P_LOCAL, &sDefault.bPosixLocking, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, - {"strict locking", P_BOOL, P_LOCAL, &sDefault.bStrictLocking, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, - {"share modes", P_BOOL, P_LOCAL, &sDefault.bShareModes, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, + {N_("oplocks"), P_BOOL, P_LOCAL, &sDefault.bOpLocks, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, + {N_("level2 oplocks"), P_BOOL, P_LOCAL, &sDefault.bLevel2OpLocks, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, + {N_("oplock break wait time"), P_INTEGER, P_GLOBAL, &Globals.oplock_break_wait_time, NULL, NULL, FLAG_GLOBAL}, + {N_("oplock contention limit"), P_INTEGER, P_LOCAL, &sDefault.iOplockContentionLimit, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, + {N_("posix locking"), P_BOOL, P_LOCAL, &sDefault.bPosixLocking, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, + {N_("strict locking"), P_BOOL, P_LOCAL, &sDefault.bStrictLocking, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, + {N_("share modes"), P_BOOL, P_LOCAL, &sDefault.bShareModes, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, #ifdef WITH_LDAP - {"Ldap Options", P_SEP, P_SEPARATOR}, + {N_("Ldap Options"), P_SEP, P_SEPARATOR}, - {"ldap server", P_STRING, P_GLOBAL, &Globals.szLdapServer, NULL, NULL, 0}, - {"ldap port", P_INTEGER, P_GLOBAL, &Globals.ldap_port, NULL, NULL, 0}, - {"ldap suffix", P_STRING, P_GLOBAL, &Globals.szLdapSuffix, NULL, NULL, 0}, - {"ldap filter", P_STRING, P_GLOBAL, &Globals.szLdapFilter, NULL, NULL, 0}, - {"ldap root", P_STRING, P_GLOBAL, &Globals.szLdapRoot, NULL, NULL, 0}, - {"ldap root passwd", P_STRING, P_GLOBAL, &Globals.szLdapRootPassword, NULL, NULL, 0}, + {N_("ldap server"), P_STRING, P_GLOBAL, &Globals.szLdapServer, NULL, NULL, 0}, + {N_("ldap port"), P_INTEGER, P_GLOBAL, &Globals.ldap_port, NULL, NULL, 0}, + {N_("ldap suffix"), P_STRING, P_GLOBAL, &Globals.szLdapSuffix, NULL, NULL, 0}, + {N_("ldap filter"), P_STRING, P_GLOBAL, &Globals.szLdapFilter, NULL, NULL, 0}, + {N_("ldap root"), P_STRING, P_GLOBAL, &Globals.szLdapRoot, NULL, NULL, 0}, + {N_("ldap root passwd"), P_STRING, P_GLOBAL, &Globals.szLdapRootPassword, NULL, NULL, 0}, #endif /* WITH_LDAP */ - {"Miscellaneous Options", P_SEP, P_SEPARATOR}, - {"add share command", P_STRING, P_GLOBAL, &Globals.szAddShareCommand, NULL, NULL, 0}, - {"change share command", P_STRING, P_GLOBAL, &Globals.szChangeShareCommand, NULL, NULL, 0}, - {"delete share command", P_STRING, P_GLOBAL, &Globals.szDeleteShareCommand, NULL, NULL, 0}, + {N_("Miscellaneous Options"), P_SEP, P_SEPARATOR}, + {N_("add share command"), P_STRING, P_GLOBAL, &Globals.szAddShareCommand, NULL, NULL, 0}, + {N_("change share command"), P_STRING, P_GLOBAL, &Globals.szChangeShareCommand, NULL, NULL, 0}, + {N_("delete share command"), P_STRING, P_GLOBAL, &Globals.szDeleteShareCommand, NULL, NULL, 0}, - {"config file", P_STRING, P_GLOBAL, &Globals.szConfigFile, NULL, NULL, FLAG_HIDE}, - {"preload", P_STRING, P_GLOBAL, &Globals.szAutoServices, NULL, NULL, 0}, - {"auto services", P_STRING, P_GLOBAL, &Globals.szAutoServices, NULL, NULL, 0}, - {"lock dir", P_STRING, P_GLOBAL, &Globals.szLockDir, NULL, NULL, 0}, - {"lock directory", P_STRING, P_GLOBAL, &Globals.szLockDir, NULL, NULL, 0}, + {N_("config file"), P_STRING, P_GLOBAL, &Globals.szConfigFile, NULL, NULL, FLAG_HIDE}, + {N_("preload"), P_STRING, P_GLOBAL, &Globals.szAutoServices, NULL, NULL, 0}, + {N_("auto services"), P_STRING, P_GLOBAL, &Globals.szAutoServices, NULL, NULL, 0}, + {N_("lock dir"), P_STRING, P_GLOBAL, &Globals.szLockDir, NULL, NULL, 0}, + {N_("lock directory"), P_STRING, P_GLOBAL, &Globals.szLockDir, NULL, NULL, 0}, #ifdef WITH_UTMP - {"utmp directory", P_STRING, P_GLOBAL, &Globals.szUtmpDir, NULL, NULL, 0}, - {"wtmp directory", P_STRING, P_GLOBAL, &Globals.szWtmpDir, NULL, NULL, 0}, - {"utmp", P_BOOL, P_GLOBAL, &Globals.bUtmp, NULL, NULL, 0}, + {N_("utmp directory"), P_STRING, P_GLOBAL, &Globals.szUtmpDir, NULL, NULL, 0}, + {N_("wtmp directory"), P_STRING, P_GLOBAL, &Globals.szWtmpDir, NULL, NULL, 0}, + {N_("utmp"), P_BOOL, P_GLOBAL, &Globals.bUtmp, NULL, NULL, 0}, #endif - {"default service", P_STRING, P_GLOBAL, &Globals.szDefaultService, NULL, NULL, 0}, - {"default", P_STRING, P_GLOBAL, &Globals.szDefaultService, NULL, NULL, 0}, - {"message command", P_STRING, P_GLOBAL, &Globals.szMsgCommand, NULL, NULL, 0}, - {"dfree command", P_STRING, P_GLOBAL, &Globals.szDfree, NULL, NULL, 0}, - {"remote announce", P_STRING, P_GLOBAL, &Globals.szRemoteAnnounce, NULL, NULL, 0}, - {"remote browse sync", P_STRING, P_GLOBAL, &Globals.szRemoteBrowseSync, NULL, NULL, 0}, - {"socket address", P_STRING, P_GLOBAL, &Globals.szSocketAddress, NULL, NULL, 0}, - {"homedir map", P_STRING, P_GLOBAL, &Globals.szNISHomeMapName, NULL, NULL, 0}, - {"time offset", P_INTEGER, P_GLOBAL, &extra_time_offset, NULL, NULL, 0}, - {"NIS homedir", P_BOOL, P_GLOBAL, &Globals.bNISHomeMap, NULL, NULL, 0}, - {"-valid", P_BOOL, P_LOCAL, &sDefault.valid, NULL, NULL, FLAG_HIDE}, + {N_("default service"), P_STRING, P_GLOBAL, &Globals.szDefaultService, NULL, NULL, 0}, + {N_("default"), P_STRING, P_GLOBAL, &Globals.szDefaultService, NULL, NULL, 0}, + {N_("message command"), P_STRING, P_GLOBAL, &Globals.szMsgCommand, NULL, NULL, 0}, + {N_("dfree command"), P_STRING, P_GLOBAL, &Globals.szDfree, NULL, NULL, 0}, + {N_("remote announce"), P_STRING, P_GLOBAL, &Globals.szRemoteAnnounce, NULL, NULL, 0}, + {N_("remote browse sync"), P_STRING, P_GLOBAL, &Globals.szRemoteBrowseSync, NULL, NULL, 0}, + {N_("socket address"), P_STRING, P_GLOBAL, &Globals.szSocketAddress, NULL, NULL, 0}, + {N_("homedir map"), P_STRING, P_GLOBAL, &Globals.szNISHomeMapName, NULL, NULL, 0}, + {N_("time offset"), P_INTEGER, P_GLOBAL, &extra_time_offset, NULL, NULL, 0}, + {N_("NIS homedir"), P_BOOL, P_GLOBAL, &Globals.bNISHomeMap, NULL, NULL, 0}, + {N_("-valid"), P_BOOL, P_LOCAL, &sDefault.valid, NULL, NULL, FLAG_HIDE}, - {"copy", P_STRING, P_LOCAL, &sDefault.szCopy, handle_copy, NULL, FLAG_HIDE}, - {"include", P_STRING, P_LOCAL, &sDefault.szInclude, handle_include, NULL, FLAG_HIDE}, - {"exec", P_STRING, P_LOCAL, &sDefault.szPreExec, NULL, NULL, FLAG_SHARE | FLAG_PRINT}, - {"preexec", P_STRING, P_LOCAL, &sDefault.szPreExec, NULL, NULL, 0}, + {N_("copy"), P_STRING, P_LOCAL, &sDefault.szCopy, handle_copy, NULL, FLAG_HIDE}, + {N_("include"), P_STRING, P_LOCAL, &sDefault.szInclude, handle_include, NULL, FLAG_HIDE}, + {N_("exec"), P_STRING, P_LOCAL, &sDefault.szPreExec, NULL, NULL, FLAG_SHARE | FLAG_PRINT}, + {N_("preexec"), P_STRING, P_LOCAL, &sDefault.szPreExec, NULL, NULL, 0}, - {"preexec close", P_BOOL, P_LOCAL, &sDefault.bPreexecClose, NULL, NULL, FLAG_SHARE}, - {"postexec", P_STRING, P_LOCAL, &sDefault.szPostExec, NULL, NULL, FLAG_SHARE | FLAG_PRINT}, - {"root preexec", P_STRING, P_LOCAL, &sDefault.szRootPreExec, NULL, NULL, FLAG_SHARE | FLAG_PRINT}, - {"root preexec close", P_BOOL, P_LOCAL, &sDefault.bRootpreexecClose, NULL, NULL, FLAG_SHARE}, - {"root postexec", P_STRING, P_LOCAL, &sDefault.szRootPostExec, NULL, NULL, FLAG_SHARE | FLAG_PRINT}, - {"available", P_BOOL, P_LOCAL, &sDefault.bAvailable, NULL, NULL, FLAG_BASIC | FLAG_SHARE | FLAG_PRINT}, - {"volume", P_STRING, P_LOCAL, &sDefault.volume, NULL, NULL, FLAG_SHARE }, - {"fstype", P_STRING, P_LOCAL, &sDefault.fstype, NULL, NULL, FLAG_SHARE}, - {"set directory", P_BOOLREV, P_LOCAL, &sDefault.bNo_set_dir, NULL, NULL, FLAG_SHARE}, - {"source environment", P_STRING, P_GLOBAL, &Globals.szSourceEnv, handle_source_env, NULL, 0}, - {"wide links", P_BOOL, P_LOCAL, &sDefault.bWidelinks, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, - {"follow symlinks", P_BOOL, P_LOCAL, &sDefault.bSymlinks, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, - {"dont descend", P_STRING, P_LOCAL, &sDefault.szDontdescend, NULL, NULL, FLAG_SHARE}, - {"magic script", P_STRING, P_LOCAL, &sDefault.szMagicScript, NULL, NULL, FLAG_SHARE}, - {"magic output", P_STRING, P_LOCAL, &sDefault.szMagicOutput, NULL, NULL, FLAG_SHARE}, - {"delete readonly", P_BOOL, P_LOCAL, &sDefault.bDeleteReadonly, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, - {"dos filemode", P_BOOL, P_LOCAL, &sDefault.bDosFilemode, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, - {"dos filetimes", P_BOOL, P_LOCAL, &sDefault.bDosFiletimes, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, - {"dos filetime resolution", P_BOOL, P_LOCAL, &sDefault.bDosFiletimeResolution, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, - - {"fake directory create times", P_BOOL, P_LOCAL, &sDefault.bFakeDirCreateTimes, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, - {"panic action", P_STRING, P_GLOBAL, &Globals.szPanicAction, NULL, NULL, 0}, - {"hide local users", P_BOOL, P_GLOBAL, &Globals.bHideLocalUsers, NULL, + {N_("preexec close"), P_BOOL, P_LOCAL, &sDefault.bPreexecClose, NULL, NULL, FLAG_SHARE}, + {N_("postexec"), P_STRING, P_LOCAL, &sDefault.szPostExec, NULL, NULL, FLAG_SHARE | FLAG_PRINT}, + {N_("root preexec"), P_STRING, P_LOCAL, &sDefault.szRootPreExec, NULL, NULL, FLAG_SHARE | FLAG_PRINT}, + {N_("root preexec close"), P_BOOL, P_LOCAL, &sDefault.bRootpreexecClose, NULL, NULL, FLAG_SHARE}, + {N_("root postexec"), P_STRING, P_LOCAL, &sDefault.szRootPostExec, NULL, NULL, FLAG_SHARE | FLAG_PRINT}, + {N_("available"), P_BOOL, P_LOCAL, &sDefault.bAvailable, NULL, NULL, FLAG_BASIC | FLAG_SHARE | FLAG_PRINT}, + {N_("volume"), P_STRING, P_LOCAL, &sDefault.volume, NULL, NULL, FLAG_SHARE }, + {N_("fstype"), P_STRING, P_LOCAL, &sDefault.fstype, NULL, NULL, FLAG_SHARE}, + {N_("set directory"), P_BOOLREV, P_LOCAL, &sDefault.bNo_set_dir, NULL, NULL, FLAG_SHARE}, + {N_("source environment"), P_STRING, P_GLOBAL, &Globals.szSourceEnv, handle_source_env, NULL, 0}, + {N_("wide links"), P_BOOL, P_LOCAL, &sDefault.bWidelinks, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, + {N_("follow symlinks"), P_BOOL, P_LOCAL, &sDefault.bSymlinks, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, + {N_("dont descend"), P_STRING, P_LOCAL, &sDefault.szDontdescend, NULL, NULL, FLAG_SHARE}, + {N_("magic script"), P_STRING, P_LOCAL, &sDefault.szMagicScript, NULL, NULL, FLAG_SHARE}, + {N_("magic output"), P_STRING, P_LOCAL, &sDefault.szMagicOutput, NULL, NULL, FLAG_SHARE}, + {N_("delete readonly"), P_BOOL, P_LOCAL, &sDefault.bDeleteReadonly, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, + {N_("dos filemode"), P_BOOL, P_LOCAL, &sDefault.bDosFilemode, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, + {N_("dos filetimes"), P_BOOL, P_LOCAL, &sDefault.bDosFiletimes, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, + {N_("dos filetime resolution"), P_BOOL, P_LOCAL, &sDefault.bDosFiletimeResolution, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, + + {N_("fake directory create times"), P_BOOL, P_LOCAL, &sDefault.bFakeDirCreateTimes, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, + {N_("panic action"), P_STRING, P_GLOBAL, &Globals.szPanicAction, NULL, NULL, 0}, + {N_("hide local users"), P_BOOL, P_GLOBAL, &Globals.bHideLocalUsers, NULL, NULL, 0}, - {"VFS options", P_SEP, P_SEPARATOR}, + {N_("VFS options"), P_SEP, P_SEPARATOR}, - {"vfs object", P_STRING, P_LOCAL, &sDefault.szVfsObjectFile, handle_vfs_object, NULL, FLAG_SHARE}, - {"vfs options", P_STRING, P_LOCAL, &sDefault.szVfsOptions, NULL, NULL, FLAG_SHARE}, + {N_("vfs object"), P_STRING, P_LOCAL, &sDefault.szVfsObjectFile, handle_vfs_object, NULL, FLAG_SHARE}, + {N_("vfs options"), P_STRING, P_LOCAL, &sDefault.szVfsOptions, NULL, NULL, FLAG_SHARE}, - {"msdfs root", P_BOOL, P_LOCAL, &sDefault.bMSDfsRoot, NULL, NULL, FLAG_SHARE}, - {"host msdfs", P_BOOL, P_GLOBAL, &Globals.bHostMSDfs, NULL, NULL, 0}, - - {"Winbind options", P_SEP, P_SEPARATOR}, - - {"winbind uid", P_STRING, P_GLOBAL, &Globals.szWinbindUID, handle_winbind_id, NULL, 0}, - {"winbind gid", P_STRING, P_GLOBAL, &Globals.szWinbindGID, handle_winbind_id, NULL, 0}, - {"template homedir", P_STRING, P_GLOBAL, &Globals.szTemplateHomedir, NULL, NULL, 0}, - {"template shell", P_STRING, P_GLOBAL, &Globals.szTemplateShell, NULL, NULL, 0}, - {"winbind separator", P_STRING, P_GLOBAL, &Globals.szWinbindSeparator, NULL, NULL, 0}, - {"winbind cache time", P_INTEGER, P_GLOBAL, &Globals.winbind_cache_time, NULL, NULL, 0}, - {"winbind enum users", P_BOOL, P_GLOBAL, &Globals.bWinbindEnumUsers, NULL, NULL, 0}, - {"winbind enum groups", P_BOOL, P_GLOBAL, &Globals.bWinbindEnumGroups, NULL, NULL, 0}, + {N_("msdfs root"), P_BOOL, P_LOCAL, &sDefault.bMSDfsRoot, NULL, NULL, FLAG_SHARE}, + {N_("host msdfs"), P_BOOL, P_GLOBAL, &Globals.bHostMSDfs, NULL, NULL, 0}, + + {N_("Winbind options"), P_SEP, P_SEPARATOR}, + + {N_("winbind uid"), P_STRING, P_GLOBAL, &Globals.szWinbindUID, handle_winbind_id, NULL, 0}, + {N_("winbind gid"), P_STRING, P_GLOBAL, &Globals.szWinbindGID, handle_winbind_id, NULL, 0}, + {N_("template homedir"), P_STRING, P_GLOBAL, &Globals.szTemplateHomedir, NULL, NULL, 0}, + {N_("template shell"), P_STRING, P_GLOBAL, &Globals.szTemplateShell, NULL, NULL, 0}, + {N_("winbind separator"), P_STRING, P_GLOBAL, &Globals.szWinbindSeparator, NULL, NULL, 0}, + {N_("winbind cache time"), P_INTEGER, P_GLOBAL, &Globals.winbind_cache_time, NULL, NULL, 0}, + {N_("winbind enum users"), P_BOOL, P_GLOBAL, &Globals.bWinbindEnumUsers, NULL, NULL, 0}, + {N_("winbind enum groups"), P_BOOL, P_GLOBAL, &Globals.bWinbindEnumGroups, NULL, NULL, 0}, {NULL, P_BOOL, P_NONE, NULL, NULL, NULL, 0} }; diff --git a/source3/script/installman.sh b/source3/script/installman.sh index 4eda8fd537..a21385711a 100755 --- a/source3/script/installman.sh +++ b/source3/script/installman.sh @@ -1,50 +1,64 @@ #!/bin/sh #5 July 96 Dan.Shearer@unisa.edu.au removed hardcoded values +# +# 13 Aug 2001 Rafal Szczesniak <mimir@spin.ict.pwr.wroc.pl> +# modified to accomodate international man pages (inspired +# by Japanese edition's approach) MANDIR=$1 SRCDIR=$2/ -if [ $# -ge 3 ] ; then - GROFF=$3 # sh cmd line, including options +langs=$3 + +if [ $# -ge 4 ] ; then + GROFF=$4 # sh cmd line, including options fi -echo Installing man pages in $MANDIR -for d in $MANDIR $MANDIR/man1 $MANDIR/man5 $MANDIR/man7 $MANDIR/man8; do -if [ ! -d $d ]; then -mkdir $d -if [ ! -d $d ]; then - echo Failed to make directory $d, does $USER have privileges? - exit 1 -fi -fi -done +for lang in $langs; do + if ["X$lang" = Xen ]; then + echo Installing default man pages in $MANDIR/ + lang=. + else + echo Installing \"$lang\" man pages in $MANDIR/lang/$lang + fi -for sect in 1 5 7 8 ; do - for m in $MANDIR/man$sect ; do - for s in $SRCDIR../docs/manpages/*$sect; do - FNAME=$m/`basename $s` + langdir=$MANDIR/lang/$lang + for d in $MANDIR $langdir $langdir/man1 $langdir/man5 $langdir/man7 $langdir/man8; do + if [ ! -d $d ]; then + mkdir $d + if [ ! -d $d ]; then + echo Failed to make directory $d, does $USER have privileges? + exit 1 + fi + fi + done + + for sect in 1 5 7 8 ; do + for m in $langdir/man$sect ; do + for s in $SRCDIR../docs/manpages/$lang/*$sect; do + FNAME=$m/`basename $s` - # Test for writability. Involves - # blowing away existing files. + # Test for writability. Involves + # blowing away existing files. - if (rm -f $FNAME && touch $FNAME); then - rm $FNAME - if [ "x$GROFF" = x ] ; then - cp $s $m # Copy raw nroff - else - echo "\t$FNAME" # groff'ing can be slow, give the user - # a warm fuzzy. - $GROFF $s > $FNAME # Process nroff, because man(1) (on - # this system) doesn't . - fi - chmod 0644 $FNAME - else - echo Cannot create $FNAME... does $USER have privileges? - fi + if (rm -f $FNAME && touch $FNAME); then + rm $FNAME + if [ "x$GROFF" = x ] ; then + cp $s $m # Copy raw nroff + else + echo "\t$FNAME" # groff'ing can be slow, give the user + # a warm fuzzy. + $GROFF $s > $FNAME # Process nroff, because man(1) (on + # this system) doesn't . + fi + chmod 0644 $FNAME + else + echo Cannot create $FNAME... does $USER have privileges? + fi + done + done done - done done - cat << EOF ====================================================================== The man pages have been installed. You may uninstall them using the command diff --git a/source3/script/mkinstalldirs b/source3/script/mkinstalldirs new file mode 100755 index 0000000000..5020c62554 --- /dev/null +++ b/source3/script/mkinstalldirs @@ -0,0 +1,40 @@ +#! /bin/sh +# mkinstalldirs --- make directory hierarchy +# Author: Noah Friedman <friedman@prep.ai.mit.edu> +# Created: 1993-05-16 +# Public domain + +# $Id: mkinstalldirs,v 1.1 2001/09/24 15:55:08 monyo Exp $ + +errstatus=0 + +for file +do + set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` + shift + + pathcomp= + for d + do + pathcomp="$pathcomp$d" + case "$pathcomp" in + -* ) pathcomp=./$pathcomp ;; + esac + + if test ! -d "$pathcomp"; then + echo "mkdir $pathcomp" 1>&2 + + mkdir "$pathcomp" || lasterr=$? + + if test ! -d "$pathcomp"; then + errstatus=$lasterr + fi + fi + + pathcomp="$pathcomp/" + done +done + +exit $errstatus + +# mkinstalldirs ends here diff --git a/source3/script/uninstallman.sh b/source3/script/uninstallman.sh index 873ca4f720..3126709831 100755 --- a/source3/script/uninstallman.sh +++ b/source3/script/uninstallman.sh @@ -1,20 +1,28 @@ #!/bin/sh #4 July 96 Dan.Shearer@UniSA.edu.au +# +# 13 Aug 2001 Rafal Szczesniak <mimir@spin.ict.pwr.wroc.pl> +# modified to accomodate international man pages (inspired +# by Japanese edition's approach) + MANDIR=$1 SRCDIR=$2 +langs=$3 -echo Uninstalling man pages from $MANDIR +for lang in $langs; do + echo Uninstalling \"$lang\" man pages from $MANDIR/$lang -for sect in 1 5 7 8 ; do - for m in $MANDIR/man$sect ; do - for s in $SRCDIR/../docs/manpages/*$sect; do - FNAME=$m/`basename $s` - if test -f $FNAME; then - echo Deleting $FNAME - rm -f $FNAME - test -f $FNAME && echo Cannot remove $FNAME... does $USER have privileges? - fi + for sect in 1 5 7 8 ; do + for m in $MANDIR/$lang/man$sect ; do + for s in $SRCDIR/../docs/manpages/$lang/*$sect; do + FNAME=$m/`basename $s` + if test -f $FNAME; then + echo Deleting $FNAME + rm -f $FNAME + test -f $FNAME && echo Cannot remove $FNAME... does $USER have privileges? + fi + done done done done diff --git a/source3/web/cgi.c b/source3/web/cgi.c index 939b8f94cd..d2b30c49e9 100644 --- a/source3/web/cgi.c +++ b/source3/web/cgi.c @@ -20,6 +20,7 @@ #include "includes.h" #include "smb.h" +#include "webintl.h" #define MAX_VARIABLES 10000 @@ -447,6 +448,7 @@ static void cgi_download(char *file) char buf[1024]; int fd, l, i; char *p; + int nLangDesc; /* sanitise the filename */ for (i=0;file[i];i++) { @@ -460,7 +462,11 @@ static void cgi_download(char *file) cgi_setup_error("404 File Not Found","", "The requested file was not found"); } +#if I18N_SWAT + fd = sys_open(ln_get_pref_file(file, &st, &nLangDesc),O_RDONLY,0); +#else fd = sys_open(file,O_RDONLY,0); +#endif if (fd == -1) { cgi_setup_error("404 File Not Found","", "The requested file was not found"); @@ -478,7 +484,10 @@ static void cgi_download(char *file) } } printf("Expires: %s\r\n", http_timestring(time(NULL)+EXPIRY_TIME)); - +#if I18N_SWAT + if(ln_get_lang(nLangDesc)) + printf("Content-Language: %s\r\n", ln_get_lang(nLangDesc)); +#endif printf("Content-Length: %d\r\n\r\n", (int)st.st_size); while ((l=read(fd,buf,sizeof(buf)))>0) { fwrite(buf, 1, l, stdout); @@ -509,6 +518,11 @@ void cgi_setup(char *rootdir, int auth_required) /* Handle the possability we might be running as non-root */ sec_init(); +#if I18N_SWAT + if(getenv("HTTP_ACCEPT_LANGUAGE")) /* if running as a cgi program */ + ln_negotiate_language(getenv("HTTP_ACCEPT_LANGUAGE")); +#endif + /* maybe we are running under a web server */ if (getenv("CONTENT_LENGTH") || getenv("REQUEST_METHOD")) { if (auth_required) { @@ -543,6 +557,10 @@ void cgi_setup(char *rootdir, int auth_required) authenticated = cgi_handle_authorization(&line[15]); } else if (strncasecmp(line,"Content-Length: ", 16)==0) { content_length = atoi(&line[16]); +#if I18N_SWAT + } else if (strncasecmp(line,"Accept-Language: ", 17)==0) { + ln_negotiate_language(&line[17]); +#endif } /* ignore all other requests! */ } diff --git a/source3/web/neg_lang.c b/source3/web/neg_lang.c new file mode 100644 index 0000000000..8cb41a34ec --- /dev/null +++ b/source3/web/neg_lang.c @@ -0,0 +1,378 @@ +/* + Unix SMB/Netbios implementation. + Version 1.9. + Samba Web Administration Tool + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + Created by Ryo Kawahara <rkawa@lbe.co.jp> +*/ + +#include "includes.h" +/* #include "config.h" */ +#include "webintl.h" + +#if I18N_SWAT +/* constants. */ +/* it is ok to make them bigger.*/ +#define LN_PREFLANG_MAX 10 +#define LN_LNAME_LENGTH 8+1+8 + +#define LN_DEFAULT_LANG I18N_DEFAULT_LANG +#define LN_LANGDESC_DEFAULT -1 +#define LN_NO_AVAILABLE_LANG -1 + +/* ****************************************************************** + * macros for debugging. + ***************************************************************** */ +#ifdef LN_R_NODEBUG + +#else +/* + *#define LN_DEBUG_LOG "/tmp/lndebug.log" + *void ln_debug_error(const char *info, int nLine) + *{ + * FILE* fp; + * fp = sys_fopen(LN_DEBUG_LOG, "a"); + * fprintf(fp, "%s at %d.\n", info, nLine); + * fclose(fp); + *} + *void rassert_help(BOOL b, int l) + *{ + * if(!b) + * { + * ln_debug_error("language negotiation error.", l); + * exit(1); + * } + *} + */ +#endif /* LN_R_NODEBUG */ + +/* **************************************************************** + LNNegotiator struct. It contains... + [aPrefLang] + the array of strings. each string is the name of + languages ("ja", "ko"...), given by web browser. + [nPrefLang] + the number of the languages in aPrefLang. + [lOriginalLang] + == "en": indicates what language the default(original) files + are written with. +**************************************************************** */ +typedef char lnstring[LN_LNAME_LENGTH + 1]; +#define lnstrcpy(d,s) safe_strcpy((d),(s),sizeof(lnstring)-1) + +typedef struct tagLNNegotiator +{ + lnstring aPrefLang[LN_PREFLANG_MAX]; + int nPrefLang; + lnstring lOriginalLang; +}LNNegotiator; + +/* ************************************************************** + * some access functions & macros for LNNegotiator struct. + * ************************************************************ */ +#define ln_getPreflangCount(pLn) ((pLn)->nPrefLang) +#define ln_getOriginalLang(pLn) ((pLn)->lOriginalLang) +#define ln_getDefaultPrefLang(pLn) ((pLn)->lDefaultPrefLang) + +/* make it inline-expanded (or macro) to get better performance */ +static const char* ln_getPreflang(LNNegotiator* pLn, int i) +{ + rassert(i == LN_LANGDESC_DEFAULT + || (0 <= i && i < ln_getPreflangCount(pLn))); + + if(i == LN_LANGDESC_DEFAULT) + return NULL; + if(0 <= i && i < ln_getPreflangCount(pLn)) + return pLn->aPrefLang[i]; + return NULL; +} +/* initialize structures */ +static void ln_resetln(LNNegotiator* pLn) +{ + pLn->nPrefLang = 0; + /* using fixed memory.*/ +} +static BOOL ln_addPreflang(LNNegotiator* pLn, const char* pLang) +{ + int nPref = ln_getPreflangCount(pLn); + + if(nPref >= LN_PREFLANG_MAX) + return False; + + lnstrcpy(pLn->aPrefLang[nPref], pLang); + (pLn->nPrefLang)++; + return True; +} +static void ln_initln_help(LNNegotiator* pLn) +{ + ln_resetln(pLn); + lnstrcpy(pLn->lOriginalLang, I18N_ORIGINAL_LANG); + /* I18N_ORIGINAL_LANG = "en" is hardcoded in + webintl.h. */ + if (I18N_DEFAULT_PREF_LANG[0] != '\0') + ln_addPreflang(pLn, I18N_DEFAULT_PREF_LANG); + + /* this entry is used only when web browser didn't send + ACCEPT-LANGUAGE header. */ +} +/* **************************************************************** + * store acceptable languages into LNNegotiator object. + * [pstrLangarray] The arguments of "accept-language" http header, + * which is like "en-GB, es;q=0.5, ja". "q=0.5" is called quality value, + * but it is ignored now. wiled card "*" is also ignored. + ***************************************************************** */ +static BOOL ln_negotiate_language_help( LNNegotiator* pLn, const char* pstrLangarray ) +{ + char* pToken; + const char* pDelim = " \n\r\t,;"; + pstring strBuffer; + + rassert(pstrLangarray); + rassert(pLn); + + ln_resetln(pLn); + pstrcpy(strBuffer, pstrLangarray); + pToken = strtok(strBuffer, pDelim); + while(pToken != NULL) + { + if(strncmp(pToken, "q=", strlen("q=")) == 0) + { + pToken = strtok(NULL, pDelim); + continue; + } + if(!ln_addPreflang(pLn, pToken)) + break; + pToken = strtok(NULL, pDelim); + } + rassert(ln_getPreflangCount(pLn) != 0); + return (ln_getPreflangCount(pLn) != 0); +} +/* parse catalog file header and get encoding information.*/ +static BOOL parse_po_header(const char* pheader, pstring pencoding_name) +{ + const char *ap_i_v = "Project-Id-Version:"; + const char *acharset = "charset="; + char* penc; + int nenc; + + if(pencoding_name == NULL) return False; + if(pheader == NULL || *pheader == '\0') + { + /* error or catalog is not available. */ + pstrcpy(pencoding_name,""); + return False; + } + penc = strstr(pheader, acharset); + if(strncmp(pheader, ap_i_v, strlen(ap_i_v)) != 0 || penc == NULL) + { + /* catalog file exists, but header is not good.*/ + pstrcpy(pencoding_name, ""); + return True; + } + nenc = strcspn(penc + strlen(acharset), "\n"); + strncpy(pencoding_name, + penc + strlen(acharset), nenc); + return True; +} +/* ad-hoc mime charset -> samba encoding name converter. + character conversion is done when internal samba data, + such as paramters, open files, share names, are going to be displayed. + it is only valid for japanese encodings because samba-2.0.7 only has + these three character convertors. + so other .po file(catalog file) should be encoded with one which + samba can deal with (i.e same as DOS codepage). + + display-time conversion is deleted on this version because + all catalog files are encoded with samba internal encoding (DOS codepage). + + THIS FUNCTION is ALREADY obsolated and maybe removed soon, -- monyo +*/ +#define LN_SAMBA_ENCODINGS 3 +static const char* get_samba_enc(const char* penc) +{ + int i; + static const fstring fdefault = ""; + static const fstring fmimeenc[LN_SAMBA_ENCODINGS] = + { + "EUC-JP", "Shift_JIS", "ISO-2022-JP" + }; + static const fstring fsambaenc[LN_SAMBA_ENCODINGS] = + { + "euc", "sjis", "jis" + }; + for(i = 0; i < LN_SAMBA_ENCODINGS; i++) + { + if(strcasecmp(penc, fmimeenc[i]) == 0) + return fsambaenc[i]; + } + return fdefault; +} +/* ************************************************************ + find a better language. + if the language specified by web browser matches to a language + which is supported by the swat server, this function returns it. + *********************************************************** */ +static void set_a_language(const char* planguage) +{ + /* included gettext source is affected by + these env.variables without locale settings. + */ + /* + putenv(env) will not duplicate env argument + but smbw_setenv() does this. + */ + FILE *file; + smbw_setenv("LANGUAGE", planguage); + smbw_setenv("LANG", planguage); + bindtextdomain(I18N_PACKAGE, I18N_LOCALEDIR); + textdomain(I18N_PACKAGE); +} +static int ln_set_pref_language(LNNegotiator* pLn) +{ + int j; + pstring enc_name; + + for(j = 0; j < ln_getPreflangCount(pLn); j++) + { + set_a_language(ln_getPreflang(pLn, j)); + /* then check for _("") special entry which has + a lot of information about .po file. */ + if(parse_po_header(_(""), enc_name)) + { + /* the catalog file must exist and may have + encoding information .*/ + /* + but in this version, catalog files must be + written with samba-internal encoding (i.e. + dos encoding, dos codepage) + so there is no need to convert. + //ln_init_swat_encoding(get_samba_enc(enc_name)); + ln_init_swat_encoding(enc_name); + */ + return j; + } + } + return LN_NO_AVAILABLE_LANG; + /* no available or return the default? */ +} +/* ************************************************************** + initialize gettext. Before this, cgi_setup() should be done. + cgi_setup() calls ln_negotiate_language() if the user specifies + languages in web browser. Then, ln_set_pref_language() will work. + ************************************************************* */ +static BOOL ln_init_lang_env_help(LNNegotiator* pLn) +{ +#if I18N_GETTEXT + int nLang; + + nLang = ln_set_pref_language(pLn); + rstrace(getenv("LANGUAGE")); +#endif /* I18N_GETTEXT */ + return True; +} +/* ***************************************************************** + * This function searches for the "PrefLang" version of pFile. + * if not available, returns pFile. + * [pFile] the filename. + * [pst] the address of a struct. it will be filled with the information + * of the file. + * [pLangDesc] The address of an integer. a value which indicates the + * language of the returned value is written to the address. the value + * is used in ln_get_lang(). + * [return value] address of the name of the language version of the file. + * It is static object so it will be destroyed at the time ln_get_pref_file() + * is called. + **************************************************************** */ +static void ln_make_filename( pstring afname, const char* pFile, const char* pAdd ) +{ +#if LANG_PREFIX + /* LANG_PREFIX is already undefined, maybe removed soon */ + /* maybe, foo.html.ja */ + pstrcpy(afname, pFile); + pstrcat(afname, "."); + pstrcat(afname, pAdd); +#else + /* maybe, lang/ja/foo.html */ + pstrcpy(afname, "lang/"); + pstrcat(afname, pAdd); + pstrcat(afname, "/"); + pstrcat(afname, pFile); +#endif +} +static const char* ln_get_pref_file_help( + LNNegotiator* pLn, const char* pFile, + SMB_STRUCT_STAT* pst, int* pLangDesc) +{ + static pstring afname; + int i; + + for(i = 0; i < ln_getPreflangCount(pLn); i++) + { + if(strcmp(ln_getPreflang(pLn, i), ln_getOriginalLang(pLn)) + == 0) + break; + ln_make_filename(afname, pFile, ln_getPreflang(pLn, i)); + if(file_exist(afname, pst)) + { + *pLangDesc = i; + return afname; + } + } + pstrcpy(afname, pFile); + file_exist(afname, pst); + *pLangDesc = LN_LANGDESC_DEFAULT; + return afname; +} +/* ******************************************************************* + * file scope variables. this variable is not locked. + * (not multithread-safe) + ******************************************************************** */ +static LNNegotiator lnLanguagenegotiator; + +/* ******************************************************************* + * interfaces to the outside of this file. + ******************************************************************** */ +void ln_initln(void) +{ + ln_initln_help(&lnLanguagenegotiator); +} +BOOL ln_init_lang_env(void) +{ + return ln_init_lang_env_help(&lnLanguagenegotiator); +} +const char* ln_get_lang(int nLangDesc) +{ + return ln_getPreflang(&lnLanguagenegotiator, nLangDesc); +} +const char* ln_get_pref_file(const char* pFile, + SMB_STRUCT_STAT* pst, int* pLangDesc) +{ + return ln_get_pref_file_help( + &lnLanguagenegotiator, pFile, pst, pLangDesc); +} +BOOL ln_negotiate_language(const char* pstrLangarray) +{ + return ln_negotiate_language_help( + &lnLanguagenegotiator, pstrLangarray); +} +const char* ln_get_pref_file_n_o(const char* pFile) +{ + SMB_STRUCT_STAT st; + int nLangDesc; + return ln_get_pref_file(pFile, &st, &nLangDesc); +} +#endif /* I18N_SWAT */ diff --git a/source3/web/statuspage.c b/source3/web/statuspage.c index e930629eee..61bbf67a13 100644 --- a/source3/web/statuspage.c +++ b/source3/web/statuspage.c @@ -20,6 +20,7 @@ */ #include "includes.h" +#include "webintl.h" static pid_t smbd_pid; @@ -36,19 +37,19 @@ static void print_share_mode(share_mode_entry *e, char *fname) printf("<tr><td>%d</td>",(int)e->pid); printf("<td>"); switch ((e->share_mode>>4)&0xF) { - case DENY_NONE: printf("DENY_NONE"); break; - case DENY_ALL: printf("DENY_ALL "); break; - case DENY_DOS: printf("DENY_DOS "); break; - case DENY_READ: printf("DENY_READ "); break; - case DENY_WRITE:printf("DENY_WRITE "); break; + case DENY_NONE: printf(_("DENY_NONE")); break; + case DENY_ALL: printf(_("DENY_ALL ")); break; + case DENY_DOS: printf(_("DENY_DOS ")); break; + case DENY_READ: printf(_("DENY_READ ")); break; + case DENY_WRITE:printf(_("DENY_WRITE ")); break; } printf("</td>"); printf("<td>"); switch (e->share_mode&0xF) { - case 0: printf("RDONLY "); break; - case 1: printf("WRONLY "); break; - case 2: printf("RDWR "); break; + case 0: printf(_("RDONLY ")); break; + case 1: printf(_("WRONLY ")); break; + case 2: printf(_("RDWR ")); break; } printf("</td>"); @@ -56,15 +57,15 @@ static void print_share_mode(share_mode_entry *e, char *fname) if((e->op_type & (EXCLUSIVE_OPLOCK|BATCH_OPLOCK)) == (EXCLUSIVE_OPLOCK|BATCH_OPLOCK)) - printf("EXCLUSIVE+BATCH "); + printf(_("EXCLUSIVE+BATCH ")); else if (e->op_type & EXCLUSIVE_OPLOCK) - printf("EXCLUSIVE "); + printf(_("EXCLUSIVE ")); else if (e->op_type & BATCH_OPLOCK) - printf("BATCH "); + printf(_("BATCH ")); else if (e->op_type & LEVEL_II_OPLOCK) - printf("LEVEL_II "); + printf(_("LEVEL_II ")); else - printf("NONE "); + printf(_("NONE ")); printf("</td>"); printf("<td>%s</td><td>%s</td></tr>\n", @@ -107,7 +108,7 @@ static int traverse_fn2(TDB_CONTEXT *tdb, TDB_DATA kbuf, TDB_DATA dbuf, void* st printf("<tr><td>%d</td><td>%s</td><td>%s</td><td>%s</td>\n", (int)crec.pid, - crec.machine,crec.addr, + crec.machine, crec.addr, tstring(crec.start)); if (geteuid() == 0) { printf("<td><input type=submit value=\"X\" name=\"kill_%d\"></td>\n", @@ -190,18 +191,18 @@ void status_page(void) tdb = tdb_open_log(lock_path("connections.tdb"), 0, TDB_DEFAULT, O_RDONLY, 0); if (tdb) tdb_traverse(tdb, traverse_fn1, NULL); - printf("<H2>Server Status</H2>\n"); + printf("<H2>%s</H2>\n", _("Server Status")); printf("<FORM method=post>\n"); if (!autorefresh) { - printf("<input type=submit value=\"Auto Refresh\" name=autorefresh>\n"); - printf("<br>Refresh Interval: "); + printf("<input type=submit value=\"%s\" name=autorefresh>\n", _("Auto Refresh")); + printf("<br>%s", _("Refresh Interval: ")); printf("<input type=text size=2 name=\"refresh_interval\" value=%d>\n", refresh_interval); } else { - printf("<input type=submit value=\"Stop Refreshing\" name=norefresh>\n"); - printf("<br>Refresh Interval: %d\n", refresh_interval); + printf("<input type=submit value=\"%s\" name=norefresh>\n", _("Stop Refreshing")); + printf("<br>%s%d\n", _("Refresh Interval: "), refresh_interval); printf("<input type=hidden name=refresh value=1>\n"); } @@ -215,40 +216,40 @@ void status_page(void) printf("<table>\n"); - printf("<tr><td>version:</td><td>%s</td></tr>",VERSION); + printf("<tr><td>%s</td><td>%s</td></tr>", _("version:"), VERSION); fflush(stdout); - printf("<tr><td>smbd:</td><td>%srunning</td>\n",smbd_running()?"":"not "); + printf("<tr><td>%s</td><td>%s</td>\n", _("smbd:"), smbd_running()?_("running"):_("not running")); if (geteuid() == 0) { if (smbd_running()) { - printf("<td><input type=submit name=\"smbd_stop\" value=\"Stop smbd\"></td>\n"); + printf("<td><input type=submit name=\"smbd_stop\" value=\"%s\"></td>\n", _("Stop smbd")); } else { - printf("<td><input type=submit name=\"smbd_start\" value=\"Start smbd\"></td>\n"); + printf("<td><input type=submit name=\"smbd_start\" value=\"%s\"></td>\n", _("Start smbd")); } - printf("<td><input type=submit name=\"smbd_restart\" value=\"Restart smbd\"></td>\n"); + printf("<td><input type=submit name=\"smbd_restart\" value=\"%s\"></td>\n", _("Restart smbd")); } printf("</tr>\n"); fflush(stdout); - printf("<tr><td>nmbd:</td><td>%srunning</td>\n",nmbd_running()?"":"not "); + printf("<tr><td>%s</td><td>%s</td>\n", _("nmbd:"), nmbd_running()?_("running"):_("not running")); if (geteuid() == 0) { if (nmbd_running()) { - printf("<td><input type=submit name=\"nmbd_stop\" value=\"Stop nmbd\"></td>\n"); + printf("<td><input type=submit name=\"nmbd_stop\" value=\"%s\"></td>\n", _("Stop nmbd")); } else { - printf("<td><input type=submit name=\"nmbd_start\" value=\"Start nmbd\"></td>\n"); + printf("<td><input type=submit name=\"nmbd_start\" value=\"%s\"></td>\n", _("Start nmbd")); } - printf("<td><input type=submit name=\"nmbd_restart\" value=\"Restart nmbd\"></td>\n"); + printf("<td><input type=submit name=\"nmbd_restart\" value=\"%s\"></td>\n", _("Restart nmbd")); } printf("</tr>\n"); printf("</table>\n"); fflush(stdout); - printf("<p><h3>Active Connections</h3>\n"); + printf("<p><h3>%s</h3>\n", _("Active Connections")); printf("<table border=1>\n"); - printf("<tr><th>PID</th><th>Client</th><th>IP address</th><th>Date</th>\n"); + printf("<tr><th>%s</th><th>%s</th><th>%s</th><th>%s</th>\n", _("PID"), _("Client"), _("IP address"), _("Date")); if (geteuid() == 0) { - printf("<th>Kill</th>\n"); + printf("<th>%s</th>\n", _("Kill")); } printf("</tr>\n"); @@ -256,17 +257,18 @@ void status_page(void) printf("</table><p>\n"); - printf("<p><h3>Active Shares</h3>\n"); + printf("<p><h3>%s</h3>\n", _("Active Shares")); printf("<table border=1>\n"); - printf("<tr><th>Share</th><th>User</th><th>Group</th><th>PID</th><th>Client</th><th>Date</th></tr>\n\n"); + printf("<tr><th>%s</th><th>%s</th><th>%s</th><th>%s</th><th>%s</th><th>%s</th></tr>\n\n", + _("Share"), _("User"), _("Group"), _("PID"), _("Client"), _("Date")); if (tdb) tdb_traverse(tdb, traverse_fn3, NULL); printf("</table><p>\n"); - printf("<h3>Open Files</h3>\n"); + printf("<h3>%s</h3>\n", _("Open Files")); printf("<table border=1>\n"); - printf("<tr><th>PID</th><th>Sharing</th><th>R/W</th><th>Oplock</th><th>File</th><th>Date</th></tr>\n"); + printf("<tr><th>%s</th><th>%s</th><th>%s</th><th>%s</th><th>%s</th><th>%s</th></tr>\n", _("PID"), _("Sharing"), _("R/W"), _("Oplock"), _("File"), _("Date")); locking_init(1); share_mode_forall(print_share_mode); diff --git a/source3/web/swat.c b/source3/web/swat.c index 9a7658e94f..664780995e 100644 --- a/source3/web/swat.c +++ b/source3/web/swat.c @@ -25,6 +25,7 @@ #include "includes.h" #include "smb.h" +#include "webintl.h" #define GLOBALS_SNUM -1 @@ -109,12 +110,14 @@ static char *make_parm_name(char *label) ****************************************************************************/ static int include_html(char *fname) { - FILE *f = sys_fopen(fname,"r"); + FILE *f; char buf[1024]; int ret; + f = sys_fopen((char*)LN_(fname), "r"); + if (!f) { - d_printf("ERROR: Can't open %s\n", fname); + d_printf(_("ERROR: Can't open %s\n"), fname); return 0; } @@ -144,6 +147,38 @@ static void print_header(void) } } +/* ******************************************************************* + show parameter label with translated name in the following form + because showing original and translated label in one line looks + too long, and showing translated label only is unusable for + heavy users. + ------------------------------- + HELP security [combo box][button] + SECURITY + ------------------------------- + (capital words are translated by gettext.) + if no translation is available, then same form as original is + used. + "i18n_translated_parm" class is used to change the color of the + translated parameter with CSS. + **************************************************************** */ +static const char* get_parm_translated( + const char* pAnchor, const char* pHelp, const char* pLabel) +{ + const char* pTranslated = _(pLabel); + static pstring output; + if(strcmp(pLabel, pTranslated) != 0) + { + snprintf(output, sizeof(output), + "<A HREF=\"/swat/help/smb.conf.5.html#%s\" target=\"docs\"> %s</A> %s <br><span class=\"i18n_translated_parm\">%s</span>", + pAnchor, pHelp, pLabel, pTranslated); + return output; + } + snprintf(output, sizeof(output), + "<A HREF=\"/swat/help/smb.conf.5.html#%s\" target=\"docs\"> %s</A> %s", + pAnchor, pHelp, pLabel); + return output; +} /**************************************************************************** finish off the page ****************************************************************************/ @@ -167,17 +202,13 @@ static void show_parameter(int snum, struct parm_struct *parm) ptr = lp_local_ptr(snum, ptr); } - str = stripspace(parm->label); - strupper (str); - d_printf("<tr><td><A HREF=\"/swat/help/smb.conf.5.html#%s\" target=\"docs\">Help</A> %s</td><td>", - str, parm->label); - + printf("<tr><td>%s</td><td>", get_parm_translated(stripspace(parm->label), _("Help"), parm->label)); switch (parm->type) { case P_CHAR: d_printf("<input type=text size=2 name=\"parm_%s\" value=\"%c\">", make_parm_name(parm->label), *(char *)ptr); - d_printf("<input type=button value=\"Set Default\" onClick=\"swatform.parm_%s.value=\'%c\'\">", - make_parm_name(parm->label),(char)(parm->def.cvalue)); + d_printf("<input type=button value=\"%s\" onClick=\"swatform.parm_%s.value=\'%c\'\">", + _("Set Default"), make_parm_name(parm->label),(char)(parm->def.cvalue)); break; case P_LIST: @@ -190,8 +221,8 @@ static void show_parameter(int snum, struct parm_struct *parm) } } d_printf("\">"); - d_printf("<input type=button value=\"Set Default\" onClick=\"swatform.parm_%s.value=\'", - make_parm_name(parm->label)); + d_printf("<input type=button value=\"%s\" onClick=\"swatform.parm_%s.value=\'", + _("Set Default"), make_parm_name(parm->label)); if (parm->def.lvalue) { char **list = (char **)(parm->def.lvalue); for (; *list; list++) { @@ -205,16 +236,16 @@ static void show_parameter(int snum, struct parm_struct *parm) case P_USTRING: d_printf("<input type=text size=40 name=\"parm_%s\" value=\"%s\">", make_parm_name(parm->label), *(char **)ptr); - d_printf("<input type=button value=\"Set Default\" onClick=\"swatform.parm_%s.value=\'%s\'\">", - make_parm_name(parm->label),fix_backslash((char *)(parm->def.svalue))); + d_printf("<input type=button value=\"%s\" onClick=\"swatform.parm_%s.value=\'%s\'\">", + _("Set Default"), make_parm_name(parm->label),fix_backslash((char *)(parm->def.svalue))); break; case P_GSTRING: case P_UGSTRING: d_printf("<input type=text size=40 name=\"parm_%s\" value=\"%s\">", make_parm_name(parm->label), (char *)ptr); - d_printf("<input type=button value=\"Set Default\" onClick=\"swatform.parm_%s.value=\'%s\'\">", - make_parm_name(parm->label),fix_backslash((char *)(parm->def.svalue))); + d_printf("<input type=button value=\"%s\" onClick=\"swatform.parm_%s.value=\'%s\'\">", + _("Set Default"), make_parm_name(parm->label),fix_backslash((char *)(parm->def.svalue))); break; case P_BOOL: @@ -222,8 +253,8 @@ static void show_parameter(int snum, struct parm_struct *parm) d_printf("<option %s>Yes", (*(BOOL *)ptr)?"selected":""); d_printf("<option %s>No", (*(BOOL *)ptr)?"":"selected"); d_printf("</select>"); - d_printf("<input type=button value=\"Set Default\" onClick=\"swatform.parm_%s.selectedIndex=\'%d\'\">", - make_parm_name(parm->label),(BOOL)(parm->def.bvalue)?0:1); + d_printf("<input type=button value=\"%s\" onClick=\"swatform.parm_%s.selectedIndex=\'%d\'\">", + _("Set Default"), make_parm_name(parm->label),(BOOL)(parm->def.bvalue)?0:1); break; case P_BOOLREV: @@ -231,20 +262,20 @@ static void show_parameter(int snum, struct parm_struct *parm) d_printf("<option %s>Yes", (*(BOOL *)ptr)?"":"selected"); d_printf("<option %s>No", (*(BOOL *)ptr)?"selected":""); d_printf("</select>"); - d_printf("<input type=button value=\"Set Default\" onClick=\"swatform.parm_%s.selectedIndex=\'%d\'\">", - make_parm_name(parm->label),(BOOL)(parm->def.bvalue)?1:0); + d_printf("<input type=button value=\"%s\" onClick=\"swatform.parm_%s.selectedIndex=\'%d\'\">", + _("Set Default"), make_parm_name(parm->label),(BOOL)(parm->def.bvalue)?1:0); 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=button value=\"Set Default\" onClick=\"swatform.parm_%s.value=\'%d\'\">", - make_parm_name(parm->label),(int)(parm->def.ivalue)); + 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; case P_OCTAL: d_printf("<input type=text size=8 name=\"parm_%s\" value=%s>", make_parm_name(parm->label), octal_string(*(int *)ptr)); - d_printf("<input type=button value=\"Set Default\" onClick=\"swatform.parm_%s.value=\'%s\'\">", - make_parm_name(parm->label), + d_printf("<input type=button value=\"%s\" onClick=\"swatform.parm_%s.value=\'%s\'\">", + _("Set Default"), make_parm_name(parm->label), octal_string((int)(parm->def.ivalue))); break; @@ -256,8 +287,8 @@ static void show_parameter(int snum, struct parm_struct *parm) } } d_printf("</select>"); - d_printf("<input type=button value=\"Set Default\" onClick=\"swatform.parm_%s.selectedIndex=\'%d\'\">", - make_parm_name(parm->label),enum_index((int)(parm->def.ivalue),parm->enum_list)); + d_printf("<input type=button value=\"%s\" onClick=\"swatform.parm_%s.selectedIndex=\'%d\'\">", + _("Set Default"), make_parm_name(parm->label),enum_index((int)(parm->def.ivalue),parm->enum_list)); break; case P_SEP: break; @@ -335,7 +366,7 @@ static void show_parameters(int snum, int allparameters, int advanced, int print if (printers && !(parm->flags & FLAG_PRINT)) continue; } if (heading && heading != last_heading) { - d_printf("<tr><td></td></tr><tr><td><b><u>%s</u></b></td></tr>\n", heading); + d_printf("<tr><td></td></tr><tr><td><b><u>%s</u></b></td></tr>\n", _(heading)); last_heading = heading; } show_parameter(snum, parm); @@ -460,20 +491,20 @@ 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>\n"), p); } - image_link("Home", "", "images/home.gif"); + image_link(_("Home"), "", "images/home.gif"); if (have_write_access) { - image_link("Globals", "globals", "images/globals.gif"); - image_link("Shares", "shares", "images/shares.gif"); - image_link("Printers", "printers", "images/printers.gif"); + image_link(_("Globals"), "globals", "images/globals.gif"); + image_link(_("Shares"), "shares", "images/shares.gif"); + image_link(_("Printers"), "printers", "images/printers.gif"); } if (have_read_access) { - image_link("Status", "status", "images/status.gif"); - image_link("View Config", "viewconfig","images/viewconfig.gif"); + image_link(_("Status"), "status", "images/status.gif"); + image_link(_("View Config"), "viewconfig", "images/viewconfig.gif"); } - image_link("Password Management", "passwd", "images/passwd.gif"); + image_link(_("Password Management"), "passwd", "images/passwd.gif"); d_printf("<HR>\n"); } @@ -497,13 +528,13 @@ static void viewconfig_page(void) full_view = 1; } - d_printf("<H2>Current Config</H2>\n"); + d_printf("<H2>%s</H2>\n", _("Current Config")); d_printf("<form method=post>\n"); if (full_view) { - d_printf("<input type=submit name=\"normal_view\" value=\"Normal View\">\n"); + d_printf("<input type=submit name=\"normal_view\" value=\"%s\">\n", _("Normal View")); } else { - d_printf("<input type=submit name=\"full_view\" value=\"Full View\">\n"); + d_printf("<input type=submit name=\"full_view\" value=\"%s\">\n", _("Full View")); } d_printf("<p><pre>"); @@ -519,7 +550,7 @@ static void globals_page(void) { int advanced = 0; - d_printf("<H2>Global Variables</H2>\n"); + d_printf("<H2>%s</H2>\n", _("Global Variables")); if (cgi_variable("Advanced") && !cgi_variable("Basic")) advanced = 1; @@ -532,14 +563,16 @@ static void globals_page(void) d_printf("<FORM name=\"swatform\" method=post>\n"); if (have_write_access) { - d_printf("<input type=submit name=\"Commit\" value=\"Commit Changes\">\n"); + d_printf("<input type=submit name=\"Commit\" value=\"%s\">\n", + _("Commit Changes")); } - d_printf("<input type=reset name=\"Reset Values\" value=\"Reset Values\">\n"); + d_printf("<input type=reset name=\"Reset Values\" value=\"%s\">\n", + _("Reset Values")); if (advanced == 0) { - d_printf("<input type=submit name=\"Advanced\" value=\"Advanced View\">\n"); + d_printf("<input type=submit name=\"Advanced\" value=\"%s\">\n", _("Advanced View")); } else { - d_printf("<input type=submit name=\"Basic\" value=\"Basic View\">\n"); + d_printf("<input type=submit name=\"Basic\" value=\"%s\">\n", _("Basic View")); } d_printf("<p>\n"); @@ -562,14 +595,14 @@ static void shares_page(void) { char *share = cgi_variable("share"); char *s; - int snum=-1; + int snum = -1; int i; int advanced = 0; if (share) snum = lp_servicenumber(share); - d_printf("<H2>Share Parameters</H2>\n"); + d_printf("<H2>%s</H2>\n", _("Share Parameters")); if (cgi_variable("Advanced") && !cgi_variable("Basic")) advanced = 1; @@ -598,7 +631,7 @@ static void shares_page(void) d_printf("<table>\n"); d_printf("<tr>\n"); - d_printf("<td><input type=submit name=selectshare value=\"Choose Share\"></td>\n"); + d_printf("<td><input type=submit name=selectshare value=\"%s\"></td>\n", _("Choose Share")); d_printf("<td><select name=share>\n"); if (snum < 0) d_printf("<option value=\" \"> \n"); @@ -612,14 +645,14 @@ static void shares_page(void) } d_printf("</select></td>\n"); if (have_write_access) { - d_printf("<td><input type=submit name=\"Delete\" value=\"Delete Share\"></td>\n"); + d_printf("<td><input type=submit name=\"Delete\" value=\"%s\"></td>\n", _("Delete Share")); } d_printf("</tr>\n"); d_printf("</table>"); d_printf("<table>"); if (have_write_access) { d_printf("<tr>\n"); - d_printf("<td><input type=submit name=createshare value=\"Create Share\"></td>\n"); + d_printf("<td><input type=submit name=createshare value=\"%s\"></td>\n", _("Create Share")); d_printf("<td><input type=text size=30 name=newshare></td></tr>\n"); } d_printf("</table>"); @@ -627,14 +660,14 @@ static void shares_page(void) if (snum >= 0) { if (have_write_access) { - d_printf("<input type=submit name=\"Commit\" value=\"Commit Changes\">\n"); + d_printf("<input type=submit name=\"Commit\" value=\"%s\">\n", _("Commit Changes")); } - d_printf("<input type=reset name=\"Reset Values\" value=\"Reset Values\">\n"); + d_printf("<input type=reset name=\"Reset Values\" value=\"%s\">\n", _("Reset Values")); if (advanced == 0) { - d_printf("<input type=submit name=\"Advanced\" value=\"Advanced View\">\n"); + d_printf("<input type=submit name=\"Advanced\" value=\"%s\">\n", _("Advanced View")); } else { - d_printf("<input type=submit name=\"Basic\" value=\"Basic View\">\n"); + d_printf("<input type=submit name=\"Basic\" value=\"%s\">\n", _("Basic View")); } d_printf("<p>\n"); } @@ -664,7 +697,7 @@ static BOOL change_password(const char *remote_machine, char *user_name, pstring msg_str; if (demo_mode) { - d_printf("password change in demo mode rejected\n<p>"); + d_printf("%s<p>", _("password change in demo mode rejected\n")); return False; } @@ -703,7 +736,7 @@ static void chg_passwd(void) /* Make sure users name has been specified */ if (strlen(cgi_variable(SWAT_USER)) == 0) { - d_printf("<p> Must specify \"User Name\" \n"); + d_printf("<p>%s", _(" Must specify \"User Name\" \n")); return; } @@ -719,26 +752,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> Must specify \"Old Password\" \n"); + d_printf("<p>%s", _(" Must specify \"Old Password\" \n")); 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> Must specify \"Remote Machine\" \n"); + d_printf("<p>%s", _(" Must specify \"Remote Machine\" \n")); return; } /* Make sure new passwords have been specified */ if ((strlen( cgi_variable(NEW_PSWD)) <= 0) || (strlen( cgi_variable(NEW2_PSWD)) <= 0)) { - d_printf("<p> Must specify \"New, and Re-typed Passwords\" \n"); + d_printf("<p>%s", _(" Must specify \"New, and Re-typed Passwords\" \n")); return; } /* Make sure new passwords was typed correctly twice */ if (strcmp(cgi_variable(NEW_PSWD), cgi_variable(NEW2_PSWD)) != 0) { - d_printf("<p> Re-typed password didn't match new password\n"); + d_printf("<p>%s", _(" Re-typed password didn't match new password\n")); return; } } @@ -766,10 +799,11 @@ static void chg_passwd(void) local_flags); if(local_flags == 0) { + d_printf("<p>"); if (rslt == True) { - d_printf("<p> The passwd for '%s' has been changed. \n", cgi_variable(SWAT_USER)); + d_printf(_(" The passwd for '%s' has been changed. \n"), cgi_variable(SWAT_USER)); } else { - d_printf("<p> The passwd for '%s' has NOT been changed. \n",cgi_variable(SWAT_USER)); + d_printf(_(" The passwd for '%s' has NOT been changed. \n"), cgi_variable(SWAT_USER)); } } @@ -793,7 +827,7 @@ static void passwd_page(void) if (!new_name) new_name = ""; - d_printf("<H2>Server Password Management</H2>\n"); + d_printf("<H2>%s</H2>\n", _("Server Password Management")); d_printf("<FORM name=\"swatform\" method=post>\n"); @@ -802,32 +836,32 @@ static void passwd_page(void) /* * Create all the dialog boxes for data collection */ - d_printf("<tr><td> User Name : </td>\n"); + 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> Old Password : </td>\n"); + 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> New Password : </td>\n"); + 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> Re-type New Password : </td>\n"); + 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"); /* * Create all the control buttons for requesting action */ - d_printf("<input type=submit name=%s value=\"Change Password\">\n", - CHG_S_PASSWD_FLAG); + d_printf("<input type=submit name=%s value=\"%s\">\n", + CHG_S_PASSWD_FLAG, _("Change Password")); if (demo_mode || am_root()) { - d_printf("<input type=submit name=%s value=\"Add New User\">\n", - ADD_USER_FLAG); - d_printf("<input type=submit name=%s value=\"Delete User\">\n", - DELETE_USER_FLAG); - d_printf("<input type=submit name=%s value=\"Disable User\">\n", - DISABLE_USER_FLAG); - d_printf("<input type=submit name=%s value=\"Enable User\">\n", - ENABLE_USER_FLAG); + d_printf("<input type=submit name=%s value=\"%s\">\n", + ADD_USER_FLAG, _("Add New User")); + d_printf("<input type=submit name=%s value=\"%s\">\n", + DELETE_USER_FLAG, _("Delete User")); + d_printf("<input type=submit name=%s value=\"%s\">\n", + DISABLE_USER_FLAG, _("Disable User")); + d_printf("<input type=submit name=%s value=\"%s\">\n", + ENABLE_USER_FLAG, _("Enable User")); } d_printf("<p></FORM>\n"); @@ -840,7 +874,7 @@ static void passwd_page(void) chg_passwd(); } - d_printf("<H2>Client/Server Password Management</H2>\n"); + d_printf("<H2>%s</H2>\n", _("Client/Server Password Management")); d_printf("<FORM name=\"swatform\" method=post>\n"); @@ -849,15 +883,15 @@ static void passwd_page(void) /* * Create all the dialog boxes for data collection */ - d_printf("<tr><td> User Name : </td>\n"); + 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> Old Password : </td>\n"); + 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> New Password : </td>\n"); + 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> Re-type New Password : </td>\n"); + 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> Remote Machine : </td>\n"); + 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>"); @@ -865,8 +899,8 @@ static void passwd_page(void) /* * Create all the control buttons for requesting action */ - d_printf("<input type=submit name=%s value=\"Change Password\">", - CHG_R_PASSWD_FLAG); + d_printf("<input type=submit name=%s value=\"%s\">", + CHG_R_PASSWD_FLAG, _("Change Password")); d_printf("<p></FORM>\n"); @@ -895,13 +929,13 @@ static void printers_page(void) if (share) snum = lp_servicenumber(share); - d_printf("<H2>Printer Parameters</H2>\n"); - - d_printf("<H3>Important Note:</H3>\n"); - 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\">Printcap Name</A>.\n"); - d_printf("Attempting to delete these printers from SWAT will have no effect.\n"); + d_printf("<H2>%s</H2>\n", _("Printer Parameters")); + + d_printf("<H3>%s</H3>\n", _("Important Note:")); + 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")); if (cgi_variable("Advanced") && !cgi_variable("Basic")) advanced = 1; @@ -934,7 +968,7 @@ static void printers_page(void) d_printf("<FORM name=\"swatform\" method=post>\n"); d_printf("<table>\n"); - d_printf("<tr><td><input type=submit name=selectshare value=\"Choose Printer\"></td>\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"); @@ -953,14 +987,14 @@ static void printers_page(void) } d_printf("</select></td>"); if (have_write_access) { - d_printf("<td><input type=submit name=\"Delete\" value=\"Delete Printer\"></td>\n"); + d_printf("<td><input type=submit name=\"Delete\" value=\"%s\"></td>\n", _("Delete Printer")); } d_printf("</tr>"); d_printf("</table>\n"); if (have_write_access) { d_printf("<table>\n"); - d_printf("<tr><td><input type=submit name=createshare value=\"Create Printer\"></td>\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>"); } @@ -968,13 +1002,13 @@ static void printers_page(void) if (snum >= 0) { if (have_write_access) { - d_printf("<input type=submit name=\"Commit\" value=\"Commit Changes\">\n"); + d_printf("<input type=submit name=\"Commit\" value=\"%s\">\n", _("Commit Changes")); } - d_printf("<input type=reset name=\"Reset Values\" value=\"Reset Values\">\n"); + d_printf("<input type=reset name=\"Reset Values\" value=\"%s\">\n", _("Reset Values")); if (advanced == 0) { - d_printf("<input type=submit name=\"Advanced\" value=\"Advanced View\">\n"); + d_printf("<input type=submit name=\"Advanced\" value=\"%s\">\n", _("Advanced View")); } else { - d_printf("<input type=submit name=\"Basic\" value=\"Basic View\">\n"); + d_printf("<input type=submit name=\"Basic\" value=\"%s\">\n", _("Basic View")); } d_printf("<p>\n"); } @@ -1038,10 +1072,16 @@ static void printers_page(void) iNumNonAutoPrintServices = lp_numservices(); load_printers(); +#if I18N_SWAT + ln_initln(); + cgi_setup(SWATDIR, !demo_mode); + ln_init_lang_env(); +#else cgi_setup(SWATDIR, !demo_mode); +#endif print_header(); - + cgi_load_variables(); if (!file_exist(servicesf, NULL)) { @@ -1057,7 +1097,6 @@ static void printers_page(void) have_read_access = (access(servicesf,R_OK) == 0); } - show_main_buttons(); page = cgi_pathinfo(); |