MC goes Internationallsls./gmc Spanish translation almost complete -mig

This commit is contained in:
Miguel de Icaza 1998-03-25 05:16:00 +00:00
parent f29db51778
commit ac70e34d02
62 changed files with 10147 additions and 1024 deletions

View File

@ -14,16 +14,19 @@ prefix = @prefix@
exec_prefix = $(prefix)
binprefix =
manprefix =
bindir = $(exec_prefix)/bin
libdir = $(exec_prefix)/lib/mc
bindir = $(exec_prefix)/bin
libdir = $(exec_prefix)/lib/mc
suppbindir = $(libdir)/bin
tidir = $(libdir)/term
extfsdir = $(libdir)/extfs
icondir = $(prefix)/share/icons/mc
mandir = $(prefix)/man/man1
manext = 1
man8dir = $(prefix)/man/man8
man8ext = 8
tidir = $(libdir)/term
extfsdir = $(libdir)/extfs
icondir = $(prefix)/share/icons/mc
mandir = $(prefix)/man/man1
datadir = $(prefix)/share
localedir = $(datadir)/locale
manext = 1
man8dir = $(prefix)/man/man8
man8ext = 8
xv_bindir = @xv_bindir@
# Tools & program stuff
@ -47,7 +50,7 @@ AWK_VAR_OPTION = @AWK_VAR_OPTION@
# No way, to make make happy (except GNU), we cannot use := to append
# something to these, so that's why there is a leading _
XCFLAGS = @CFLAGS@
XCPPFLAGS = @CPPFLAGS@ -I.. -DBINDIR=\""$(bindir)/"\" -DLIBDIR=\""$(libdir)/"\" -DICONDIR=\""$(icondir)/"\" $(XINC)
XCPPFLAGS = @CPPFLAGS@ -I.. -DBINDIR=\""$(bindir)/"\" -DLIBDIR=\""$(libdir)/"\" -DICONDIR=\""$(icondir)/"\" $(XINC) -DLOCALEDIR=\""$(localedir)/"\"
XLDFLAGS = @LDFLAGS@
XDEFS = @DEFS@
XLIBS = @LIBS@
@ -56,7 +59,7 @@ XLIBS = @LIBS@
# You shouldn't have to edit this :)
mcsrcdir = $(rootdir)/src
docdir = $(rootdir)/doc
datadir = $(rootdir)/lib
mclibdir = $(rootdir)/lib
slangdir = $(rootdir)/slang
vfsdir = $(rootdir)/vfs
xvdir = $(rootdir)/xv

View File

@ -5,7 +5,7 @@ rootdir = $(srcdir)
@MCFGR@@MCF@
foreigndirs=nt os2
unixdirs=vfs lib doc slang edit src tk xv gnome icons
unixdirs=vfs lib doc slang edit src tk xv gnome icons intl @POSUB@
alldirs=$(unixdirs) $(foreigndirs)
subdirs=$(alldirs)
@ -17,7 +17,7 @@ DISTMAIN = configure configure.in NEWS README INSTALL INSTALL.FAST \
Makefile.in FAQ COPYING create_vcs install-sh \
config.h.in aclocal.m4 acconfig.h VERSION mcfn_install.in \
Make.common.in README.NT mc.spec.in mc.spec README.OS2 \
VERSION.in
VERSION.in ABOUT-NLS mkinstalldirs
all:
@for dir in ${unixdirs}; do \

225
NLS Normal file
View File

@ -0,0 +1,225 @@
Notes on the Free Translation Project
*************************************
Free software is going international! The Free Translation Project
is a way to get maintainers of free software, translators, and users all
together, so that will gradually become able to speak many languages.
A few packages already provide translations for their messages.
If you found this `ABOUT-NLS' file inside a distribution, you may
assume that the distributed package does use GNU `gettext' internally,
itself available at your nearest GNU archive site. But you do *not*
need to install GNU `gettext' prior to configuring, installing or using
this package with messages translated.
Installers will find here some useful hints. These notes also
explain how users should proceed for getting the programs to use the
available translations. They tell how people wanting to contribute and
work at translations should contact the appropriate team.
When reporting bugs in the `intl/' directory or bugs which may be
related to internationalization, you should tell about the version of
`gettext' which is used. The information can be found in the
`intl/VERSION' file, in internationalized packages.
One advise in advance
=====================
If you want to exploit the full power of internationalization, you
should configure it using
./configure --with-included-gettext
to force usage of internationalizing routines provided within this
package, despite the existence of internationalizing capabilities in the
operating system where this package is being installed. So far, only
the `gettext' implementation in the GNU C library version 2 provides as
many features (such as locale alias or message inheritance) as the
implementation here. It is also not possible to offer this additional
functionality on top of a `catgets' implementation. Future versions of
GNU `gettext' will very likely convey even more functionality. So it
might be a good idea to change to GNU `gettext' as soon as possible.
So you need not provide this option if you are using GNU libc 2 or
you have installed a recent copy of the GNU gettext package with the
included `libintl'.
INSTALL Matters
===============
Some packages are "localizable" when properly installed; the
programs they contain can be made to speak your own native language.
Most such packages use GNU `gettext'. Other packages have their own
ways to internationalization, predating GNU `gettext'.
By default, this package will be installed to allow translation of
messages. It will automatically detect whether the system provides
usable `catgets' (if using this is selected by the installer) or
`gettext' functions. If neither is available, the GNU `gettext' own
library will be used. This library is wholly contained within this
package, usually in the `intl/' subdirectory, so prior installation of
the GNU `gettext' package is *not* required. Installers may use
special options at configuration time for changing the default
behaviour. The commands:
./configure --with-included-gettext
./configure --with-catgets
./configure --disable-nls
will respectively bypass any pre-existing `catgets' or `gettext' to use
the internationalizing routines provided within this package, enable
the use of the `catgets' functions (if found on the locale system), or
else, *totally* disable translation of messages.
When you already have GNU `gettext' installed on your system and run
configure without an option for your new package, `configure' will
probably detect the previously built and installed `libintl.a' file and
will decide to use this. This might be not what is desirable. You
should use the more recent version of the GNU `gettext' library. I.e.
if the file `intl/VERSION' shows that the library which comes with this
package is more recent, you should use
./configure --with-included-gettext
to prevent auto-detection.
By default the configuration process will not test for the `catgets'
function and therefore they will not be used. The reasons are already
given above: the emulation on top of `catgets' cannot provide all the
extensions provided by the GNU `gettext' library. If you nevertheless
want to use the `catgets' functions use
./configure --with-catgets
to enable the test for `catgets' (this causes no harm if `catgets' is
not available on your system). If you really select this option we
would like to hear about the reasons because we cannot think of any
good one ourself.
Internationalized packages have usually many `po/LL.po' files, where
LL gives an ISO 639 two-letter code identifying the language. Unless
translations have been forbidden at `configure' time by using the
`--disable-nls' switch, all available translations are installed
together with the package. However, the environment variable `LINGUAS'
may be set, prior to configuration, to limit the installed set.
`LINGUAS' should then contain a space separated list of two-letter
codes, stating which languages are allowed.
Using This Package
==================
As a user, if your language has been installed for this package, you
only have to set the `LANG' environment variable to the appropriate
ISO 639 `LL' two-letter code prior to using the programs in the
package. For example, let's suppose that you speak German. At the
shell prompt, merely execute `setenv LANG de' (in `csh'),
`export LANG; LANG=de' (in `sh') or `export LANG=de' (in `bash'). This
can be done from your `.login' or `.profile' file, once and for all.
An operating system might already offer message localization for
many of its programs, while other programs have been installed locally
with the full capabilities of GNU `gettext'. Just using `gettext'
extended syntax for `LANG' would break proper localization of already
available operating system programs. In this case, users should set
both `LANGUAGE' and `LANG' variables in their environment, as programs
using GNU `gettext' give preference to `LANGUAGE'. For example, some
Swedish users would rather read translations in German than English for
when Swedish is not available. This is easily accomplished by setting
`LANGUAGE' to `sv:de' while leaving `LANG' to `sv'.
Translating Teams
=================
For the Free Translation Project to be a success, we need interested
people who like their own language and write it well, and who are also
able to synergize with other translators speaking the same language.
Each translation team has its own mailing list, courtesy of Linux
International. You may reach your translation team at the address
`LL@li.org', replacing LL by the two-letter ISO 639 code for your
language. Language codes are *not* the same as the country codes given
in ISO 3166. The following translation teams exist, as of August 1997:
Chinese `zh', Czech `cs', Danish `da', Dutch `nl', English `en',
Esperanto `eo', Finnish `fi', French `fr', German `de', Hungarian
`hu', Irish `ga', Italian `it', Indonesian `id', Japanese `ja',
Korean `ko', Latin `la', Norwegian `no', Persian `fa', Polish
`pl', Portuguese `pt', Russian `ru', Slovenian `sl', Spanish `es',
Swedish `sv', and Turkish `tr'.
For example, you may reach the Chinese translation team by writing to
`zh@li.org'.
If you'd like to volunteer to *work* at translating messages, you
should become a member of the translating team for your own language.
The subscribing address is *not* the same as the list itself, it has
`-request' appended. For example, speakers of Swedish can send a
message to `sv-request@li.org', having this message body:
subscribe
Keep in mind that team members are expected to participate
*actively* in translations, or at solving translational difficulties,
rather than merely lurking around. If your team does not exist yet and
you want to start one, or if you are unsure about what to do or how to
get started, please write to `translation@iro.umontreal.ca' to reach the
coordinator for all translator teams.
The English team is special. It works at improving and uniformizing
the terminology in use. Proven linguistic skill are praised more than
programming skill, here.
Available Packages
==================
Languages are not equally supported in all packages. The following
matrix shows the current state of internationalization, as of August
1997. The matrix shows, in regard of each package, for which languages
PO files have been submitted to translation coordination.
Ready PO files cs da de en es fi fr it ja ko nl no pl pt sl sv
.-------------------------------------------------.
bash | [] [] [] | 3
bison | [] [] [] | 3
clisp | [] [] [] [] | 4
cpio | [] [] [] [] [] | 5
diffutils | [] [] [] [] [] | 5
enscript | [] [] [] [] [] [] | 6
fileutils | [] [] [] [] [] [] [] [] [] [] | 10
findutils | [] [] [] [] [] [] [] [] | 8
flex | [] [] [] [] | 4
gcal | [] [] [] [] [] | 5
gettext | [] [] [] [] [] [] [] [] [] [] | 11
grep | [] [] [] [] [] [] [] [] [] | 9
hello | [] [] [] [] [] [] [] [] [] [] | 10
id-utils | [] [] [] | 3
indent | [] [] [] [] | 4
libc | [] [] [] [] [] [] [] | 7
m4 | [] [] [] [] [] | 5
make | [] [] [] [] [] [] | 6
music | [] [] | 2
ptx | [] [] [] [] [] [] [] [] | 8
recode | [] [] [] [] [] [] [] [] [] | 9
sh-utils | [] [] [] [] [] [] [] | 7
sharutils | [] [] [] [] [] | 5
tar | [] [] [] [] [] [] [] [] [] [] | 10
texinfo | [] | 1
textutils | [] [] [] [] [] [] [] [] [] | 9
wdiff | [] [] [] [] [] [] [] [] | 8
`-------------------------------------------------'
16 languages cs da de en es fi fr it ja ko nl no pl pt sl sv
27 packages 3 2 24 1 17 1 26 2 1 11 20 9 19 7 7 17 167
Some counters in the preceding matrix are higher than the number of
visible blocks let us expect. This is because a few extra PO files are
used for implementing regional variants of languages, or language
dialects.
For a PO file in the matrix above to be effective, the package to
which it applies should also have been internationalized and
distributed as such by its maintainer. There might be an observable
lag between the mere existence a PO file and its wide availability in a
distribution.
If August 1997 seems to be old, you may fetch a more recent copy of
this `ABOUT-NLS' file on most GNU archive sites.

View File

@ -25,6 +25,8 @@
@TOP@
#undef PACKAGE
/* Always defined */
#undef D_INO_IN_DIRENT
#undef IS_AIX
@ -202,6 +204,13 @@
/* Version of ncurses */
#undef NCURSES_970530
#undef HAVE_STPCPY
#undef ENABLE_NLS
#undef HAVE_CATGETS
#undef HAVE_GETTEXT
#undef HAVE_LC_MESSAGES
@BOTTOM@
#ifdef HAVE_LIBPT

402
aclocal.m4 vendored
View File

@ -37,7 +37,8 @@ AC_DEFUN([GNOME_INIT_HOOK],
AC_ARG_WITH(gnome,
[ --with-gnome Specify prefix for GNOME files],[
if test x$withval = xyes; then
$1
dnl Note that an empty true branch is not valid sh syntax.
ifelse([$1], [], :, [$1])
else
LDFLAGS="$LDFLAGS -L$withval/lib"
CFLAGS="$CFLAGS -I$withval/include"
@ -61,7 +62,8 @@ AC_DEFUN([GNOME_INIT_HOOK],
AC_DEFUN([GNOME_INIT],[
GNOME_INIT_HOOK([],fail)
])dnl
])
dnl
dnl XView & SlingShot library checking
dnl (c) 1995 Jakub Jelinek
dnl
@ -1243,3 +1245,399 @@ case "x$ac_cv_prog_cc_stdc" in
esac
])
dnl aclocal.m4 generated automatically by aclocal 1.2f
dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
dnl This Makefile.in is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl This program is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
dnl PARTICULAR PURPOSE.
# progtest.m4 from gettext 0.32
# Search path for a program which passes the given test.
# Ulrich Drepper <drepper@cygnus.com>, 1996.
#
# This file file 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
])
# lcmessage.m4 from gettext 0.32
# Check whether LC_MESSAGES is available in <locale.h>.
# Ulrich Drepper <drepper@cygnus.com>, 1995.
#
# This file file 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])
# gettext.m4 from gettext 0.32
# Macro to add for using GNU gettext.
# Ulrich Drepper <drepper@cygnus.com>, 1995.
#
# This file file 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 3
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)
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_TRY_LINK([], [return (int) gettext ("")],
gt_cv_func_gettext_libintl=yes,
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)
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 programs 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
# 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 values.h sys/param.h])
AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
__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
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
])

View File

@ -3,7 +3,8 @@ test -z "$srcdir" && srcdir=.
(
cd $srcdir
cat macros/gnome.m4 mc-aclocal.m4 > aclocal.m4
cat macros/gnome.m4 mc-aclocal.m4 gettext.m4 > aclocal.m4
autoheader
autoconf
)

View File

@ -69,6 +69,9 @@
/* Define if you have <sys/wait.h> that is POSIX.1 compatible. */
#undef HAVE_SYS_WAIT_H
/* Define as __inline if that's what the C compiler calls it. */
#undef inline
/* Define if major, minor, and makedev are declared in <mkdev.h>. */
#undef MAJOR_IN_MKDEV
@ -94,6 +97,9 @@
/* Define if you need to in order for stat and other things to work. */
#undef _POSIX_SOURCE
/* Define to `unsigned' if <sys/types.h> doesn't define. */
#undef size_t
/* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be
automatically deduced at run-time.
@ -112,6 +118,8 @@
/* Define if the X Window System is missing or not being used. */
#undef X_DISPLAY_MISSING
#undef PACKAGE
/* Always defined */
#undef D_INO_IN_DIRENT
#undef IS_AIX
@ -130,9 +138,12 @@
#undef STAT_STATFS4
#undef STAT_STATVFS
/* Does your system provide the umode_t typedef? */
/* Define umode_t if your system does not provide it */
#undef umode_t
/* Define nlink_t if your system does not provide it */
#undef nlink_t
/* Does the file command accepts the -L option */
#undef FILE_L
@ -256,12 +267,34 @@
/* Version of ncurses */
#undef NCURSES_970530
#undef HAVE_STPCPY
#undef ENABLE_NLS
#undef HAVE_CATGETS
#undef HAVE_GETTEXT
#undef HAVE_LC_MESSAGES
/* Define if you have the __argz_count function. */
#undef HAVE___ARGZ_COUNT
/* Define if you have the __argz_next function. */
#undef HAVE___ARGZ_NEXT
/* Define if you have the __argz_stringify function. */
#undef HAVE___ARGZ_STRINGIFY
/* Define if you have the cfgetospeed function. */
#undef HAVE_CFGETOSPEED
/* Define if you have the crypt function. */
#undef HAVE_CRYPT
/* Define if you have the dcgettext function. */
#undef HAVE_DCGETTEXT
/* Define if you have the getcwd function. */
#undef HAVE_GETCWD
/* Define if you have the getmntinfo function. */
#undef HAVE_GETMNTINFO
@ -289,6 +322,9 @@
/* Define if you have the memset function. */
#undef HAVE_MEMSET
/* Define if you have the munmap function. */
#undef HAVE_MUNMAP
/* Define if you have the pmap_getmaps function. */
#undef HAVE_PMAP_GETMAPS
@ -310,6 +346,12 @@
/* Define if you have the rresvport function. */
#undef HAVE_RRESVPORT
/* Define if you have the setenv function. */
#undef HAVE_SETENV
/* Define if you have the setlocale function. */
#undef HAVE_SETLOCALE
/* Define if you have the sigaction function. */
#undef HAVE_SIGACTION
@ -337,9 +379,15 @@
/* Define if you have the statvfs function. */
#undef HAVE_STATVFS
/* Define if you have the stpcpy function. */
#undef HAVE_STPCPY
/* Define if you have the strcasecmp function. */
#undef HAVE_STRCASECMP
/* Define if you have the strchr function. */
#undef HAVE_STRCHR
/* Define if you have the strdup function. */
#undef HAVE_STRDUP
@ -358,6 +406,9 @@
/* Define if you have the truncate function. */
#undef HAVE_TRUNCATE
/* Define if you have the <argz.h> header file. */
#undef HAVE_ARGZ_H
/* Define if you have the <crypt.h> header file. */
#undef HAVE_CRYPT_H
@ -379,6 +430,9 @@
/* Define if you have the <linux/ext2_fs.h> header file. */
#undef HAVE_LINUX_EXT2_FS_H
/* Define if you have the <locale.h> header file. */
#undef HAVE_LOCALE_H
/* Define if you have the <malloc.h> header file. */
#undef HAVE_MALLOC_H
@ -394,6 +448,9 @@
/* Define if you have the <ndir.h> header file. */
#undef HAVE_NDIR_H
/* Define if you have the <nl_types.h> header file. */
#undef HAVE_NL_TYPES_H
/* Define if you have the <rpc/pmap_clnt.h> header file. */
#undef HAVE_RPC_PMAP_CLNT_H
@ -460,6 +517,12 @@
/* Define if you have the <utime.h> header file. */
#undef HAVE_UTIME_H
/* Define if you have the <values.h> header file. */
#undef HAVE_VALUES_H
/* Define if you have the i library (-li). */
#undef HAVE_LIBI
/* Define if you have the intl library (-lintl). */
#undef HAVE_LIBINTL

View File

@ -4,6 +4,12 @@ dnl
AC_INIT(create_vcs)
AC_CONFIG_HEADER(config.h)
PACKAGE=mc
VERSION=dummy
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
AC_DEFINE_UNQUOTED(VERSION, "dummy")
ALL_LINGUAS="es"
dnl This is path where we're looking for headers in addition to /usr/include
dnl and whatever cpp defaults to.
include_additional_path="/usr/local/include /opt/gnu/include"
@ -62,6 +68,9 @@ if test x"$X11_WWW" = x; then
X11_WWW=lynx
fi
AM_GNU_GETTEXT
AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)
dnl
dnl This part supplies reasonable defaults for CFLAGS, if they weren't
dnl specified by ''CFLAGS=flags ./configure''
@ -1394,12 +1403,33 @@ else
fi
AC_SUBST(PCENTRULE)
AC_OUTPUT(Make.common Makefile doc/Makefile vfs/Makefile lib/Makefile \
lib/mc.ext tk/Makefile gnome/Makefile xv/Makefile src/Makefile \
slang/Makefile edit/Makefile icons/Makefile mcfn_install \
vfs/extfs/ftplist vfs/extfs/zip vfs/extfs/zoo vfs/extfs/lslR \
vfs/extfs/lha vfs/extfs/cpio vfs/extfs/deb vfs/extfs/rar \
doc/mc.1 doc/mcedit.1 doc/mcserv.8)
dnl
dnl Output configuration filesn
dnl
AC_OUTPUT([
Make.common
Makefile
doc/Makefile
vfs/Makefile
lib/Makefile
tk/Makefile
gnome/Makefile
xv/Makefile
src/Makefile
slang/Makefile
edit/Makefile
icons/Makefile
lib/mc.ext
mcfn_install
vfs/extfs/ftplist vfs/extfs/zip vfs/extfs/zoo vfs/extfs/lslR
vfs/extfs/lha vfs/extfs/cpio vfs/extfs/deb vfs/extfs/rar
doc/mc.1 doc/mcedit.1 doc/mcserv.8
intl/Makefile po/Makefile.in
],[sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile])
if test x$srcdir != x; then
if test $srcdir != .; then

View File

@ -57,9 +57,9 @@ mc.txt: mc.sgml
../src/fixhlp:
cd ../src; $(MAKE) fixhlp
mc.hlp: mc.sgml ../src/fixhlp $(datadir)/xnc.hlp
mc.hlp: mc.sgml ../src/fixhlp $(mclibdir)/xnc.hlp
$(LINUXDOCDIR)/bin/format -T hlp $(srcdir)/mc | ../src/fixhlp 58 mc.hlp.toc > mc.hlp.tmp
cat mc.hlp.toc mc.hlp.tmp $(datadir)/xnc.hlp > mc.hlp
cat mc.hlp.toc mc.hlp.tmp $(mclibdir)/xnc.hlp > mc.hlp
$(RMF) mc.hlp.toc mc.hlp.tmp
mc.texi: mc.sgml

View File

@ -385,18 +385,6 @@ void edit_paste_from_history (WEdit *edit);
void edit_split_filename (WEdit * edit, char *name);
#ifdef MIDNIGHT
# ifndef _
# define _(s) s
# endif
# define gettext(s) (s)
# define N_(s) s
# define gettext_noop(s) (s)
# endif
/* put OS2/NT/WIN95 defines here */
# ifdef OS2_NT

View File

@ -34,7 +34,7 @@ char *key_emu_str[] =
{"Intuitive", "Emacs"};
char *wrap_str[] =
{_("None"), _("Dynamic paragraphing"), _("Type writer wrap")};
{N_("None"), N_("Dynamic paragraphing"), N_("Type writer wrap")};
void edit_options_dialog (void)
{

396
gettext.m4 Normal file
View File

@ -0,0 +1,396 @@
dnl aclocal.m4 generated automatically by aclocal 1.2f
dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
dnl This Makefile.in is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl This program is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
dnl PARTICULAR PURPOSE.
# progtest.m4 from gettext 0.32
# Search path for a program which passes the given test.
# Ulrich Drepper <drepper@cygnus.com>, 1996.
#
# This file file 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
])
# lcmessage.m4 from gettext 0.32
# Check whether LC_MESSAGES is available in <locale.h>.
# Ulrich Drepper <drepper@cygnus.com>, 1995.
#
# This file file 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])
# gettext.m4 from gettext 0.32
# Macro to add for using GNU gettext.
# Ulrich Drepper <drepper@cygnus.com>, 1995.
#
# This file file 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 3
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)
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_TRY_LINK([], [return (int) gettext ("")],
gt_cv_func_gettext_libintl=yes,
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)
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 programs 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
# 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 values.h sys/param.h])
AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
__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
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
])

View File

@ -1,3 +1,10 @@
1998-03-24 Miguel de Icaza <miguel@nuclecu.unam.mx>
* gscreen.c (x_create_panel): Show the GnomeApp when we are done
packing all of our information.
* gmain.c (create_panels): do not show any of the windows yet.
1998-03-23 Miguel de Icaza <miguel@nuclecu.unam.mx>
* gscreen.c (x_fill_panel): Colors are properly displayed now.

View File

@ -10,6 +10,7 @@
#include "boxes.h"
#include "panelize.h"
#include "gcmd.h"
#include "dialog.h"
void
gnome_listing_cmd (GtkWidget *widget, WPanel *panel)
@ -30,7 +31,7 @@ void
gnome_compare_panels (void)
{
if (get_other_panel () == NULL){
message (1, " Error ", " There is no other panel to compare contents to ");
message (1, MSG_ERROR, _(" There is no other panel to compare contents to "));
return;
}
compare_dirs_cmd ();

View File

@ -806,9 +806,9 @@ desktop_file_exec (GtkWidget *widget, GdkEventButton *event, desktop_icon_t *di)
if (file_is_executable (di->pathname)){
char *tmp = name_quote (di->pathname, 0);
if (!confirm_execute || (query_dialog (" The Midnight Commander ",
" Do you really want to execute? ",
0, 2, "&Yes", "&No") == 0))
if (!confirm_execute || (query_dialog (_(" The Midnight Commander "),
_(" Do you really want to execute? "),
0, 2, _("&Yes"), _("&No")) == 0))
execute (tmp);
free (tmp);
} else {
@ -983,7 +983,7 @@ desktop_reload (char *desktop_dir)
dir = mc_opendir (desktop_dir);
if (dir == NULL){
message (1, " Warning ", " Could not open %s directory", desktop_dir, NULL);
message (1, _(" Warning "), _(" Could not open %s directory"), desktop_dir, NULL);
return;
}

View File

@ -187,81 +187,81 @@ void save_panel_types (void)
void configure_box (void);
GnomeUIInfo gnome_panel_file_menu [] = {
{ GNOME_APP_UI_ITEM, "New panel", "Opens a new panel", gnome_open_panel },
{ GNOME_APP_UI_ITEM, "Open Terminal", "Opens a terminal", gnome_open_terminal },
{ GNOME_APP_UI_SEPARATOR },
{ GNOME_APP_UI_ITEM, "Copy", "Copy files", copy_cmd },
{ GNOME_APP_UI_ITEM, "Rename/Move", "Rename or move files", ren_cmd },
{ GNOME_APP_UI_ITEM, "Mkdir", "Creates a new folder", mkdir_cmd },
{ GNOME_APP_UI_ITEM, "Delete", "Delete files from disk", delete_cmd },
{ GNOME_APP_UI_SEPARATOR },
{ GNOME_APP_UI_ITEM, "View", "View file", panel_action_view },
{ GNOME_APP_UI_ITEM, "View raw", "View the file without further processing",panel_action_view_unfiltered},
{ GNOME_APP_UI_SEPARATOR },
{ GNOME_APP_UI_ITEM, "Select group", "Selects a group of files", select_cmd },
{ GNOME_APP_UI_ITEM, "Unselect group", "Un-selects a group of marked files", select_cmd },
{ GNOME_APP_UI_ITEM, "Reverse selection", "Reverses the list of tagged files", reverse_selection_cmd },
{ GNOME_APP_UI_SEPARATOR },
{ GNOME_APP_UI_ITEM, "Exit", "Exit program", gnome_quit_cmd, NULL, NULL,
{ GNOME_APP_UI_ITEM, N_("New panel"), N_("Opens a new panel"), gnome_open_panel },
{ GNOME_APP_UI_ITEM, N_("Open Terminal"), N_("Opens a terminal"), gnome_open_terminal },
{ GNOME_APP_UI_SEPARATOR },
{ GNOME_APP_UI_ITEM, N_("Copy"), N_("Copy files"), copy_cmd },
{ GNOME_APP_UI_ITEM, N_("Rename/Move"), N_("Rename or move files"), ren_cmd },
{ GNOME_APP_UI_ITEM, N_("Mkdir"), N_("Creates a new folder"), mkdir_cmd },
{ GNOME_APP_UI_ITEM, N_("Delete"), N_("Delete files from disk"), delete_cmd },
{ GNOME_APP_UI_SEPARATOR },
{ GNOME_APP_UI_ITEM, N_("View"), N_("View file"), panel_action_view },
{ GNOME_APP_UI_ITEM, N_("View raw"), N_("View the file without further processing"),panel_action_view_unfiltered},
{ GNOME_APP_UI_SEPARATOR },
{ GNOME_APP_UI_ITEM, N_("Select group"), N_("Selects a group of files"), select_cmd },
{ GNOME_APP_UI_ITEM, N_("Unselect group"), N_("Un-selects a group of marked files"), select_cmd },
{ GNOME_APP_UI_ITEM, N_("Reverse selection"), N_("Reverses the list of tagged files"), reverse_selection_cmd },
{ GNOME_APP_UI_SEPARATOR },
{ GNOME_APP_UI_ITEM, N_("Exit"), N_("Exit program"), gnome_quit_cmd, NULL, NULL,
GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_EXIT },
{ GNOME_APP_UI_ENDOFINFO, 0, 0 }
};
GnomeUIInfo gnome_panel_panel_menu [] = {
{ GNOME_APP_UI_ITEM, "Display mode...", "Set the display mode for the panel", gnome_listing_cmd },
{ GNOME_APP_UI_ITEM, "Sort order...", "Changes the sort order of the files", sort_cmd },
{ GNOME_APP_UI_ITEM, "Filter...", "Set a filter for the files", filter_cmd },
{ GNOME_APP_UI_ITEM, "Rescan", "Rescan the directory contents", reread_cmd },
{ GNOME_APP_UI_ITEM, N_("Display mode..."), N_("Set the display mode for the panel"), gnome_listing_cmd },
{ GNOME_APP_UI_ITEM, N_("Sort order..."), N_("Changes the sort order of the files"), sort_cmd },
{ GNOME_APP_UI_ITEM, N_("Filter..."), N_("Set a filter for the files"), filter_cmd },
{ GNOME_APP_UI_ITEM, N_("Rescan"), N_("Rescan the directory contents"), reread_cmd },
{ GNOME_APP_UI_SEPARATOR },
#ifdef USE_NETCODE
{ GNOME_APP_UI_ITEM, "Network link...", "Connect to a remote machine", netlink_cmd },
{ GNOME_APP_UI_ITEM, "FTP link...", "Connect to a remote machine with FTP", ftplink_cmd },
{ GNOME_APP_UI_ITEM, N_("Network link..."), N_("Connect to a remote machine"), netlink_cmd },
{ GNOME_APP_UI_ITEM, N_("FTP link..."), N_("Connect to a remote machine with FTP"), ftplink_cmd },
#endif
{ GNOME_APP_UI_ENDOFINFO, 0, 0 }
};
GnomeUIInfo gnome_panel_options_menu [] = {
{ GNOME_APP_UI_ITEM, "Confirmation", "Confirmation settings", confirm_box },
{ GNOME_APP_UI_ITEM, "Options", "Global option settings", configure_box, NULL, NULL,
{ GNOME_APP_UI_ITEM, N_("Confirmation"), N_("Confirmation settings"), confirm_box },
{ GNOME_APP_UI_ITEM, N_("Options"), N_("Global option settings"), configure_box, NULL, NULL,
GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_PROP },
#ifdef USE_VFS
{ GNOME_APP_UI_ITEM, "Virtual FS", "Virtual File System settings", configure_vfs },
{ GNOME_APP_UI_ITEM, N_("Virtual FS"), N_("Virtual File System settings"), configure_vfs },
#endif
{ GNOME_APP_UI_SEPARATOR },
{ GNOME_APP_UI_ITEM, "Save setup", NULL, save_setup_cmd },
{ GNOME_APP_UI_ITEM, N_("Save setup"), NULL, save_setup_cmd },
{ GNOME_APP_UI_ENDOFINFO, 0, 0 }
};
GnomeUIInfo gnome_panel_commands_menu [] = {
{ GNOME_APP_UI_ITEM, "Find", "Locate files on disk", find_cmd },
{ GNOME_APP_UI_ITEM, "Hotlist", "List of favorite sites", quick_chdir_cmd },
{ GNOME_APP_UI_ITEM, "Compare panels", "Compare panel contents", gnome_compare_panels },
{ GNOME_APP_UI_ITEM, "External panelize", NULL, external_panelize },
{ GNOME_APP_UI_ITEM, N_("Find"), N_("Locate files on disk"), find_cmd },
{ GNOME_APP_UI_ITEM, N_("Hotlist"), N_("List of favorite sites"), quick_chdir_cmd },
{ GNOME_APP_UI_ITEM, N_("Compare panels"), N_("Compare panel contents"), gnome_compare_panels },
{ GNOME_APP_UI_ITEM, N_("External panelize"), NULL, external_panelize },
#ifdef USE_VFS
{ GNOME_APP_UI_ITEM, "Active VFS list", "List of active virtual file systems", reselect_vfs },
{ GNOME_APP_UI_ITEM, N_("Active VFS list"), N_("List of active virtual file systems"), reselect_vfs },
#endif
#ifdef USE_EXT2FSLIB
{ GNOME_APP_UI_ITEM, "Undelete files (ext2fs only)", "Recover deleted files", undelete_cmd },
{ GNOME_APP_UI_ITEM, N_("Undelete files (ext2fs only)"), N_("Recover deleted files"), undelete_cmd },
#endif
#ifdef WITH_BACKGROUND
{ GNOME_APP_UI_ITEM, "Background jobs", "List of background operations", jobs_cmd },
{ GNOME_APP_UI_ITEM, N_("Background jobs"), N_("List of background operations"), jobs_cmd },
#endif
{ GNOME_APP_UI_ENDOFINFO, 0, 0 }
};
GnomeUIInfo gnome_panel_about_menu [] = {
{ GNOME_APP_UI_ITEM, "About", "Information on this program", gnome_about_cmd, NULL, NULL,
{ GNOME_APP_UI_ITEM, N_("About"), N_("Information on this program"), gnome_about_cmd, NULL, NULL,
GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_ABOUT },
GNOMEUIINFO_HELP ("midnight-commander"),
GNOMEUIINFO_END
};
GnomeUIInfo gnome_panel_menu [] = {
{ GNOME_APP_UI_SUBTREE, "File", NULL, &gnome_panel_file_menu },
{ GNOME_APP_UI_SUBTREE, "Panel", NULL, &gnome_panel_panel_menu },
{ GNOME_APP_UI_SUBTREE, "Commands", NULL, &gnome_panel_commands_menu },
{ GNOME_APP_UI_SUBTREE, "Options", NULL, &gnome_panel_options_menu },
{ GNOME_APP_UI_SUBTREE, "Help", NULL, &gnome_panel_about_menu },
{ GNOME_APP_UI_SUBTREE, N_("File"), NULL, &gnome_panel_file_menu },
{ GNOME_APP_UI_SUBTREE, N_("Panel"), NULL, &gnome_panel_panel_menu },
{ GNOME_APP_UI_SUBTREE, N_("Commands"), NULL, &gnome_panel_commands_menu },
{ GNOME_APP_UI_SUBTREE, N_("Options"), NULL, &gnome_panel_options_menu },
{ GNOME_APP_UI_SUBTREE, N_("Help"), NULL, &gnome_panel_about_menu },
{ GNOME_APP_UI_ENDOFINFO, 0, 0 }
};
@ -298,10 +298,8 @@ create_container (Dlg_head *h, char *name)
panel = panel_new (name);
vbox = gtk_vbox_new (0, 0);
gtk_widget_show (vbox);
gnome_app_set_contents (GNOME_APP (app), vbox);
gnome_app_create_menus_with_data (GNOME_APP (app), gnome_panel_menu, panel);
gtk_widget_show (app);
gtk_signal_connect (GTK_OBJECT (app),
"enter_notify_event",

View File

@ -203,7 +203,6 @@ x_create_panel_container (int which)
void
x_panel_container_show (widget_data wdata)
{
printf ("x_panel_container_show\n");
gtk_widget_show (GTK_WIDGET (wdata));
}
@ -221,7 +220,6 @@ x_add_widget (Dlg_head *h, Widget_Item *w)
static int
gnome_dlg_send_destroy (GtkWidget *widget, GdkEvent *event, Dlg_head *h)
{
printf ("destruyendo\n");
h->ret_value = B_CANCEL;
dlg_stop (h);
return TRUE;
@ -334,10 +332,7 @@ dialog_panel_callback (struct Dlg_head *h, int id, int msg)
current_widget = (void *) h->current->widget;
printf ("Got an enter\n");
if (current_widget == p->filter_w){
printf ("It is the filter\n");
in = (WInput *) current_widget;
set_panel_filter_to (p, strdup (in->buffer));
}

View File

@ -51,7 +51,7 @@ gprop_filename_new (char *complete_filename, char *filename)
(GtkSignalFunc) free_stuff,
gp);
frame = gtk_frame_new ("Filename");
frame = gtk_frame_new (_("Filename"));
gtk_box_pack_start (GTK_BOX (gp->top), frame, FALSE, FALSE, 0);
gtk_widget_show (frame);
@ -60,7 +60,7 @@ gprop_filename_new (char *complete_filename, char *filename)
gtk_container_add (GTK_CONTAINER (frame), vbox);
gtk_widget_show (vbox);
s = g_copy_strings ("Full name: ", complete_filename, NULL);
s = g_copy_strings (_("Full name: "), complete_filename, NULL);
gtk_box_pack_start (GTK_BOX (vbox), label_new (s, 0.0, 0.5), FALSE, FALSE, 0);
g_free (s);
@ -68,7 +68,7 @@ gprop_filename_new (char *complete_filename, char *filename)
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
gtk_widget_show (hbox);
gtk_box_pack_start (GTK_BOX (hbox), label_new ("Filename", 0.0, 0.5), FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (hbox), label_new (_("Filename"), 0.0, 0.5), FALSE, FALSE, 0);
gp->filename = gnome_entry_new ("gprop_filename_filename");
gtk_entry_set_text (GTK_ENTRY (gnome_entry_gtk_entry (GNOME_ENTRY (gp->filename))), filename);
@ -190,7 +190,7 @@ perm_mode_new (GpropPerm *gp, umode_t umode)
GtkWidget *hbox;
GtkWidget *table;
frame = gtk_frame_new ("File mode (permissions)");
frame = gtk_frame_new (_("File mode (permissions)"));
vbox = gtk_vbox_new (FALSE, 4);
gtk_container_border_width (GTK_CONTAINER (vbox), 6);
@ -201,7 +201,7 @@ perm_mode_new (GpropPerm *gp, umode_t umode)
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
gtk_widget_show (hbox);
gtk_box_pack_start (GTK_BOX (hbox), label_new ("Current mode: ", 0.0, 0.5), FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (hbox), label_new (_("Current mode: "), 0.0, 0.5), FALSE, FALSE, 0);
gp->mode_label = label_new ("0000", 0.0, 0.5);
gtk_box_pack_start (GTK_BOX (hbox), gp->mode_label, FALSE, FALSE, 0);
@ -214,22 +214,22 @@ perm_mode_new (GpropPerm *gp, umode_t umode)
/* Headings */
ATTACH (table, label_new ("Read", 0.0, 0.5), 1, 2, 0, 1);
ATTACH (table, label_new ("Write", 0.0, 0.5), 2, 3, 0, 1);
ATTACH (table, label_new ("Exec", 0.0, 0.5), 3, 4, 0, 1);
ATTACH (table, label_new ("Special", 0.0, 0.5), 4, 5, 0, 1);
ATTACH (table, label_new (_("Read"), 0.0, 0.5), 1, 2, 0, 1);
ATTACH (table, label_new (_("Write"), 0.0, 0.5), 2, 3, 0, 1);
ATTACH (table, label_new (_("Exec"), 0.0, 0.5), 3, 4, 0, 1);
ATTACH (table, label_new (_("Special"), 0.0, 0.5), 4, 5, 0, 1);
/* Permissions */
PERMSET ("User", gp->rusr, gp->wusr, gp->xusr, S_IRUSR, S_IWUSR, S_IXUSR, 1);
PERMSET ("Group", gp->rgrp, gp->wgrp, gp->xgrp, S_IRGRP, S_IWGRP, S_IXGRP, 2);
PERMSET ("Other", gp->roth, gp->woth, gp->xoth, S_IROTH, S_IWOTH, S_IXOTH, 3);
PERMSET (_("User"), gp->rusr, gp->wusr, gp->xusr, S_IRUSR, S_IWUSR, S_IXUSR, 1);
PERMSET (_("Group"), gp->rgrp, gp->wgrp, gp->xgrp, S_IRGRP, S_IWGRP, S_IXGRP, 2);
PERMSET (_("Other"), gp->roth, gp->woth, gp->xoth, S_IROTH, S_IWOTH, S_IXOTH, 3);
/* Special */
gp->suid = perm_check_new ("Set UID", umode & S_ISUID, gp);
gp->sgid = perm_check_new ("Set GID", umode & S_ISGID, gp);
gp->svtx = perm_check_new ("Sticky", umode & S_ISVTX, gp);
gp->suid = perm_check_new (_("Set UID"), umode & S_ISUID, gp);
gp->sgid = perm_check_new (_("Set GID"), umode & S_ISGID, gp);
gp->svtx = perm_check_new (_("Sticky"), umode & S_ISVTX, gp);
ATTACH (table, gp->suid, 4, 5, 1, 2);
ATTACH (table, gp->sgid, 4, 5, 2, 3);
@ -263,7 +263,7 @@ perm_owner_new (char *owner)
i = g_list_length (GTK_LIST (list)->children);
sel = i;
gnome_entry_append_history (GNOME_ENTRY (gentry), FALSE, "<Unknown>");
gnome_entry_append_history (GNOME_ENTRY (gentry), FALSE, _("<Unknown>"));
for (setpwent (); (passwd = getpwent ()) != NULL; i++) {
gnome_entry_append_history (GNOME_ENTRY (gentry), FALSE, passwd->pw_name);
@ -289,7 +289,7 @@ perm_group_new (char *group)
int i, sel;
gentry = gnome_entry_new ("gprop_perm_group");
gnome_entry_append_history (GNOME_ENTRY (gentry), FALSE, "<Unknown>");
gnome_entry_append_history (GNOME_ENTRY (gentry), FALSE, _("<Unknown>"));
list = GTK_COMBO (gentry)->list;
@ -332,7 +332,7 @@ perm_ownership_new (GpropPerm *gp, char *owner, char *group)
/* Owner */
gtk_table_attach (GTK_TABLE (table), label_new ("Owner", 0.0, 0.5),
gtk_table_attach (GTK_TABLE (table), label_new (_("Owner"), 0.0, 0.5),
0, 1, 0, 1,
GTK_FILL | GTK_SHRINK, GTK_FILL | GTK_SHRINK,
0, 0);
@ -347,7 +347,7 @@ perm_ownership_new (GpropPerm *gp, char *owner, char *group)
/* Group */
gtk_table_attach (GTK_TABLE (table), label_new ("Group", 0.0, 0.5),
gtk_table_attach (GTK_TABLE (table), label_new (_("Group"), 0.0, 0.5),
0, 1, 1, 2,
GTK_FILL | GTK_SHRINK, GTK_FILL | GTK_SHRINK,
0, 0);
@ -425,7 +425,7 @@ gprop_general_new (char *title, char *icon_filename)
(GtkSignalFunc) free_stuff,
gp);
frame = gtk_frame_new ("General");
frame = gtk_frame_new (_("General"));
gtk_box_pack_start (GTK_BOX (gp->top), frame, FALSE, FALSE, 0);
gtk_widget_show (frame);
@ -436,7 +436,7 @@ gprop_general_new (char *title, char *icon_filename)
gtk_container_add (GTK_CONTAINER (frame), table);
gtk_widget_show (table);
gtk_table_attach (GTK_TABLE (table), label_new ("Title", 0.0, 0.5),
gtk_table_attach (GTK_TABLE (table), label_new (_("Title"), 0.0, 0.5),
0, 1, 0, 1,
GTK_FILL | GTK_SHRINK,
GTK_FILL | GTK_SHRINK,
@ -452,13 +452,13 @@ gprop_general_new (char *title, char *icon_filename)
0, 0);
gtk_widget_show (gp->title);
gtk_table_attach (GTK_TABLE (table), label_new ("Icon", 0.0, 0.5),
gtk_table_attach (GTK_TABLE (table), label_new (_("Icon"), 0.0, 0.5),
0, 1, 1, 2,
GTK_FILL | GTK_SHRINK,
GTK_FILL | GTK_SHRINK,
0, 0);
gp->icon_filename = gnome_file_entry_new ("gprop_general_icon_filename", "Select icon");
gp->icon_filename = gnome_file_entry_new ("gprop_general_icon_filename", _("Select icon"));
entry = gnome_file_entry_gtk_entry (GNOME_FILE_ENTRY (gp->icon_filename));
gtk_entry_set_text (GTK_ENTRY (entry), icon_filename);
gtk_table_attach (GTK_TABLE (table), gp->icon_filename,

View File

@ -306,7 +306,8 @@ panel_action_open_with (GtkWidget *widget, WPanel *panel)
{
char *command;
command = input_expand_dialog (" Open with...", "Enter extra arguments:", panel->dir.list [panel->selected].fname);
command = input_expand_dialog (_(" Open with..."),
_("Enter extra arguments:"), panel->dir.list [panel->selected].fname);
execute (command);
free (command);
}
@ -340,16 +341,16 @@ static struct {
int flags;
context_menu_callback callback;
} file_actions [] = {
{ "Properties", F_SINGLE, panel_action_properties },
{ "", F_SINGLE, NULL },
{ "Open", F_ALL, panel_action_open },
{ "Open with", F_ALL, panel_action_open_with },
{ "View", F_ALL, panel_action_view },
{ "View unfiltered", F_ALL, panel_action_view_unfiltered },
{ "", 0, NULL },
{ "Link...", F_REGULAR | F_SINGLE, (context_menu_callback) link_cmd },
{ "Symlink...", F_SINGLE, (context_menu_callback) symlink_cmd },
{ "Edit symlink...", F_SYMLINK, (context_menu_callback) edit_symlink_cmd },
{ N_("Properties"), F_SINGLE, panel_action_properties },
{ "", F_SINGLE, NULL },
{ N_("Open"), F_ALL, panel_action_open },
{ N_("Open with"), F_ALL, panel_action_open_with },
{ N_("View"), F_ALL, panel_action_view },
{ N_("View unfiltered"), F_ALL, panel_action_view_unfiltered },
{ "", 0, NULL },
{ N_("Link..."), F_REGULAR | F_SINGLE, (context_menu_callback) link_cmd },
{ N_("Symlink..."), F_SINGLE, (context_menu_callback) symlink_cmd },
{ N_("Edit symlink..."), F_SYMLINK, (context_menu_callback) edit_symlink_cmd },
{ NULL, 0, NULL },
};
@ -357,9 +358,9 @@ static struct {
char *text;
context_menu_callback callback;
} common_actions [] = {
{ "Copy...", (context_menu_callback) copy_cmd },
{ "Rename/move..", (context_menu_callback) ren_cmd },
{ "Delete...", (context_menu_callback) delete_cmd },
{ N_("Copy..."), (context_menu_callback) copy_cmd },
{ N_("Rename/move.."), (context_menu_callback) ren_cmd },
{ N_("Delete..."), (context_menu_callback) delete_cmd },
{ NULL, NULL }
};
@ -406,7 +407,7 @@ create_popup_submenu (WPanel *panel, int row, char *filename)
}
}
if (*file_actions [i].text)
item = gtk_menu_item_new_with_label (file_actions [i].text);
item = gtk_menu_item_new_with_label (_(file_actions [i].text));
else
item = gtk_menu_item_new ();
@ -451,7 +452,7 @@ file_popup_add_context (GtkMenu *menu, WPanel *panel, char *filename)
for (i = 0; common_actions [i].text; i++){
GtkWidget *item;
item = gtk_menu_item_new_with_label (common_actions [i].text);
item = gtk_menu_item_new_with_label (_(common_actions [i].text));
gtk_widget_show (item);
gtk_signal_connect (GTK_OBJECT (item), "activate",
GTK_SIGNAL_FUNC (common_actions [i].callback), panel);
@ -939,40 +940,40 @@ static struct filter_item {
char *text;
char *glob;
} filter_items [] = {
{ "All files",
{ N_("All files"),
"*" },
{ "Archives and compressed files",
{ N_("Archives and compressed files"),
"*.(tar|gz|tgz|taz|zip|lha|zoo|pak|sit|arc|arj|rar|huf|lzh)" },
{ "RPM/DEB files",
{ N_("RPM/DEB files"),
"*.(rpm|deb)" },
{ "Text/Document files",
{ N_("Text/Document files"),
"*.(txt|tex|doc|rtf)" },
{ "HTML and SGML files",
{ N_("HTML and SGML files"),
"*.(html|htm|sgml|sgm)" },
{ "Postscript and PDF files",
{ N_("Postscript and PDF files"),
"*.(ps|pdf)" },
{ "Spreadsheet files",
{ N_("Spreadsheet files"),
"*.(xls|wks|wk1)" },
{ "Image files",
{ N_("Image files"),
"*.(png|jpg|jpeg|xcf|gif|tif|tiff|xbm|xpm|pbm|pgm|ppm|tga|rgb|iff|lbm|ilbm|"
"bmp|pcx|pic|pict|psd|gbr|pat|ico|fig|cgm|rle|fits)" },
{ "Video/animation files",
{ N_("Video/animation files"),
"*.(mpg|mpeg|mov|avi|fli|flc|flh|flx|dl)" },
{ "Audio files",
{ N_("Audio files"),
"*.(au|wav|mp3|snd|mod|s3m|ra)" },
{ "C program files",
{ N_("C program files"),
"*.[ch]" },
{ "C++ program files",
{ N_("C++ program files"),
"*.(cc|C|cpp|cxx|h|H)" },
{ "Objective-C program files",
{ N_("Objective-C program files"),
"*.[mh]" },
{ "Scheme program files",
{ N_("Scheme program files"),
"*.scm" },
{ "Assembler program files",
{ N_("Assembler program files"),
"*.(s|S|asm)" },
{ "Misc. program files",
{ N_("Misc. program files"),
"*.(awk|sed|lex|l|y|sh|idl|pl|py|am|in|f|el|bas|pas|java|sl|p|m4|tcl|pov)" },
{ "Font files",
{ N_("Font files"),
"*.(pfa|pfb|afm|ttf|fon|pcf|pcf.gz|spd)" }
};
@ -1031,7 +1032,7 @@ build_filter_menu (WPanel *panel, GtkWidget *button)
gtk_object_set_user_data (GTK_OBJECT (filter_menu), button);
for (i = 0; i < ELEMENTS (filter_items); i++) {
item = gtk_menu_item_new_with_label (filter_items[i].text);
item = gtk_menu_item_new_with_label (_(filter_items[i].text));
gtk_object_set_user_data (GTK_OBJECT (item), &filter_items[i]);
gtk_signal_connect (GTK_OBJECT (item), "select",
@ -1097,7 +1098,7 @@ display_mini_info (WPanel *panel)
GtkLabel *label = GTK_LABEL (panel->ministatus);
if (panel->searching){
char *str = copy_strings ("Search: ", panel->search_buffer, NULL);
char *str = copy_strings (N_("Search: "), panel->search_buffer, NULL);
gtk_clip_label_set (label, str);
free (str);
@ -1107,7 +1108,7 @@ display_mini_info (WPanel *panel)
if (panel->marked){
char buffer [120];
sprintf (buffer, " %s bytes in %d file%s",
sprintf (buffer, N_(" %s bytes in %d file%s"),
size_trunc_sep (panel->total), panel->marked,
panel->marked == 1 ? "" : "s");
@ -1131,7 +1132,7 @@ display_mini_info (WPanel *panel)
gtk_clip_label_set (label, str);
free (str);
} else
gtk_clip_label_set (label, "<readlink failed>");
gtk_clip_label_set (label, N_("<readlink failed>"));
return;
}
@ -1177,7 +1178,7 @@ panel_create_filter (Dlg_head *h, WPanel *panel, void **filter_w)
gtk_box_pack_start (GTK_BOX (ihbox), arrow, TRUE, TRUE, 0);
gtk_widget_show (arrow);
label = gtk_label_new ("Filter");
label = gtk_label_new (N_("Filter"));
gtk_box_pack_start (GTK_BOX (ihbox), label, TRUE, TRUE, 0);
gtk_widget_show (label);
@ -1255,7 +1256,7 @@ x_create_panel (Dlg_head *h, widget_data parent, WPanel *panel)
/* Now, insert our table in our parent */
gtk_container_add (GTK_CONTAINER (vbox), panel->table);
gtk_widget_show_all (panel->table);
gtk_widget_show_all (gtk_widget_get_toplevel (panel->table));
if (!pixmaps_ready){
if (!GTK_WIDGET_REALIZED (panel->list))

View File

@ -115,6 +115,9 @@ Dlg_head *message (int error, char *header, char *text, ...)
va_list args;
char buffer [4096];
Dlg_head *d;
if (header == MSG_ERROR)
header = _("Error");
/* Setup the display information */
strcpy (buffer, "\n");
@ -123,7 +126,7 @@ Dlg_head *message (int error, char *header, char *text, ...)
strcat (buffer, "\n");
va_end (args);
query_dialog (header, buffer, error, 1, "&Ok");
query_dialog (header, buffer, error, 1, _("&Ok"));
d = last_query_dlg;
if (error & D_INSERT){

View File

@ -81,12 +81,12 @@ view_status (WView *view)
char buffer [80];
if (view->hex_mode)
sprintf (buffer, "Offset 0x%08x", view->edit_cursor);
sprintf (buffer, _("Offset 0x%08x"), view->edit_cursor);
else
sprintf (buffer, "Col %d", -view->start_col);
sprintf (buffer, _("Col %d"), -view->start_col);
gtk_label_set (GTK_LABEL (view->gtk_offset), buffer);
sprintf (buffer, "%s bytes", size_trunc (view->s.st_size));
sprintf (buffer, _("%s bytes"), size_trunc (view->s.st_size));
gtk_label_set (GTK_LABEL (view->gtk_bytes), buffer);
if (view->hex_mode)
@ -150,17 +150,6 @@ gnome_view_callback (struct Dlg_head *h, int id, int msg)
return default_dlg_callback (h, id, msg);
}
static GtkWidget *
my_test (void)
{
GtkWidget *frame;
frame = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
gtk_container_add (GTK_CONTAINER (frame), gtk_label_new ("Hello Wordl!"));
return frame;
}
static GtkWidget *
prepare_status (GtkWidget *s)
{
@ -261,39 +250,39 @@ gnome_monitor (GtkWidget *widget, WView *view)
}
GnomeUIInfo gview_file_menu [] = {
GNOMEUIINFO_ITEM ("Goto line", "Jump to a specified line number", &gnome_goto_line, NULL),
GNOMEUIINFO_ITEM ("Monitor file", "Monitor file growing", &gnome_monitor, NULL),
GNOMEUIINFO_ITEM ("Quit", "Terminate the viewer", &gview_quit, NULL),
GNOMEUIINFO_ITEM (N_("Goto line"), N_("Jump to a specified line number"), &gnome_goto_line, NULL),
GNOMEUIINFO_ITEM (N_("Monitor file"), N_("Monitor file growing"), &gnome_monitor, NULL),
GNOMEUIINFO_ITEM (N_("Quit"), N_("Terminate the viewer"), &gview_quit, NULL),
{ GNOME_APP_UI_ENDOFINFO, 0, 0 }
};
GnomeUIInfo gview_search_menu [] = {
GNOMEUIINFO_ITEM ("Search", "String search", gnome_normal_search_cmd, NULL),
GNOMEUIINFO_ITEM ("Regexp search", "Regular expression search", gnome_regexp_search_cmd, NULL),
GNOMEUIINFO_SEPARATOR,
GNOMEUIINFO_ITEM ("Search again...", "Continue searching", gnome_continue_search, NULL),
GNOMEUIINFO_ITEM (N_("Search"), N_("String search"), gnome_normal_search_cmd, NULL),
GNOMEUIINFO_ITEM (N_("Regexp search"), N_("Regular expression search"), gnome_regexp_search_cmd, NULL),
GNOMEUIINFO_SEPARATOR,
GNOMEUIINFO_ITEM (N_("Search again..."), N_("Continue searching"), gnome_continue_search, NULL),
{ GNOME_APP_UI_ENDOFINFO, 0, 0 }
};
GnomeUIInfo gview_mode_menu [] = {
#define WRAP_POS 0
GNOMEUIINFO_TOGGLEITEM ("Wrap", "Wrap the text", gnome_toggle_wrap, NULL),
GNOMEUIINFO_TOGGLEITEM (N_("Wrap"), N_("Wrap the text"), gnome_toggle_wrap, NULL),
#if 0
/* Can not use this one yet, as it destroys the viewer, need to fix that */
GNOMEUIINFO_TOGGLEITEM ("Parsed view", NULL, gnome_toggle_parse, NULL),
#endif
#define FORMAT_POS 1
GNOMEUIINFO_TOGGLEITEM ("Formatted", NULL, gnome_toggle_format, NULL),
GNOMEUIINFO_TOGGLEITEM (N_("Formatted"), NULL, gnome_toggle_format, NULL),
#define HEX_POS 2
GNOMEUIINFO_TOGGLEITEM ("Hex", NULL, gnome_toggle_hex, NULL),
GNOMEUIINFO_TOGGLEITEM (N_("Hex"), NULL, gnome_toggle_hex, NULL),
{ GNOME_APP_UI_ENDOFINFO, 0, 0 }
};
GnomeUIInfo gview_top_menu [] = {
{ GNOME_APP_UI_SUBTREE, "File", NULL, &gview_file_menu },
{ GNOME_APP_UI_SUBTREE, "Search", NULL, &gview_search_menu },
{ GNOME_APP_UI_SUBTREE, "Mode", NULL, &gview_mode_menu },
{ GNOME_APP_UI_SUBTREE, N_("File"), NULL, &gview_file_menu },
{ GNOME_APP_UI_SUBTREE, N_("Search"), NULL, &gview_search_menu },
{ GNOME_APP_UI_SUBTREE, N_("Mode"), NULL, &gview_mode_menu },
{ GNOME_APP_UI_ENDOFINFO, 0, 0 }
};

View File

@ -83,19 +83,19 @@ x_create_button (Dlg_head *h, widget_data parent, WButton *b)
char *stock;
int tag;
if (strcasecmp (b->text, "ok") == 0)
if (strcasecmp (b->text, _("ok")) == 0)
stock = GNOME_STOCK_BUTTON_OK;
else if (strcasecmp (b->text, "cancel") == 0)
else if (strcasecmp (b->text, _("cancel")) == 0)
stock = GNOME_STOCK_BUTTON_CANCEL;
else if (strcasecmp (b->text, "help") == 0)
else if (strcasecmp (b->text, _("help")) == 0)
stock = GNOME_STOCK_BUTTON_HELP;
else if (strcasecmp (b->text, "yes") == 0)
else if (strcasecmp (b->text, _("yes")) == 0)
stock = GNOME_STOCK_BUTTON_YES;
else if (strcasecmp (b->text, "no") == 0)
else if (strcasecmp (b->text, _("no")) == 0)
stock = GNOME_STOCK_BUTTON_NO;
else if (strcasecmp (b->text, "exit") == 0)
else if (strcasecmp (b->text, _("exit")) == 0)
stock = GNOME_STOCK_BUTTON_CLOSE;
else if (strcasecmp (b->text, "abort") == 0)
else if (strcasecmp (b->text, _("abort")) == 0)
stock = GNOME_STOCK_BUTTON_CANCEL;
else
stock = 0;
@ -307,7 +307,6 @@ listbox_select (GtkWidget *widget, int row, int column, GdkEvent *event, WListbo
}
if (event->type == GDK_2BUTTON_PRESS){
printf ("Activando\n");
switch (l->action){
case listbox_nothing:
break;

40
mkinstalldirs Executable file
View File

@ -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$
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

9
po/.cvsignore Normal file
View File

@ -0,0 +1,9 @@
*.gmo
*.mo
Makefile
Makefile.in
POTFILES
cat-id-tbl.c
mc.pot
stamp-cat-id

View File

@ -6,7 +6,47 @@ edit/editcmd.c
edit/editmenu.c
edit/editoptions.c
edit/editwidget.c
src/fixhlp.c
src/achown.c
src/background.c
src/boxes.c
src/chmod.c
src/chown.c
src/cmd.c
src/command.c
src/dialog.c
src/dir.c
src/ext.c
src/file.c
src/find.c
src/fixhlp.c
src/help.c
src/hotlist.c
src/info.c
src/layout.c
src/learn.c
src/main.c
src/menu.c
src/option.c
src/panelize.c
src/screen.c
src/subshell.c
src/tree.c
src/user.c
src/util.c
src/utilunix.c
src/view.c
src/win.c
src/wtools.c
gnome/gcmd.c
gnome/gdesktop.c
gnome/glayout.c
gnome/gprop.c
gnome/gscreen.c
gnome/gtools.c
gnome/gview.c
gnome/gwidget.c

3974
po/es.po Normal file

File diff suppressed because it is too large Load Diff

3836
po/mc.pot Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,10 @@
1998-03-24 Miguel de Icaza <miguel@nuclecu.unam.mx>
* All over the src/ directory: Internationalization changes.
* background.c: Avoid buffer over-runs and reduce number of
internationalization strings.
Mon Mar 23 14:04:07 1998 Philippe De Muyter <phdm@macqel.be>
* configure.in (nlink_t): Check it using AC_CHECK_TYPE.

View File

@ -32,7 +32,7 @@ HDRS = color.h file.h mouse.h user.h dialog.h find.h main.h \
hotlist.h layout.h fsusage.h mountlist.h regex.h complete.h \
myslang.h command.h cmd.h tty.h fs.h panelize.h achown.h \
learn.h listmode.h features.inc background.h dirhist.h \
x.h popt.h textconf.h
x.h popt.h textconf.h i18n.h
OBJS = dir.o util.o screen.o dialog.o key.o menu.o\
file.o win.o color.o help.o find.o profile.o user.o view.o \
@ -94,8 +94,8 @@ cross:
$(MAKE) CC=gcc-linux CPP="gcc-linux -E" \
CPPFLAGS="$(CPPFLAGS) -I/usr/local/lib/gcc-lib/i386-linux-linux/include/ncurses "
$(srcdir)/mc.hlp: ync.hlp $(datadir)/xnc.hlp $(srcdir)/gindex.pl
cat ync.hlp $(datadir)/xnc.hlp | $(srcdir)/gindex.pl > $(srcdir)/mc.hlp
$(srcdir)/mc.hlp: ync.hlp $(mclibdir)/xnc.hlp $(srcdir)/gindex.pl
cat ync.hlp $(mclibdir)/xnc.hlp | $(srcdir)/gindex.pl > $(srcdir)/mc.hlp
ync.hlp: $(docdir)/mc.1.in man2hlp
./man2hlp 58 $(docdir)/mc.1.in > ync.hlp

View File

@ -69,10 +69,10 @@ struct {
int ret_cmd, flags, y, x;
char *text;
} chown_advanced_but [BUTTONS] = {
{ B_CANCEL, NORMAL_BUTTON, 4, 55, "&Cancel" },
{ B_ENTER, DEFPUSH_BUTTON,4, 45, "&Set" },
{ B_SKIP, NORMAL_BUTTON, 4, 36, "S&kip" },
{ B_SETALL, NORMAL_BUTTON, 4, 24, "Set &all"},
{ B_CANCEL, NORMAL_BUTTON, 4, 55, N_("&Cancel") },
{ B_ENTER, DEFPUSH_BUTTON,4, 45, N_("&Set") },
{ B_SKIP, NORMAL_BUTTON, 4, 36, N_("S&kip") },
{ B_SETALL, NORMAL_BUTTON, 4, 24, N_("Set &all")},
{ B_ENTER, NARROW_BUTTON, 0, 47, " "},
{ B_ENTER, NARROW_BUTTON, 0, 29, " "},
{ B_ENTER, NARROW_BUTTON, 0, 19, " "},
@ -347,28 +347,28 @@ static void chown_refresh (void)
draw_box (ch_dlg, 1, 2, 11, 70);
dlg_move (ch_dlg, BY - 1, 8);
addstr ("owner");
addstr (_("owner"));
dlg_move (ch_dlg, BY - 1, 16);
addstr ("group");
addstr (_("group"));
dlg_move (ch_dlg, BY - 1, 24);
addstr ("other");
addstr (_("other"));
dlg_move (ch_dlg, BY - 1, 35);
addstr ("owner");
addstr (_("owner"));
dlg_move (ch_dlg, BY - 1, 53);
addstr ("group");
addstr (_("group"));
dlg_move (ch_dlg, 3, 4);
addstr ("On");
addstr (_("On"));
dlg_move (ch_dlg, BY + 1, 4);
addstr ("Flag");
addstr (_("Flag"));
dlg_move (ch_dlg, BY + 2, 4);
addstr ("Mode");
addstr (_("Mode"));
if (!single_set){
dlg_move (ch_dlg, 3, 54);
printw ("%6d of %d", files_on_begin - (cpanel->marked) + 1,
printw (_("%6d of %d"), files_on_begin - (cpanel->marked) + 1,
files_on_begin);
}
@ -376,7 +376,7 @@ static void chown_refresh (void)
attrset (COLOR_HOT_NORMAL);
dlg_move (ch_dlg, 1, 24);
addstr (" Chown advanced command ");
addstr (_(" Chown advanced command "));
}
static void chown_info_update ()
@ -610,12 +610,12 @@ static void apply_advanced_chowns (struct stat *sf)
fname = cpanel->dir.list[current_file].fname;
need_update = end_chown = 1;
if (mc_chmod (fname, get_mode ()) == -1)
message (1, " Error ", " Couldn't chmod \"%s\" \n %s ",
message (1, MSG_ERROR, _(" Couldn't chmod \"%s\" \n %s "),
fname, unix_error_string (errno));
/* call mc_chown only, if mc_chmod didn't fail */
else if (mc_chown (fname, (ch_flags[9] == '+') ? sf->st_uid : -1,
(ch_flags[10] == '+') ? sf->st_gid : -1) == -1)
message (1, " Error ", " Couldn't chown \"%s\" \n %s ",
message (1, MSG_ERROR, _(" Couldn't chown \"%s\" \n %s "),
fname, unix_error_string (errno));
do_file_mark (cpanel, current_file, 0);
@ -626,11 +626,11 @@ static void apply_advanced_chowns (struct stat *sf)
break;
ch_cmode = sf->st_mode;
if (mc_chmod (fname, get_mode ()) == -1)
message (1, " Error ", " Couldn't chmod \"%s\" \n %s ",
message (1, MSG_ERROR, _(" Couldn't chmod \"%s\" \n %s "),
fname, unix_error_string (errno));
/* call mc_chown only, if mc_chmod didn't fail */
else if (mc_chown (fname, (ch_flags[9] == '+') ? a_uid : -1, (ch_flags[10] == '+') ? a_gid : -1) == -1)
message (1, " Error ", " Couldn't chown \"%s\" \n %s ",
message (1, MSG_ERROR, _(" Couldn't chown \"%s\" \n %s "),
fname, unix_error_string (errno));
do_file_mark (cpanel, current_file, 0);
@ -644,12 +644,12 @@ void chown_advanced_cmd (void)
if (!vfs_current_is_local ()) {
if (vfs_current_is_extfs ()) {
message (1, " Oops... ",
" I can't run the Advanced Chown command on an extfs ");
message (1, _(" Oops... "),
_(" I can't run the Advanced Chown command on an extfs "));
return;
} else if (vfs_current_is_tarfs ()) {
message (1, " Oops... ",
" I can't run the Advanced Chown command on a tarfs ");
message (1, _(" Oops... "),
_(" I can't run the Advanced Chown command on a tarfs "));
return;
}
}
@ -683,11 +683,11 @@ void chown_advanced_cmd (void)
case B_ENTER:
need_update = 1;
if (mc_chmod (fname, get_mode ()) == -1)
message (1, " Error ", " Couldn't chmod \"%s\" \n %s ",
message (1, MSG_ERROR, _(" Couldn't chmod \"%s\" \n %s "),
fname, unix_error_string (errno));
/* call mc_chown only, if mc_chmod didn't fail */
else if (mc_chown (fname, (ch_flags[9] == '+') ? sf_stat->st_uid : -1, (ch_flags[10] == '+') ? sf_stat->st_gid : -1) == -1)
message (1, " Error ", " Couldn't chown \"%s\" \n %s ",
message (1, MSG_ERROR, _(" Couldn't chown \"%s\" \n %s "),
fname, unix_error_string (errno));
break;
case B_SETALL:

View File

@ -173,44 +173,61 @@ do_background (char *info)
}
}
char *
background_title (char *str)
{
char *result = copy_strings (_("Background process:"), str, NULL);
return result;
}
/* {{{ Routines that do the real job */
void
real_message_1s (enum OperationMode mode, int *flags, char *title, char *str1)
{
char tmp[1024];
char *full_title;
if (mode == Background)
full_title = background_title (title);
else
full_title = title;
if (mode == Background) {
strcpy (tmp, " Background process:");
strcat (tmp, title);
title = tmp;
}
message (*flags, title, str1);
if (title != full_title)
free (full_title);
}
void
real_message_2s (enum OperationMode mode, int *flags, char *title, char *str1, char *str2)
{
char tmp[1024];
char *full_title;
if (mode == Background)
full_title = background_title (title);
else
full_title = title;
if (mode == Background) {
strcpy (tmp, " Background process:");
strcat (tmp, title);
title = tmp;
}
message (*flags, title, str1, str2);
if (title != full_title)
free (full_title);
}
void
real_message_3s (enum OperationMode mode, int *flags, char *title, char *str1, char *str2, const char *str3)
{
char tmp[1024];
char *full_title;
if (mode == Background)
full_title = background_title (title);
else
full_title = title;
if (mode == Background) {
strcpy (tmp, " Background process:");
strcat (tmp, title);
title = tmp;
}
message (*flags, title, str1, str2, str3);
if (title != full_title)
free (full_title);
}
/* }}} */
@ -264,13 +281,14 @@ background_attention (int fd, void *xpid)
pid_t pid = (pid_t) xpid;
int bytes;
enum ReturnType type;
char *background_process_error = _(" Background process error ");
bytes = read (fd, &routine, sizeof (routine));
if (bytes < (sizeof (routine))){
if (errno == ECHILD)
message (1, " Background process error ", " Child died unexpectedly ");
message (1, background_process_error, _(" Child died unexpectedly "));
else
message (1, " Background process error ", " Unknown error in child ");
message (1, background_process_error, _(" Unknown error in child "));
unregister_task_running (pid, fd);
waitpid (pid, &status, 0);
return 0;
@ -285,9 +303,9 @@ background_attention (int fd, void *xpid)
read (fd, &argc, sizeof (argc));
if (argc > MAXCALLARGS){
message (1, " Background protocol error ",
" Background process sent us a request for more arguments \n"
" than we can handle. \n");
message (1, _(" Background protocol error "),
_(" Background process sent us a request for more arguments \n"
" than we can handle. \n"));
}
read (fd, &type, sizeof (type));

View File

@ -63,9 +63,11 @@ extern int ftpfs_always_use_proxy;
static char **displays_status;
/* Controls whether the array strings have been translated */
static int i18n_displays_flag;
static char *displays [LIST_TYPES] = {
"Full file list", "Brief file list", "Long file list",
"User:"
N_("Full file list"), N_("Brief file list"), N_("Long file list"),
N_("User:")
};
static char *formats_section = "Formats";
@ -79,7 +81,7 @@ static char *select_format (WInput *i)
Chooser *my_user_list;
WListbox *p;
my_user_list = new_chooser (DISPLAY_Y - 4, DISPLAY_X - 4, "Listing Mode...",
my_user_list = new_chooser (DISPLAY_Y - 4, DISPLAY_X - 4, _("Listing Mode..."),
CHOOSE_EDITABLE);
p = my_user_list->listbox;
p->allow_duplicates = 0;
@ -128,12 +130,12 @@ static int display_callback (struct Dlg_head *h, int id, int Msg)
attrset (COLOR_HOT_NORMAL);
dlg_move (h, 1, (DISPLAY_X-17)/2);
addstr (" Listing mode ");
addstr (_(" Listing mode "));
attrset (COLOR_NORMAL);
dlg_move (h, 11, 3);
addstr ("On input lines, use C-v to get a listbox");
addstr (_("On input lines, use C-v to get a listbox"));
dlg_move (h, 12, 3);
addstr ("with other formats");
addstr (_("with other formats"));
break;
case DLG_UNFOCUS:
@ -195,25 +197,32 @@ static void display_init (int radio_sel, char *init_text,
int _check_status, char ** _status)
{
displays_status = _status;
if (!i18n_displays_flag){
int i;
for (i = 0; i < LIST_TYPES; i++)
displays [i] = _(displays [i]);
i18n_displays_flag = 1;
}
dd = create_dlg (0, 0, DISPLAY_Y, DISPLAY_X, dialog_colors,
display_callback, "[Left and Right Menus]", "display",
DLG_CENTER | DLG_GRID);
x_set_dialog_title (dd, "Listing mode");
x_set_dialog_title (dd, _("Listing mode"));
add_widgetl (dd,
button_new (4, 32, B_CANCEL, NORMAL_BUTTON, "&Cancel", 0, 0, "cancel-button"),
button_new (4, 32, B_CANCEL, NORMAL_BUTTON, _("&Cancel"), 0, 0, "cancel-button"),
XV_WLAY_RIGHTOF);
add_widgetl (dd,
button_new (3, 32, B_ENTER, DEFPUSH_BUTTON, "&Ok", 0, 0, "ok-button"),
button_new (3, 32, B_ENTER, DEFPUSH_BUTTON, _("&Ok"), 0, 0, "ok-button"),
XV_WLAY_CENTERROW);
status = input_new (9, 8, INPUT_COLOR, 34, _status [radio_sel], "mini-input");
add_widgetl (dd, status, XV_WLAY_RIGHTDOWN);
input_set_point (status, 0);
check_status = check_new (8, 4, _check_status, "user &Mini status", "mini-status");
check_status = check_new (8, 4, _check_status, _("user &Mini status"), "mini-status");
add_widgetl (dd, check_status, XV_WLAY_NEXTROW);
user = input_new (6, 14, INPUT_COLOR, 29, init_text, "user-fmt-input");
@ -297,17 +306,17 @@ sortfn *sort_box (sortfn *sort_fn, int *reverse, int *case_sensitive)
dd = create_dlg (0, 0, SORT_Y, SORT_X, dialog_colors, common_dialog_callback,
"[Left and Right Menus]", "sort", DLG_CENTER | DLG_GRID);
x_set_dialog_title (dd, "Sort order");
x_set_dialog_title (dd, _("Sort order"));
add_widgetl (dd, button_new (8, 23, B_CANCEL, NORMAL_BUTTON, "&Cancel", 0, 0, "cancel-button"),
add_widgetl (dd, button_new (8, 23, B_CANCEL, NORMAL_BUTTON, _("&Cancel"), 0, 0, "cancel-button"),
XV_WLAY_CENTERROW);
add_widgetl (dd, button_new (7, 23, B_ENTER, DEFPUSH_BUTTON, "&Ok", 0, 0, "ok-button"),
add_widgetl (dd, button_new (7, 23, B_ENTER, DEFPUSH_BUTTON, _("&Ok"), 0, 0, "ok-button"),
XV_WLAY_RIGHTDOWN);
case_sense = check_new (4, 19, *case_sensitive, "case sensi&tive", "case-check");
case_sense = check_new (4, 19, *case_sensitive, _("case sensi&tive"), "case-check");
add_widgetl (dd, case_sense, XV_WLAY_RIGHTDOWN);
c = check_new (3, 19, *reverse, "&Reverse", "reverse-check");
c = check_new (3, 19, *reverse, _("&Reverse"), "reverse-check");
add_widgetl (dd, c, XV_WLAY_RIGHTDOWN);
for (i = SORT_TYPES-1; i >= 0; i--){
@ -340,25 +349,25 @@ static int my_execute;
static int my_exit;
static QuickWidget conf_widgets [] = {
{ quick_button, 4, 6, 4, CONFY, "&Cancel",
{ quick_button, 4, 6, 4, CONFY, N_("&Cancel"),
0, B_CANCEL, 0, 0, XV_WLAY_RIGHTOF, "c" },
{ quick_button, 4, 6, 3, CONFY, "&Ok",
{ quick_button, 4, 6, 3, CONFY, N_("&Ok"),
0, B_ENTER, 0, 0, XV_WLAY_CENTERROW, "o" },
{ quick_checkbox, 1, 13, 6, CONFY, " confirm &Exit ",
{ quick_checkbox, 1, 13, 6, CONFY, N_(" confirm &Exit "),
9, 0, &my_exit, 0, XV_WLAY_BELOWCLOSE, "e" },
{ quick_checkbox, 1, 13, 5, CONFY, " confirm e&Xecute ",
{ quick_checkbox, 1, 13, 5, CONFY, N_(" confirm e&Xecute "),
10, 0, &my_execute, 0, XV_WLAY_BELOWCLOSE, "x" },
{ quick_checkbox, 1, 13, 4, CONFY, " confirm o&Verwrite ",
{ quick_checkbox, 1, 13, 4, CONFY, N_(" confirm o&Verwrite "),
10, 0, &my_overwrite, 0, XV_WLAY_BELOWCLOSE, "ov" },
{ quick_checkbox, 1, 13, 3, CONFY, " confirm &Delete ",
{ quick_checkbox, 1, 13, 3, CONFY, N_(" confirm &Delete "),
9, 0, &my_delete, 0, XV_WLAY_BELOWCLOSE, "de" },
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, XV_WLAY_DONTCARE }
};
static QuickDialog confirmation =
{ CONFX, CONFY, -1, -1, " Confirmation ", "[Confirmation]", "quick_confirm",
conf_widgets };
{ CONFX, CONFY, -1, -1, N_(" Confirmation "), "[Confirmation]", "quick_confirm",
conf_widgets, 0 };
void confirm_box ()
{
@ -366,6 +375,7 @@ void confirm_box ()
my_overwrite = confirm_overwrite;
my_execute = confirm_execute;
my_exit = confirm_exit;
if (quick_dialog (&confirmation) != B_CANCEL){
confirm_delete = my_delete;
confirm_overwrite = my_overwrite;
@ -381,14 +391,14 @@ static int new_mode;
static int new_meta;
char *display_bits_str [] =
{ "Full 8 bits output", "ISO 8859-1", "7 bits" };
{ N_("Full 8 bits output"), N_("ISO 8859-1"), N_("7 bits") };
static QuickWidget display_widgets [] = {
{ quick_button, 4, 6, 4, DISPY, "&Cancel",
{ quick_button, 4, 6, 4, DISPY, N_("&Cancel"),
0, B_CANCEL, 0, 0, XV_WLAY_CENTERROW, "c" },
{ quick_button, 4, 6, 3, DISPY, "&Ok",
{ quick_button, 4, 6, 3, DISPY, N_("&Ok"),
0, B_ENTER, 0, 0, XV_WLAY_CENTERROW, "o" },
{ quick_checkbox, 4, DISPX, 7, DISPY, "F&ull 8 bits input",
{ quick_checkbox, 4, DISPX, 7, DISPY, N_("F&ull 8 bits input"),
0, 0, &new_meta, 0, XV_WLAY_BELOWCLOSE, "u" },
{ quick_radio, 4, DISPX, 3, DISPY, "", 3, 0,
&new_mode, display_bits_str, XV_WLAY_BELOWCLOSE, "r" },
@ -396,8 +406,8 @@ static QuickWidget display_widgets [] = {
};
static QuickDialog display_bits =
{ DISPX, DISPY, -1, -1, " Display bits ", "[Display bits]",
"dbits", display_widgets };
{ DISPX, DISPY, -1, -1, N_(" Display bits "), "[Display bits]",
"dbits", display_widgets, 0 };
void display_bits_box ()
{
@ -409,7 +419,7 @@ void display_bits_box ()
current_mode = 1;
else
current_mode = 2;
display_widgets [3].value = current_mode;
new_meta = !use_8th_bit_as_meta;
if (quick_dialog (&display_bits) != B_ENTER)
@ -523,46 +533,46 @@ static int ret_use_netrc;
#endif
char *confvfs_str [] =
{ "Always to memory", "If size less than:" };
{ N_("Always to memory"), N_("If size less than:") };
static QuickWidget confvfs_widgets [] = {
{ quick_button, 30, VFSX, VFSY - 3, VFSY, "&Cancel",
{ quick_button, 30, VFSX, VFSY - 3, VFSY, N_("&Cancel"),
0, B_CANCEL, 0, 0, XV_WLAY_RIGHTOF, "button-cancel" },
{ quick_button, 12, VFSX, VFSY - 3, VFSY, "&Ok",
{ quick_button, 12, VFSX, VFSY - 3, VFSY, N_("&Ok"),
0, B_ENTER, 0, 0, XV_WLAY_CENTERROW, "button-ok" },
#if defined(USE_NETCODE)
{ quick_input, 30, VFSX, 10, VFSY, "", 22, 0, 0, &ret_ftp_proxy,
XV_WLAY_RIGHTDOWN, "input-ftp-proxy" },
{ quick_checkbox, 4, VFSX, 10, VFSY, "&Always use ftp proxy", 0, 0,
{ quick_checkbox, 4, VFSX, 10, VFSY, N_("&Always use ftp proxy"), 0, 0,
&ftpfs_always_use_proxy, 0, XV_WLAY_RIGHTDOWN, "check-ftp-proxy" },
{ quick_label, 46, VFSX, 9, VFSY, "sec",
{ quick_label, 46, VFSX, 9, VFSY, N_("sec"),
0, 0, 0, 0, XV_WLAY_RIGHTOF, "label-sec" },
{ quick_input, 35, VFSX, 9, VFSY, "", 10, 0, 0, &ret_directory_timeout,
XV_WLAY_RIGHTDOWN, "input-timeout" },
{ quick_label, 4, VFSX, 9, VFSY, "ftpfs directory cache timeout:",
{ quick_label, 4, VFSX, 9, VFSY, N_("ftpfs directory cache timeout:"),
0, 0, 0, 0, XV_WLAY_NEXTROW, "label-cache"},
{ quick_input, 28, VFSX, 8, VFSY, "", 24, 0, 0, &ret_passwd,
XV_WLAY_RIGHTDOWN, "input-passwd" },
{ quick_label, 4, VFSX, 8, VFSY, "ftp anonymous password:",
{ quick_label, 4, VFSX, 8, VFSY, N_("ftp anonymous password:"),
0, 0, 0, 0, XV_WLAY_NEXTROW, "label-pass"},
#endif
{ quick_input, 26, VFSX, 6, VFSY, "", 10, 0, 0, &ret_limit,
XV_WLAY_RIGHTDOWN, "input-limit" },
{ quick_radio, 4, VFSX, 5, VFSY, "", 2, 0,
&vfs_use_limit, confvfs_str, XV_WLAY_BELOWCLOSE, "radio" },
{ quick_label, 4, VFSX, 4, VFSY, "Gzipped tar archive extract:",
{ quick_label, 4, VFSX, 4, VFSY, N_("Gzipped tar archive extract:"),
0, 0, 0, 0, XV_WLAY_NEXTROW, "label-tar" },
{ quick_label, 46, VFSX, 3, VFSY, "sec",
0, 0, 0, 0, XV_WLAY_RIGHTOF, "label-sec2" },
{ quick_input, 35, VFSX, 3, VFSY, "", 10, 0, 0, &ret_timeout,
XV_WLAY_RIGHTOF, "input-timo-vfs" },
{ quick_label, 4, VFSX, 3, VFSY, "Timeout for freeing VFSs:",
{ quick_label, 4, VFSX, 3, VFSY, N_("Timeout for freeing VFSs:"),
0, 0, 0, 0, XV_WLAY_BELOWCLOSE, "label-vfs" },
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, XV_WLAY_DONTCARE, 0 }
};
static QuickDialog confvfs_dlg =
{ VFSX, VFSY, -1, -1, " Virtual File System Setting ", "[Virtual FS]", "quick_vfs", confvfs_widgets };
{ VFSX, VFSY, -1, -1, N_(" Virtual File System Setting "), "[Virtual FS]", "quick_vfs", confvfs_widgets, 0 };
#if defined(USE_NETCODE)
#define VFS_WIDGETBASE 7
@ -647,8 +657,8 @@ char *cd_dialog (void)
QuickWidget quick_widgets [] = {
#ifdef HAVE_TK
#define INPUT_INDEX 2
{ quick_button, 0, 1, 0, 1, "&Cancel", 0, B_CANCEL, 0, 0, XV_WLAY_DONTCARE, "cancel" },
{ quick_button, 0, 1, 0, 1, "&Ok", 0, B_ENTER, 0, 0, XV_WLAY_DONTCARE, "ok" },
{ quick_button, 0, 1, 0, 1, N_("&Cancel"), 0, B_CANCEL, 0, 0, XV_WLAY_DONTCARE, "cancel" },
{ quick_button, 0, 1, 0, 1, N_("&Ok"), 0, B_ENTER, 0, 0, XV_WLAY_DONTCARE, "ok" },
#else
#define INPUT_INDEX 0
#endif
@ -662,6 +672,7 @@ char *cd_dialog (void)
Quick_input.title = "Quick cd";
Quick_input.help = "[Quick cd]";
Quick_input.class = "quick_input";
Quick_input.i18n = 0;
quick_widgets [INPUT_INDEX].text = "";
quick_widgets [INPUT_INDEX].value = 2; /* want cd like completion */
quick_widgets [INPUT_INDEX+1].text = "cd";
@ -688,9 +699,9 @@ void symlink_dialog (char *existing, char *new, char **ret_existing,
#undef INPUT_INDEX
#if defined(HAVE_TK) || defined(HAVE_GNOME)
#define INPUT_INDEX 2
{ quick_button, 0, 1, 0, 1, "&Cancel", 0, B_CANCEL, 0, 0,
{ quick_button, 0, 1, 0, 1, _("&Cancel"), 0, B_CANCEL, 0, 0,
XV_WLAY_DONTCARE, "cancel" },
{ quick_button, 0, 1, 0, 1, "&Ok", 0, B_ENTER, 0, 0,
{ quick_button, 0, 1, 0, 1, _("&Ok"), 0, B_ENTER, 0, 0,
XV_WLAY_DONTCARE, "ok" },
#else
#define INPUT_INDEX 0
@ -706,10 +717,11 @@ void symlink_dialog (char *existing, char *new, char **ret_existing,
Quick_input.title = "Symbolic link";
Quick_input.help = "[File Menu]";
Quick_input.class = "quick_symlink";
Quick_input.i18n = 0;
quick_widgets [INPUT_INDEX].text = new;
quick_widgets [INPUT_INDEX+1].text = "Symbolic link filename:";
quick_widgets [INPUT_INDEX+1].text = _("Symbolic link filename:");
quick_widgets [INPUT_INDEX+2].text = existing;
quick_widgets [INPUT_INDEX+3].text = "Existing filename (filename symlink will point to):";
quick_widgets [INPUT_INDEX+3].text = _("Existing filename (filename symlink will point to):");
Quick_input.xpos = -1;
quick_widgets [INPUT_INDEX].str_result = ret_new;
quick_widgets [INPUT_INDEX+2].str_result = ret_existing;
@ -734,9 +746,14 @@ static Dlg_head *jobs_dlg;
static void
jobs_fill_listbox (void)
{
char *state_str [] = { "Running ", "Stopped" };
static char *state_str [2];
TaskList *tl = task_list;
if (!state_str [0]){
state_str [0] = _("Running ");
state_str [1] = _("Stopped");
}
while (tl){
char *s;
@ -788,18 +805,18 @@ jobs_cmd (void)
jobs_dlg = create_dlg (0, 0, JOBS_Y, JOBS_X, dialog_colors,
common_dialog_callback, "[Background jobs]", "jobs",
DLG_CENTER | DLG_GRID);
x_set_dialog_title (jobs_dlg, "Background Jobs");
x_set_dialog_title (jobs_dlg, _("Background Jobs"));
bg_list = listbox_new (2, 3, JOBS_X-7, JOBS_Y-9, listbox_nothing, 0, "listbox");
add_widget (jobs_dlg, bg_list);
add_widget (jobs_dlg,
button_new (JOBS_Y-4, 35, B_CANCEL, NORMAL_BUTTON, "&Ok", 0, 0, "button-ok"));
button_new (JOBS_Y-4, 35, B_CANCEL, NORMAL_BUTTON, _("&Ok"), 0, 0, "button-ok"));
add_widget (jobs_dlg,
button_new (JOBS_Y-4, 23, B_KILL, NORMAL_BUTTON, "&Kill", task_cb, 0, "button-kill"));
button_new (JOBS_Y-4, 23, B_KILL, NORMAL_BUTTON, _("&Kill"), task_cb, 0, "button-kill"));
add_widget (jobs_dlg,
button_new (JOBS_Y-4, 12, B_RESUME, NORMAL_BUTTON, "&Resume", task_cb, 0, "button-cont"));
button_new (JOBS_Y-4, 12, B_RESUME, NORMAL_BUTTON, _("&Resume"), task_cb, 0, "button-cont"));
add_widget (jobs_dlg,
button_new (JOBS_Y-4, 3, B_STOP, NORMAL_BUTTON, "&Stop", task_cb, 0, "button-stop"));
button_new (JOBS_Y-4, 3, B_STOP, NORMAL_BUTTON, _("&Stop"), task_cb, 0, "button-stop"));
/* Insert all of task information in the list */

View File

@ -93,18 +93,18 @@ struct {
WCheck *check;
} check_perm[PERMISSIONS] =
{
{ S_IXOTH, "execute/search by others", 0, 0, },
{ S_IWOTH, "write by others", 0, 0, },
{ S_IROTH, "read by others", 0, 0, },
{ S_IXGRP, "execute/search by group", 0, 0, },
{ S_IWGRP, "write by group", 0, 0, },
{ S_IRGRP, "read by group", 0, 0, },
{ S_IXUSR, "execute/search by owner", 0, 0, },
{ S_IWUSR, "write by owner", 0, 0, },
{ S_IRUSR, "read by owner", 0, 0, },
{ S_ISVTX, "sticky bit", 0, 0, },
{ S_ISGID, "set group ID on execution", 0, 0, },
{ S_ISUID, "set user ID on execution", 0, 0, },
{ S_IXOTH, N_("execute/search by others"), 0, 0, },
{ S_IWOTH, N_("write by others"), 0, 0, },
{ S_IROTH, N_("read by others"), 0, 0, },
{ S_IXGRP, N_("execute/search by group"), 0, 0, },
{ S_IWGRP, N_("write by group"), 0, 0, },
{ S_IRGRP, N_("read by group"), 0, 0, },
{ S_IXUSR, N_("execute/search by owner"), 0, 0, },
{ S_IWUSR, N_("write by owner"), 0, 0, },
{ S_IRUSR, N_("read by owner"), 0, 0, },
{ S_ISVTX, N_("sticky bit"), 0, 0, },
{ S_ISGID, N_("set group ID on execution"), 0, 0, },
{ S_ISUID, N_("set user ID on execution"), 0, 0, },
};
struct {
@ -112,12 +112,12 @@ struct {
char *text;
} chmod_but[BUTTONS] =
{
{ B_CANCEL, NORMAL_BUTTON, 2, 33, "&Cancel" },
{ B_ENTER, DEFPUSH_BUTTON, 2, 17, "&Set" },
{ B_CLRMRK, NORMAL_BUTTON, 0, 42, "C&lear marked" },
{ B_SETMRK, NORMAL_BUTTON, 0, 27, "S&et marked" },
{ B_MARKED, NORMAL_BUTTON, 0, 12, "&Marked all" },
{ B_ALL, NORMAL_BUTTON, 0, 0, "Set &all" },
{ B_CANCEL, NORMAL_BUTTON, 2, 33, N_("&Cancel") },
{ B_ENTER, DEFPUSH_BUTTON, 2, 17, N_("&Set") },
{ B_CLRMRK, NORMAL_BUTTON, 0, 42, N_("C&lear marked") },
{ B_SETMRK, NORMAL_BUTTON, 0, 27, N_("S&et marked") },
{ B_MARKED, NORMAL_BUTTON, 0, 12, N_("&Marked all") },
{ B_ALL, NORMAL_BUTTON, 0, 0, N_("Set &all") },
};
#ifdef HAVE_X
@ -157,32 +157,32 @@ static void chmod_refresh (void)
draw_box (ch_dlg, FY, FX, 10, 25);
dlg_move (ch_dlg, FY + 1, FX + 2);
addstr ("Name");
addstr (_("Name"));
dlg_move (ch_dlg, FY + 3, FX + 2);
addstr ("Permissions (Octal)");
addstr (_("Permissions (Octal)"));
dlg_move (ch_dlg, FY + 5, FX + 2);
addstr ("Owner name");
addstr (_("Owner name"));
dlg_move (ch_dlg, FY + 7, FX + 2);
addstr ("Group name");
addstr (_("Group name"));
attrset (title_color);
dlg_move (ch_dlg, 1, 28);
addstr (" Chmod command ");
addstr (_(" Chmod command "));
dlg_move (ch_dlg, PY, PX + 1);
addstr (" Permission ");
addstr (_(" Permission "));
dlg_move (ch_dlg, FY, FX + 1);
addstr (" File ");
addstr (_(" File "));
attrset (selection_color);
dlg_move (ch_dlg, TY, TX);
addstr ("Use SPACE to change");
addstr (_("Use SPACE to change"));
dlg_move (ch_dlg, TY + 1, TX);
addstr ("an option, ARROW KEYS");
addstr (_("an option, ARROW KEYS"));
dlg_move (ch_dlg, TY + 2, TX);
addstr ("to move between options");
addstr (_("to move between options"));
dlg_move (ch_dlg, TY + 3, TX);
addstr ("and T or INS to mark");
addstr (_("and T or INS to mark"));
}
#endif
@ -240,10 +240,10 @@ static void init_chmod (void)
ch_dlg = create_dlg (0, 0, 22 - single_set, 70, dialog_colors,
chmod_callback, "[Chmod]", "chmod", DLG_CENTER);
x_set_dialog_title (ch_dlg, "Chmod command");
x_set_dialog_title (ch_dlg, _("Chmod command"));
#define XTRACT(i) BY+chmod_but[i].y-single_set, BX+chmod_but[i].x, \
chmod_but[i].ret_cmd, chmod_but[i].flags, chmod_but[i].text, 0, 0, NULL
chmod_but[i].ret_cmd, chmod_but[i].flags, _(chmod_but[i].text), 0, 0, NULL
tk_new_frame (ch_dlg, "b.");
for (i = 0; i < BUTTONS; i++) {
@ -254,7 +254,7 @@ static void init_chmod (void)
}
#define XTRACT2(i) 0, check_perm [i].text, NULL
#define XTRACT2(i) 0, _(check_perm [i].text), NULL
tk_new_frame (ch_dlg, "c.");
for (i = 0; i < PERMISSIONS; i++) {
check_perm[i].check = check_new (PY + (PERMISSIONS - i), PX + 2,
@ -294,7 +294,7 @@ static void do_chmod (struct stat *sf)
sf->st_mode &= and_mask;
sf->st_mode |= or_mask;
if (mc_chmod (cpanel->dir.list [c_file].fname, sf->st_mode) == -1)
message (1, " Error ", " Couldn't chmod \"%s\" \n %s ",
message (1, MSG_ERROR, _(" Couldn't chmod \"%s\" \n %s "),
cpanel->dir.list [c_file].fname, unix_error_string (errno));
do_file_mark (cpanel, c_file, 0);
@ -326,12 +326,12 @@ void chmod_cmd (void)
if (!vfs_current_is_local ()) {
if (vfs_current_is_extfs ()) {
message (1, " Oops... ",
" I can't run the Chmod command on an extfs ");
message (1, _(" Oops... "),
_(" I can't run the Chmod command on an extfs "));
return;
} else if (vfs_current_is_tarfs ()) {
message (1, " Oops... ",
" I can't run the Chmod command on a tarfs ");
message (1, _(" Oops... "),
(" I can't run the Chmod command on a tarfs "));
return;
}
}
@ -377,7 +377,7 @@ void chmod_cmd (void)
case B_ENTER:
if (mode_change)
if (mc_chmod (fname, c_stat) == -1)
message (1, " Error ", " Couldn't chmod \"%s\" \n %s ",
message (1, MSG_ERROR, _(" Couldn't chmod \"%s\" \n %s "),
fname, unix_error_string (errno));
need_update = 1;
break;
@ -450,3 +450,4 @@ void ch2_cmd (int id)
else
chown_cmd ();
}

View File

@ -78,11 +78,11 @@ static struct {
int ret_cmd, flags, y, x;
char *text;
} chown_but[BUTTONS] = {
{ B_CANCEL, NORMAL_BUTTON, 0, 54, "&Cancel" },
{ B_ENTER, DEFPUSH_BUTTON, 0, 44, "&Set" },
{ B_SETUSR, NORMAL_BUTTON, 0, 30, "Set &users" },
{ B_SETGRP, NORMAL_BUTTON, 0, 15, "Set &groups" },
{ B_SETALL, NORMAL_BUTTON, 0, 3, "Set &all" },
{ B_CANCEL, NORMAL_BUTTON, 0, 54, N_("&Cancel") },
{ B_ENTER, DEFPUSH_BUTTON, 0, 44, N_("&Set") },
{ B_SETUSR, NORMAL_BUTTON, 0, 30, N_("Set &users") },
{ B_SETGRP, NORMAL_BUTTON, 0, 15, N_("Set &groups") },
{ B_SETALL, NORMAL_BUTTON, 0, 3, N_("Set &all") },
};
#define LABELS 5
@ -110,25 +110,25 @@ static void chown_refresh (void)
attrset (COLOR_NORMAL);
dlg_move (ch_dlg, TY + 1, TX + 1);
addstr (" Name ");
addstr (N_(" Name "));
dlg_move (ch_dlg, TY + 3, TX + 1);
addstr (" Owner name ");
addstr (N_(" Owner name "));
dlg_move (ch_dlg, TY + 5, TX + 1);
addstr (" Group name ");
addstr (N_(" Group name "));
dlg_move (ch_dlg, TY + 7, TX + 1);
addstr (" Size ");
addstr (N_(" Size "));
dlg_move (ch_dlg, TY + 9, TX + 1);
addstr (" Permission ");
addstr (N_(" Permission "));
attrset (COLOR_HOT_NORMAL);
dlg_move (ch_dlg, 1, 28);
addstr (" Chown command ");
addstr (N_(" Chown command "));
dlg_move (ch_dlg, UY, UX + 1);
addstr (" User name ");
addstr (N_(" User name "));
dlg_move (ch_dlg, GY, GX + 1);
addstr (" Group name ");
addstr (N_(" Group name "));
dlg_move (ch_dlg, TY, TX + 1);
addstr (" File ");
addstr (N_(" File "));
}
#endif
@ -170,7 +170,7 @@ static void init_chown (void)
ch_dlg = create_dlg (0, 0, 18, 74, dialog_colors, chown_callback,
"[Chown]", "chown", DLG_CENTER);
#define XTRACT(i) BY+chown_but[i].y, BX+chown_but[i].x, chown_but[i].ret_cmd, chown_but[i].flags, chown_but[i].text, 0, 0, NULL
#define XTRACT(i) BY+chown_but[i].y, BX+chown_but[i].x, chown_but[i].ret_cmd, chown_but[i].flags, _(chown_but[i].text), 0, 0, NULL
tk_new_frame (ch_dlg, "b.");
for (i = 0; i < BUTTONS-single_set; i++)
@ -188,8 +188,8 @@ static void init_chown (void)
l_user = listbox_new (UY + 1, UX + 1, 19, 10, 0, l_call, NULL);
l_group = listbox_new (GY + 1, GX + 1, 19, 10, 0, l_call, NULL);
listbox_add_item (l_user, 0, 0, "<Unknown user>", NULL); /* add fields for unknown names (numbers) */
listbox_add_item (l_group, 0, 0, "<Unknown group>", NULL);
listbox_add_item (l_user, 0, 0, _("<Unknown user>"), NULL); /* add fields for unknown names (numbers) */
listbox_add_item (l_group, 0, 0, _("<Unknown group>"), NULL);
setpwent (); /* get and put user names in the listbox */
while ((l_pass = getpwent ())) {
@ -220,7 +220,7 @@ void chown_done (void)
static inline void do_chown (uid_t u, gid_t g)
{
if (mc_chown (cpanel->dir.list [current_file].fname, u, g) == -1)
message (1, " Error ", " Couldn't chown \"%s\" \n %s ",
message (1, MSG_ERROR, _(" Couldn't chown \"%s\" \n %s "),
cpanel->dir.list [current_file].fname, unix_error_string (errno));
do_file_mark (cpanel, current_file, 0);
@ -253,12 +253,12 @@ void chown_cmd (void)
if (!vfs_current_is_local ()) {
if (vfs_current_is_extfs ()) {
message (1, " Oops... ",
" I can't run the Chown command on an extfs ");
message (1, _(" Oops... "),
_(" I can't run the Chown command on an extfs "));
return;
} else if (vfs_current_is_tarfs ()) {
message (1, " Oops... ",
" I can't run the Chown command on a tarfs ");
message (1, _(" Oops... "),
_(" I can't run the Chown command on a tarfs "));
return;
}
}
@ -337,7 +337,7 @@ void chown_cmd (void)
if (ch_dlg->ret_value==B_ENTER) {
need_update = 1;
if (mc_chown (fname, new_user, new_group) == -1)
message (1, " Error ", " Couldn't chown \"%s\" \n %s ",
message (1, MSG_ERROR, _(" Couldn't chown \"%s\" \n %s "),
fname, unix_error_string (errno));
} else
apply_chowns (new_user, new_group);

101
src/cmd.c
View File

@ -182,7 +182,7 @@ int view_file_at_line (char *filename, int plain_view, int internal, int start_l
if (!vfs_file_is_local (filename)){
localcopy = mc_getlocalcopy (filename);
if (localcopy == NULL){
message (1, " Error ", " Can not fetch a local copy of %s ", filename);
message (1, MSG_ERROR, _(" Can not fetch a local copy of %s "), filename);
return 0;
}
execute_internal (viewer, localcopy);
@ -232,8 +232,8 @@ static void do_view_cmd (WPanel *panel, int normal)
if (S_ISDIR (selection (panel)->buf.st_mode) ||
link_isdir (selection (panel))){
if (confirm_view_dir && (panel->marked || panel->dirs_marked)){
if (query_dialog (" CD ", "Files tagged, want to cd?",
0, 2, "&Yes", "&No") == 1){
if (query_dialog (_(" CD "), _("Files tagged, want to cd?"),
0, 2, _("&Yes"), _("&No")) == 1){
return;
}
}
@ -270,7 +270,7 @@ void filtered_view_cmd (WPanel *panel)
char *command;
panel = get_a_panel (panel);
command = input_dialog (" Filtered view ", " Filter command and arguments:",
command = input_dialog (_(" Filtered view "), _(" Filter command and arguments:"),
selection (panel)->fname);
if (!command)
return;
@ -355,7 +355,7 @@ void mkdir_cmd (WPanel *panel)
char *dir;
panel = get_a_panel (panel);
dir = input_expand_dialog (" Mkdir ", " Enter directory name:" , "");
dir = input_expand_dialog (_(" Mkdir "), _(" Enter directory name:") , "");
if (!dir)
return;
@ -369,7 +369,7 @@ void mkdir_cmd (WPanel *panel)
return;
}
free (dir);
message (1, " Error ", " %s ", unix_error_string (errno));
message (1, MSG_ERROR, " %s ", unix_error_string (errno));
}
void delete_cmd (void)
@ -410,7 +410,7 @@ void set_panel_filter (WPanel *p)
x = p->filter ? p->filter : easy_patterns ? "*" : ".";
reg_exp = input_dialog (" Filter ", " Set expression for filtering filenames", x);
reg_exp = input_dialog (_(" Filter "), _(" Set expression for filtering filenames"), x);
if (!reg_exp)
return;
set_panel_filter_to (p, reg_exp);
@ -489,7 +489,7 @@ void select_cmd_panel (WPanel *panel)
int c;
int dirflag = 0;
reg_exp = input_dialog (" Select ", "", easy_patterns ? "*" : ".");
reg_exp = input_dialog (_(" Select "), "", easy_patterns ? "*" : ".");
if (!reg_exp)
return;
@ -517,7 +517,7 @@ void select_cmd_panel (WPanel *panel)
}
c = regexp_match (reg_exp_t, panel->dir.list [i].fname, match_file);
if (c == -1){
message (1, " Error ", " Malformed regular expression ");
message (1, MSG_ERROR, _(" Malformed regular expression "));
free (reg_exp);
return;
}
@ -541,7 +541,7 @@ void unselect_cmd_panel (WPanel *panel)
int c;
int dirflag = 0;
reg_exp = input_dialog (" Unselect ","", easy_patterns ? "*" : ".");
reg_exp = input_dialog (_(" Unselect "),"", easy_patterns ? "*" : ".");
if (!reg_exp)
return;
@ -568,7 +568,7 @@ void unselect_cmd_panel (WPanel *panel)
}
c = regexp_match (reg_exp_t, panel->dir.list [i].fname, match_file);
if (c == -1){
message (1, " Error ", " Malformed regular expression ");
message (1, MSG_ERROR, _(" Malformed regular expression "));
free (reg_exp);
return;
}
@ -610,9 +610,9 @@ void ext_cmd (void)
dir = 0;
if (geteuid () == 0){
dir = query_dialog ("Extension file edit",
" Which extension file you want to edit? ", 0, 2,
"&User", "&System Wide");
dir = query_dialog (_("Extension file edit"),
_(" Which extension file you want to edit? "), 0, 2,
_("&User"), _("&System Wide"));
}
extdir = concat_dir_and_file (mc_home, MC_LIB_EXT);
@ -635,10 +635,10 @@ void menu_edit_cmd (void)
int dir = 0;
dir = query_dialog (
"Menu file edit",
" Which menu file will you edit? ",
_("Menu file edit"),
_(" Which menu file will you edit? "),
0, geteuid() ? 2 : 3,
"&Local", "&Home", "&System Wide"
_("&Local"), _("&Home"), _("&System Wide")
);
menufile = concat_dir_and_file(mc_home, MC_GLOBAL_MENU);
@ -819,8 +819,8 @@ void compare_dirs_cmd (void)
{
enum CompareMode thorough_flag = compare_quick;
thorough_flag = query_dialog (" Compare directories ", " Select compare method: ",
0, 3, "&Quick", "&Size only", "&Thorough", "&Cancel");
thorough_flag = query_dialog (_(" Compare directories "), _(" Select compare method: "),
0, 3, _("&Quick"), _("&Size only"), _("&Thorough"), _("&Cancel"));
if (thorough_flag < 0 || thorough_flag > 2)
return;
if (get_current_type () == view_listing &&
@ -830,7 +830,7 @@ void compare_dirs_cmd (void)
paint_panel (cpanel);
paint_panel (opanel);
} else {
message (1, " Error ", " Both panels should be on the listing view mode to use this command ");
message (1, MSG_ERROR, _(" Both panels should be on the listing view mode to use this command "));
}
}
@ -844,13 +844,13 @@ void history_cmd (void)
input_w (cmdline)->need_push = 0;
}
if (!input_w (cmdline)->history){
message (1, " Error ", " The command history is empty ");
message (1, MSG_ERROR, _(" The command history is empty "));
return;
}
current = input_w (cmdline)->history;
while (current->prev)
current = current->prev;
listbox = create_listbox_window (60, 10, " Command history ",
listbox = create_listbox_window (60, 10, _(" Command history "),
"[Command Menu]");
while (current){
LISTBOX_APPEND_TEXT (listbox, 0, current->text,
@ -892,8 +892,8 @@ view_other_cmd (void)
if (!xterm_flag && !console_flag && !use_subshell){
if (message_flag)
message (1, " Error ", " Not an xterm or Linux console; \n"
" the panels cannot be toggled. ");
message (1, MSG_ERROR, _(" Not an xterm or Linux console; \n"
" the panels cannot be toggled. "));
message_flag = FALSE;
} else {
#ifndef HAVE_X
@ -934,7 +934,7 @@ view_other_cmd (void)
{
if (output_starts_shell){
fprintf (stderr,
"Type `exit' to return to the Midnight Commander\n\r\n\r");
_("Type `exit' to return to the Midnight Commander\n\r\n\r"));
my_system (1, shell, NULL);
} else
get_key_code (0);
@ -986,7 +986,7 @@ do_link (int symbolic_link, char *fname)
if (!symbolic_link){
stat_r = mc_stat (fname, &s);
if (stat_r != 0){
message (1, " Error ", " Couldn't stat %s \n %s ",
message (1, MSG_ERROR, _(" Couldn't stat %s \n %s "),
fname, unix_error_string (errno));
return;
}
@ -995,9 +995,9 @@ do_link (int symbolic_link, char *fname)
}
if (!symbolic_link){
src = copy_strings (" Link ", name_trunc (fname, 46),
" to:", NULL);
dest = input_expand_dialog (" Link ", src, "");
src = copy_strings (_(" Link "), name_trunc (fname, 46),
_(" to:"), NULL);
dest = input_expand_dialog (_(" Link "), src, "");
free (src);
if (!dest)
return;
@ -1007,7 +1007,7 @@ do_link (int symbolic_link, char *fname)
}
save_cwds_stat ();
if (-1 == mc_link (fname, dest))
message (1, " Error ", " link: %s ", unix_error_string (errno));
message (1, MSG_ERROR, _(" link: %s "), unix_error_string (errno));
} else {
#ifdef OLD_SYMLINK_VERSION
symlink_dialog (fname, "", &dest, &src);
@ -1040,7 +1040,7 @@ do_link (int symbolic_link, char *fname)
if (*src) {
save_cwds_stat ();
if (-1 == mc_symlink (dest, src))
message (1, " Error ", " symlink: %s ",
message (1, MSG_ERROR, _(" symlink: %s "),
unix_error_string (errno));
}
free (src);
@ -1066,18 +1066,18 @@ void edit_symlink_cmd (void)
if (S_ISLNK (selection (cpanel)->buf.st_mode)) {
char buffer [MC_MAXPATHLEN], *p = selection (cpanel)->fname;
int i;
char *dest, *q = copy_strings (" Symlink ", name_trunc (p, 32), " points to:", NULL);
char *dest, *q = copy_strings (_(" Symlink "), name_trunc (p, 32), _(" points to:"), NULL);
i = readlink (p, buffer, MC_MAXPATHLEN);
if (i > 0) {
buffer [i] = 0;
dest = input_expand_dialog (" Edit symlink ", q, buffer);
dest = input_expand_dialog (_(" Edit symlink "), q, buffer);
if (dest) {
if (*dest && strcmp (buffer, dest)) {
save_cwds_stat ();
mc_unlink (p);
if (-1 == mc_symlink (dest, p))
message (1, " Error ", " edit symlink: %s ",
message (1, MSG_ERROR, _(" edit symlink: %s "),
unix_error_string (errno));
update_panels (UP_OPTIMIZE, UP_KEEPSEL, UP_KEEPSEL);
repaint_screen ();
@ -1101,8 +1101,8 @@ void other_symlink_cmd (void)
p = concat_dir_and_file (cpanel->cwd, selection (cpanel)->fname);
r = concat_dir_and_file (opanel->cwd, selection (cpanel)->fname);
q = copy_strings (" Link symbolically ", name_trunc (p, 32), " to:", NULL);
dest = input_expand_dialog (" Relative symlink ", q, r);
q = copy_strings (_(" Link symbolically "), name_trunc (p, 32), _(" to:"), NULL);
dest = input_expand_dialog (_(" Relative symlink "), q, r);
if (dest) {
if (*dest) {
t = strrchr (dest, PATH_SEP);
@ -1113,7 +1113,7 @@ void other_symlink_cmd (void)
if (s) {
save_cwds_stat ();
if (-1 == mc_symlink (dest, s))
message (1, " Error ", " relative symlink: %s ",
message (1, MSG_ERROR, _(" relative symlink: %s "),
unix_error_string (errno));
update_panels (UP_OPTIMIZE, UP_KEEPSEL, UP_KEEPSEL);
repaint_screen ();
@ -1244,13 +1244,13 @@ static void nice_cd (char *text, char *xtext, char *help, char *prefix, int to_h
void netlink_cmd (void)
{
nice_cd (" Link to a remote machine ", machine_str,
nice_cd (_(" Link to a remote machine "), _(machine_str),
"[Network File System]", "mc:", 1);
}
void ftplink_cmd (void)
{
nice_cd (" FTP to machine ", machine_str,
nice_cd (_(" FTP to machine "), _(machine_str),
"[FTP File System]", "ftp://", 1);
}
@ -1260,15 +1260,15 @@ void source_routing (void)
char *source;
struct hostent *hp;
source = input_dialog (" Socket source routing setup ",
" Enter host name to use as a source routing hop: ",
source = input_dialog (_(" Socket source routing setup "),
_(" Enter host name to use as a source routing hop: ")n,
"");
if (!source)
return;
hp = gethostbyname (source);
if (!hp){
message (1, " Host name ", " Error while looking up IP address ");
message (1, _(" Host name "), _(" Error while looking up IP address "));
return;
}
source_route = *((int *)hp->h_addr);
@ -1279,9 +1279,9 @@ void source_routing (void)
#ifdef USE_EXT2FSLIB
void undelete_cmd (void)
{
nice_cd (" Undelete files on an ext2 file system ",
" Enter the file system name where you want to run the\n "
" undelete file system on: (F1 for details)",
nice_cd (_(" Undelete files on an ext2 file system "),
_(" Enter the file system name where you want to run the\n "
" undelete file system on: (F1 for details)"),
"[Undelete File System]", "undel:", 0);
}
#endif
@ -1372,7 +1372,7 @@ void dirsizes_cmd (void)
free (p);
if (pclose (f) < 0)
#ifndef SCO_FLAVOR
message (0, "Show directory sizes", "Pipe close failed");
message (0, _("Show directory sizes"), _("Pipe close failed"));
else
#else /* SCO_FLAVOR */
/*
@ -1385,16 +1385,21 @@ void dirsizes_cmd (void)
close_error_pipe (0, 0);
paint_panel (panel);
} else
close_error_pipe (1, "Cannot invoke du command.");
close_error_pipe (1, _("Cannot invoke du command."));
}
#endif
void
save_setup_cmd (void)
{
char *str;
save_setup ();
sync_profiles ();
message (0, " Setup ", " Setup saved to ~/" PROFILE_NAME);
str = copy_strings ( _(" Setup saved to ~/"), PROFILE_NAME, NULL);
message (0, _(" Setup "), str);
free (str);
}
void

View File

@ -170,7 +170,7 @@ void do_cd_command (char *cmd)
}
} else
if (!examine_cd (&cmd [3])) {
message (1, " Error ", " Can't chdir to '%s' \n %s ",
message (1, MSG_ERROR, _(" Can't chdir to '%s' \n %s "),
&cmd [3], unix_error_string (errno));
return;
}

View File

@ -3,6 +3,7 @@
#include "dlg.h"
#define MSG_ERROR ((char *) -1)
Dlg_head *message (int error, char *header, char *text, ...);
int query_dialog (char *header, char *text, int flags, int count, ...);

View File

@ -53,22 +53,22 @@ static int case_sensitive = OS_SORT_CASE_SENSITIVE_DEFAULT;
#define MY_ISDIR(x) ( (S_ISDIR (x->buf.st_mode) || x->f.link_to_dir) ? 1 : 0)
sort_orders_t sort_orders [SORT_TYPES_TOTAL] = {
{ "Unsorted", unsorted },
{ "Name", sort_name },
{ "Extension", sort_ext },
{ "Modify time", sort_time },
{ "Access time", sort_atime },
{ "Change time", sort_ctime },
{ "Size", sort_size },
{ "Inode", sort_inode },
{ N_("Unsorted"), unsorted },
{ N_("Name"), sort_name },
{ N_("Extension"), sort_ext },
{ N_("Modify time"), sort_time },
{ N_("Access time"), sort_atime },
{ N_("Change time"), sort_ctime },
{ N_("Size"), sort_size },
{ N_("Inode"), sort_inode },
/* New sort orders */
{ "Type", sort_type },
{ "Links", sort_links },
{ "NGID", sort_ngid },
{ "NUID", sort_nuid },
{ "Owner", sort_owner },
{ "Group", sort_group }
{ N_("Type"), sort_type },
{ N_("Links"), sort_links },
{ N_("NGID"), sort_ngid },
{ N_("NUID"), sort_nuid },
{ N_("Owner"), sort_owner },
{ N_("Group"), sort_group }
};
#define string_sortcomp(a,b) (case_sensitive ? strcmp (a,b) : strcasecmp (a,b))
@ -640,7 +640,7 @@ char *sort_type_to_name (sortfn *sort_fn)
for (i = 0; i < SORT_TYPES; i++)
if ((sortfn *) (sort_orders [i].sort_fn) == sort_fn)
return sort_orders [i].sort_name;
return _(sort_orders [i].sort_name);
return _("Unknown");
}

View File

@ -134,7 +134,7 @@ exec_extension (char *filename, char *data, char **drops, int *move_dir, int sta
file_name = strdup (tmpnam (NULL));
if ((cmd_file = fopen (file_name, "w+")) == NULL){
message (1, " Error ", " Can't create temporary command file \n %s ",
message (1, MSG_ERROR, _(" Can't create temporary command file \n %s "),
unix_error_string (errno));
return;
}
@ -144,7 +144,7 @@ exec_extension (char *filename, char *data, char **drops, int *move_dir, int sta
if (*data == '}'){
char *parameter;
parameter_found = 0;
parameter = input_dialog (" Parameter ", prompt, "");
parameter = input_dialog (_(" Parameter "), prompt, "");
if (!parameter){
/* User canceled */
fclose (cmd_file);
@ -288,7 +288,7 @@ exec_extension (char *filename, char *data, char **drops, int *move_dir, int sta
if (vfs_current_is_local ())
shell_execute (file_name, 1);
else
message (1, " Warning ", " Can't execute commands on a Virtual File System directory ");
message (1, _(" Warning "), _(" Can't execute commands on a Virtual File System directory "));
#endif
}
unlink (file_name);
@ -383,14 +383,14 @@ check_stock_mc_ext:
} else {
char *msg;
char *msg2;
msg = copy_strings(" ", mc_home, MC_LIB_EXT " file error");
msg2 = copy_strings("Format of the ",
msg = copy_strings(" ", mc_home, MC_LIB_EXT, _(" file error"), NULL);
msg2 = copy_strings(_("Format of the "),
mc_home,
"mc.ext file has changed\n\
("mc.ext file has changed\n\
with version 3.0. It seems that installation\n\
failed. Please fetch a fresh new copy from the\n\
Midnight Commander package or in case you don't\n\
have any, get it from ftp://ftp.nuclecu.unam.mx.", 0);
have any, get it from ftp://ftp.nuclecu.unam.mx."), 0);
message (1, msg, msg2);
free (msg);
free (msg2);
@ -402,12 +402,12 @@ have any, get it from ftp://ftp.nuclecu.unam.mx.", 0);
if (home_error) {
char *msg;
char *msg2;
msg = copy_strings(" ~/" MC_USER_EXT " file error ");
msg2 = copy_strings("Format of the ~/" MC_USER_EXT " file has changed\n\
msg = copy_strings(" ~/", MC_USER_EXT, _(" file error "), NULL);
msg2 = copy_strings(_("Format of the ~/"), MC_USER_EXT, _(" file has changed\n\
with version 3.0. You may want either to\n\
copy it from ", mc_home, "mc.ext or use that\n\
copy it from "), mc_home, _("mc.ext or use that\n\
file as an example of how to write it.\n\
", mc_home, "mc.ext will be used for this moment.", 0);
"), mc_home, _("mc.ext will be used for this moment."), 0);
message (1, msg, msg2);
free (msg);
free (msg2);

View File

@ -387,9 +387,11 @@ create_op_win (int op, int with_eta)
x_set_dialog_title (op_dlg, "");
tk_new_frame (op_dlg, "b.");
add_widgetl (op_dlg, button_new (BY-minus, WX - 19 + eta_offset, FILE_ABORT, NORMAL_BUTTON, "&Abort", 0, 0, "abort"),
add_widgetl (op_dlg, button_new (BY-minus, WX - 19 + eta_offset, FILE_ABORT,
NORMAL_BUTTON, _("&Abort"), 0, 0, "abort"),
XV_WLAY_RIGHTOF);
add_widgetl (op_dlg, button_new (BY-minus, 14 + eta_offset, FILE_SKIP, NORMAL_BUTTON, "&Skip", 0, 0, "skip"),
add_widgetl (op_dlg, button_new (BY-minus, 14 + eta_offset, FILE_SKIP,
NORMAL_BUTTON, _("&Skip"), 0, 0, "skip"),
XV_WLAY_CENTERROW);
tk_new_frame (op_dlg, "2.");
@ -477,7 +479,7 @@ show_source (char *s)
}
#endif /* WITH_FULL_PATHS */
label_set_text (FileLabel [0], "Source");
label_set_text (FileLabel [0], _("Source"));
label_set_text (FileString [0], truncFileString (s));
return check_buttons ();
} else {
@ -491,7 +493,7 @@ static int
show_target (char *s)
{
if (s != NULL){
label_set_text (FileLabel [1], "Target");
label_set_text (FileLabel [1], _("Target"));
label_set_text (FileString [1], truncFileString (s));
return check_buttons ();
} else {
@ -504,7 +506,7 @@ show_target (char *s)
static int
show_deleting (char *s)
{
label_set_text (FileLabel [0], "Deleting");
label_set_text (FileLabel [0], _("Deleting"));
label_set_text (FileString [0], truncFileString (s));
return check_buttons ();
}
@ -557,7 +559,7 @@ show_file_progress (long done, long total)
if (!verbose)
return check_buttons ();
if (total > 0){
label_set_text (ProgressLabel [0], "File");
label_set_text (ProgressLabel [0], _("File"));
file_eta_show ();
file_bps_show ();
return show_bar (0, done, total);
@ -571,7 +573,7 @@ show_count_progress (long done, long total)
if (!verbose)
return check_buttons ();
if (total > 0){
label_set_text (ProgressLabel [1], "Count");
label_set_text (ProgressLabel [1], _("Count"));
return show_bar (1, done, total);
} else
return show_no_bar (1);
@ -583,7 +585,7 @@ show_bytes_progress (long done, long total)
if (!verbose)
return check_buttons ();
if (total > 0){
label_set_text (ProgressLabel [2], "Bytes");
label_set_text (ProgressLabel [2], _("Bytes"));
return show_bar (2, done, total);
} else
return show_no_bar (2);
@ -667,7 +669,7 @@ do_transform_source (char *source)
case '*':
if (next_reg < 0 || next_reg >= RE_NREGS
|| regs.start [next_reg] < 0) {
message_1s (1, " Error ", " Invalid target mask ");
message_1s (1, MSG_ERROR, _(" Invalid target mask "));
transform_error = FILE_ABORT;
return NULL;
}
@ -814,7 +816,7 @@ make_symlink (char *src_path, char *dst_path)
len = mc_readlink (src_path, link_target, MC_MAXPATHLEN);
if (len < 0) {
return_status = file_error
(" Cannot read source link \"%s\" \n %s ", src_path);
(_(" Cannot read source link \"%s\" \n %s "), src_path);
if (return_status == FILE_RETRY)
goto retry_src_readlink;
return return_status;
@ -823,9 +825,9 @@ make_symlink (char *src_path, char *dst_path)
if (stable_symlinks && (!vfs_file_is_local (src_path) ||
!vfs_file_is_local (dst_path))) {
message_1s (1, " Error ", " Cannot make stable symlinks across "
"non-local filesystems: \n\n"
" Option Stable Symlinks will be disabled ");
message_1s (1, MSG_ERROR, _(" Cannot make stable symlinks across "
"non-local filesystems: \n\n"
" Option Stable Symlinks will be disabled "));
stable_symlinks = 0;
}
@ -871,7 +873,7 @@ make_symlink (char *src_path, char *dst_path)
return FILE_CONT;
}
return_status = file_error
(" Cannot create target symlink \"%s\" \n %s ", dst_path);
(_(" Cannot create target symlink \"%s\" \n %s "), dst_path);
if (return_status == FILE_RETRY)
goto retry_dst_symlink;
return return_status;
@ -914,7 +916,7 @@ copy_file_file (char *src_path, char *dst_path, int ask_overwrite)
retry_dst_stat:
if (mc_stat (dst_path, &sb2) == 0){
if (S_ISDIR (sb2.st_mode)){
return_status = file_error (" Cannot overwrite directory \"%s\" ",
return_status = file_error (_(" Cannot overwrite directory \"%s\" "),
dst_path);
if (return_status == FILE_RETRY)
goto retry_dst_stat;
@ -925,7 +927,7 @@ copy_file_file (char *src_path, char *dst_path, int ask_overwrite)
retry_src_xstat:
if ((*xstat)(src_path, &sb)){
return_status = file_error (" Cannot stat source file \"%s\" \n %s ",
return_status = file_error (_(" Cannot stat source file \"%s\" \n %s "),
src_path);
if (return_status == FILE_RETRY)
goto retry_src_xstat;
@ -939,7 +941,7 @@ copy_file_file (char *src_path, char *dst_path, int ask_overwrite)
#ifndef OS2_NT
/* Destination already exists */
if (sb.st_dev == sb2.st_dev && sb.st_ino == sb2.st_ino){
message_3s (1, " Error ", " `%s' and `%s' are the same file. ",
message_3s (1, MSG_ERROR, _(" `%s' and `%s' are the same file. "),
src_path, dst_path);
do_refresh ();
return FILE_SKIP;
@ -979,7 +981,7 @@ copy_file_file (char *src_path, char *dst_path, int ask_overwrite)
retry_mknod:
if (mc_mknod (dst_path, sb.st_mode & umask_kill, sb.st_rdev) < 0){
return_status = file_error
(" Cannot create special file \"%s\" \n %s ", dst_path);
(_(" Cannot create special file \"%s\" \n %s "), dst_path);
if (return_status == FILE_RETRY)
goto retry_mknod;
return return_status;
@ -990,7 +992,7 @@ copy_file_file (char *src_path, char *dst_path, int ask_overwrite)
retry_mknod_uidgid:
if (preserve_uidgid && mc_chown (dst_path, sb.st_uid, sb.st_gid)){
temp_status = file_error
(" Cannot chown target file \"%s\" \n %s ", dst_path);
(_(" Cannot chown target file \"%s\" \n %s "), dst_path);
if (temp_status == FILE_RETRY)
goto retry_mknod_uidgid;
return temp_status;
@ -999,7 +1001,7 @@ copy_file_file (char *src_path, char *dst_path, int ask_overwrite)
#ifndef __os2__
retry_mknod_chmod:
if (preserve && mc_chmod (dst_path, sb.st_mode & umask_kill) < 0){
temp_status = file_error (" Cannnot chmod target file \"%s\" \n %s ", dst_path);
temp_status = file_error (_(" Cannnot chmod target file \"%s\" \n %s "), dst_path);
if (temp_status == FILE_RETRY)
goto retry_mknod_chmod;
return temp_status;
@ -1015,7 +1017,7 @@ copy_file_file (char *src_path, char *dst_path, int ask_overwrite)
retry_src_open:
if ((source_desc = mc_open (src_path, O_RDONLY)) < 0){
return_status = file_error
(" Cannot open source file \"%s\" \n %s ", src_path);
(_(" Cannot open source file \"%s\" \n %s "), src_path);
if (return_status == FILE_RETRY)
goto retry_src_open;
do_append = 0;
@ -1029,7 +1031,7 @@ copy_file_file (char *src_path, char *dst_path, int ask_overwrite)
retry_src_fstat:
if (mc_fstat (source_desc, &sb)){
return_status = file_error
(" Cannot fstat source file \"%s\" \n %s ", src_path);
(_(" Cannot fstat source file \"%s\" \n %s "), src_path);
if (return_status == FILE_RETRY)
goto retry_src_fstat;
do_append = 0;
@ -1042,7 +1044,7 @@ copy_file_file (char *src_path, char *dst_path, int ask_overwrite)
retry_src_rstat:
if (mc_stat (src_path, &sb)){
return_status = file_error
(" Cannot stat source file \"%s\" \n %s ", src_path);
(_(" Cannot stat source file \"%s\" \n %s "), src_path);
if (return_status == FILE_RETRY)
goto retry_src_rstat;
do_append = 0;
@ -1069,7 +1071,7 @@ copy_file_file (char *src_path, char *dst_path, int ask_overwrite)
(!do_append &&
(dest_desc = mc_open (dst_path, O_WRONLY | O_CREAT | O_TRUNC, 0600)) < 0)) {
return_status = file_error
(" Cannot create target file \"%s\" \n %s ", dst_path);
(_(" Cannot create target file \"%s\" \n %s "), dst_path);
if (return_status == FILE_RETRY)
goto retry_dst_open;
do_append = 0;
@ -1086,7 +1088,7 @@ copy_file_file (char *src_path, char *dst_path, int ask_overwrite)
/* Find out the optimal buffer size. */
if (mc_fstat (dest_desc, &sb)){
return_status = file_error
(" Cannot fstat target file \"%s\" \n %s ", dst_path);
(_(" Cannot fstat target file \"%s\" \n %s "), dst_path);
if (return_status == FILE_RETRY)
goto retry_dst_fstat;
goto ret;
@ -1107,7 +1109,7 @@ copy_file_file (char *src_path, char *dst_path, int ask_overwrite)
n_read = mc_read (source_desc, buf, buf_size);
if (n_read < 0){
return_status = file_error
(" Cannot read source file \"%s\" \n %s ", src_path);
(_(" Cannot read source file \"%s\" \n %s "), src_path);
if (return_status == FILE_RETRY)
goto retry_src_read;
goto ret;
@ -1121,7 +1123,7 @@ copy_file_file (char *src_path, char *dst_path, int ask_overwrite)
n_written = mc_write (dest_desc, buf, n_read);
if (n_written < n_read){
return_status = file_error
(" Cannot write target file \"%s\" \n %s ", dst_path);
(_(" Cannot write target file \"%s\" \n %s "), dst_path);
if (return_status == FILE_RETRY)
goto retry_dst_write;
goto ret;
@ -1147,12 +1149,12 @@ copy_file_file (char *src_path, char *dst_path, int ask_overwrite)
for (i = 1; i;) {
switch (size = mc_ctl (source_desc, MCCTL_REMOTECOPYCHUNK, 8192)) {
case MCERR_TARGETOPEN:
message_1s (1, " Error ", " Can't open target file ");
message_1s (1, MSG_ERROR, _(" Can't open target file "));
goto ret;
case MCERR_READ:
goto ret;
case MCERR_WRITE:
message_1s (1, " Error ", " Can't write to local target file ");
message_1s (1, MSG_ERROR, _(" Can't write to local target file "));
goto ret;
case MCERR_DATA_ON_STDIN:
break;
@ -1190,7 +1192,7 @@ copy_file_file (char *src_path, char *dst_path, int ask_overwrite)
update_secs = (tv_current.tv_sec - tv_last_input.tv_sec);
stalled_msg = "";
if (update_secs > 4){
stalled_msg = "(stalled)";
stalled_msg = _("(stalled)");
}
/* 3. Compute ETA */
@ -1229,7 +1231,7 @@ ret:
retry_src_close:
if ((resources & 1) && mc_close (source_desc) < 0){
temp_status = file_error
(" Cannot close source file \"%s\" \n %s ", src_path);
(_(" Cannot close source file \"%s\" \n %s "), src_path);
if (temp_status == FILE_RETRY)
goto retry_src_close;
if (temp_status == FILE_ABORT)
@ -1239,7 +1241,7 @@ ret:
retry_dst_close:
if ((resources & 2) && mc_close (dest_desc) < 0){
temp_status = file_error
(" Cannot close target file \"%s\" \n %s ", dst_path);
(_(" Cannot close target file \"%s\" \n %s "), dst_path);
if (temp_status == FILE_RETRY)
goto retry_dst_close;
return_status = temp_status;
@ -1258,7 +1260,7 @@ ret:
retry_dst_chown:
if (mc_chown (dst_path, src_uid, src_gid)){
temp_status = file_error
(" Cannot chown target file \"%s\" \n %s ", dst_path);
(_(" Cannot chown target file \"%s\" \n %s "), dst_path);
if (temp_status == FILE_RETRY)
goto retry_dst_chown;
return_status = temp_status;
@ -1272,7 +1274,7 @@ ret:
retry_dst_chmod:
if (!appending && mc_chmod (dst_path, src_mode & umask_kill)){
temp_status = file_error
(" Cannot chmod target file \"%s\" \n %s ", dst_path);
(_(" Cannot chmod target file \"%s\" \n %s "), dst_path);
if (temp_status == FILE_RETRY)
goto retry_dst_chmod;
return_status = temp_status;
@ -1309,7 +1311,7 @@ copy_dir_dir (char *s, char *d, int toplevel, int move_over, int delete,
/* First get the mode of the source dir */
retry_src_stat:
if ((*xstat) (s, &cbuf)){
return_status = file_error (" Cannot stat source directory \"%s\" \n %s ", s);
return_status = file_error (_(" Cannot stat source directory \"%s\" \n %s "), s);
if (return_status == FILE_RETRY)
goto retry_src_stat;
return return_status;
@ -1332,7 +1334,7 @@ copy_dir_dir (char *s, char *d, int toplevel, int move_over, int delete,
}
if (!S_ISDIR (cbuf.st_mode)){
return_status = file_error (" Source directory \"%s\" is not a directory ", s);
return_status = file_error (_(" Source directory \"%s\" is not a directory "), s);
if (return_status == FILE_RETRY)
goto retry_src_stat;
return return_status;
@ -1340,7 +1342,7 @@ copy_dir_dir (char *s, char *d, int toplevel, int move_over, int delete,
if (is_in_linklist (parent_dirs, s, &cbuf)) {
/* we found a cyclic symbolic link */
message_2s (1, " Error ", " Cannot copy cyclic symbolic link \n `%s' ", s);
message_2s (1, MSG_ERROR, _(" Cannot copy cyclic symbolic link \n `%s' "), s);
return FILE_SKIP;
}
@ -1390,7 +1392,7 @@ copy_dir_dir (char *s, char *d, int toplevel, int move_over, int delete,
}
retry_dst_mkdir:
if (my_mkdir (dest_dir, (cbuf.st_mode & umask_kill) | S_IRWXU)){
return_status = file_error (" Cannot create target directory \"%s\" \n %s ", dest_dir);
return_status = file_error (_(" Cannot create target directory \"%s\" \n %s "), dest_dir);
if (return_status == FILE_RETRY)
goto retry_dst_mkdir;
goto ret;
@ -1409,7 +1411,7 @@ copy_dir_dir (char *s, char *d, int toplevel, int move_over, int delete,
retry_dst_chown:
if (mc_chown (dest_dir, cbuf.st_uid, cbuf.st_gid)){
return_status = file_error
(" Cannot chown target directory \"%s\" \n %s ", dest_dir);
(_(" Cannot chown target directory \"%s\" \n %s "), dest_dir);
if (return_status == FILE_RETRY)
goto retry_dst_chown;
goto ret;
@ -1517,7 +1519,7 @@ move_file_file (char *s, char *d)
retry_src_lstat:
if (mc_lstat (s, &src_stats) != 0){
/* Source doesn't exist */
return_status = file_error (" Cannot stat file \"%s\" \n %s ", s);
return_status = file_error (_(" Cannot stat file \"%s\" \n %s "), s);
if (return_status == FILE_RETRY)
goto retry_src_lstat;
return return_status;
@ -1539,14 +1541,14 @@ move_file_file (char *s, char *d)
strcpy (st, name_trunc (s, msize));
strcpy (dt, name_trunc (d, msize));
message_3s (1, " Error ", " `%s' and `%s' are the same file ",
message_3s (1, MSG_ERROR, _(" `%s' and `%s' are the same file "),
st, dt );
do_refresh ();
return FILE_SKIP;
}
#endif /* OS2_NT */
if (S_ISDIR (dst_stats.st_mode)){
message_2s (1, " Error ", " Cannot overwrite directory `%s' ", d);
message_2s (1, MSG_ERROR, _(" Cannot overwrite directory `%s' "), d);
do_refresh ();
return FILE_SKIP;
}
@ -1586,7 +1588,7 @@ move_file_file (char *s, char *d)
errno = EXDEV; /* Hack to copy (append) the file and then delete it */
if (errno != EXDEV){
return_status = files_error (" Cannot move file \"%s\" to \"%s\" \n %s ", s, d);
return_status = files_error (_(" Cannot move file \"%s\" to \"%s\" \n %s "), s, d);
if (return_status == FILE_RETRY)
goto retry_rename;
return return_status;
@ -1604,7 +1606,7 @@ move_file_file (char *s, char *d)
retry_src_remove:
if (mc_unlink (s)){
return_status = file_error (" Cannot remove file \"%s\" \n %s ", s);
return_status = file_error (_(" Cannot remove file \"%s\" \n %s "), s);
if (return_status == FILE_RETRY)
goto retry_src_remove;
return return_status;
@ -1645,9 +1647,9 @@ move_dir_dir (char *s, char *d)
goto oktoret;
} else {
if (S_ISDIR (destbuf.st_mode))
return_status = file_error (" Cannot overwrite directory \"%s\" ", destdir);
return_status = file_error (_(" Cannot overwrite directory \"%s\" "), destdir);
else
return_status = file_error (" Cannot overwrite file \"%s\" ", destdir);
return_status = file_error (_(" Cannot overwrite file \"%s\" "), destdir);
if (return_status == FILE_RETRY)
goto retry_dst_stat;
}
@ -1670,7 +1672,7 @@ move_dir_dir (char *s, char *d)
#endif
if (errno != EXDEV){
return_status = files_error (" Cannot move directory \"%s\" to \"%s\" \n %s ", s, d);
return_status = files_error (_(" Cannot move directory \"%s\" to \"%s\" \n %s "), s, d);
if (return_status == FILE_RETRY)
goto retry_rename;
goto ret;
@ -1726,7 +1728,7 @@ erase_file (char *s)
retry_unlink:
if (mc_unlink (s)){
return_status = file_error (" Cannot delete file \"%s\" \n %s ", s);
return_status = file_error (_(" Cannot delete file \"%s\" \n %s "), s);
if (return_status == FILE_RETRY)
goto retry_unlink;
return return_status;
@ -1780,7 +1782,7 @@ recursive_erase (char *s)
mc_refresh ();
retry_rmdir:
if (my_rmdir (s)){
return_status = file_error (" Cannot remove directory \"%s\" \n %s ", s);
return_status = file_error (_(" Cannot remove directory \"%s\" \n %s "), s);
if (return_status == FILE_RETRY)
goto retry_rmdir;
return return_status;
@ -1813,7 +1815,7 @@ erase_dir (char *s)
return error;
}
if (error){
error = file_error (" Cannot remove directory \"%s\" \n %s ", s);
error = file_error (_(" Cannot remove directory \"%s\" \n %s "), s);
if (error == FILE_RETRY)
goto retry_rmdir;
return error;
@ -1839,7 +1841,7 @@ erase_dir_iff_empty (char *s)
retry_rmdir:
error = my_rmdir (s);
if (error && !errno_dir_not_empty (errno)) {
error = file_error (" Cannot remove directory \"%s\" \n %s ", s);
error = file_error (_(" Cannot remove directory \"%s\" \n %s "), s);
if (error == FILE_RETRY)
goto retry_rmdir;
return error;
@ -1875,7 +1877,7 @@ get_file (WPanel *panel, struct stat *stat_buf)
*stat_buf = panel->dir.list [panel->selected].buf;
return panel->dir.list [panel->selected].fname;
}
fprintf (stderr, " Internal error: get_file \n");
fprintf (stderr, _(" Internal error: get_file \n"));
mi_getch ();
return "";
}
@ -1922,9 +1924,9 @@ file_mask_dialog (int operation, char *text, char *def_text, int only_one, int *
QuickDialog Quick_input;
static QuickWidget quick_widgets [] = {
/* follow symlinks and preserve Attributes must be the first */
{ quick_checkbox, 3, 64, 8, FMDY, "preserve &Attributes", 9, 0,
{ quick_checkbox, 3, 64, 8, FMDY, N_("preserve &Attributes"), 9, 0,
&op_preserve, 0, XV_WLAY_BELOWCLOSE, "preserve" },
{ quick_checkbox, 3, 64, 7, FMDY, "follow &Links", 7, 0,
{ quick_checkbox, 3, 64, 7, FMDY, N_("follow &Links"), 7, 0,
&op_follow_links, 0, XV_WLAY_BELOWCLOSE, "follow" },
#ifdef HAVE_XVIEW
#define FMDI1 5
@ -1933,8 +1935,8 @@ file_mask_dialog (int operation, char *text, char *def_text, int only_one, int *
{ quick_input, 3, 64, 6, FMDY, "", 58, 0,
0, 0, XV_WLAY_BELOWCLOSE, "input2" },
#endif
{ quick_label, 3, 64, 5, FMDY, "to:", 0, 0, 0, 0, XV_WLAY_BELOWOF,"to"},
{ quick_checkbox, 37, 64, 4, FMDY, "&Using shell patterns", 0, 0,
{ quick_label, 3, 64, 5, FMDY, N_("to:"), 0, 0, 0, 0, XV_WLAY_BELOWOF,"to"},
{ quick_checkbox, 37, 64, 4, FMDY, N_("&Using shell patterns"), 0, 0,
0/* &source_easy_patterns */, 0, XV_WLAY_BELOWCLOSE, "using-shell" },
{ quick_input, 3, 64, 3, FMDY, "", 58,
0, 0, 0, XV_WLAY_BELOWCLOSE, "input-def" },
@ -1948,17 +1950,17 @@ file_mask_dialog (int operation, char *text, char *def_text, int only_one, int *
#define FMDI0 6
{ quick_label, 2, 64, 2, FMDY, "", 0, 0, 0, 0, XV_WLAY_DONTCARE, "ql" },
#define SKIP 4
{ quick_button, 42, 64, 9, FMDY, "&Cancel", 0, B_CANCEL, 0, 0, XV_WLAY_DONTCARE,
{ quick_button, 42, 64, 9, FMDY, N_("&Cancel"), 0, B_CANCEL, 0, 0, XV_WLAY_DONTCARE,
"cancel" },
#ifdef WITH_BACKGROUND
#undef SKIP
#define SKIP 5
{ quick_button, 25, 64, 9, FMDY, "&Background", 0, B_USER, 0, 0, XV_WLAY_DONTCARE, "back" },
{ quick_button, 25, 64, 9, FMDY, N_("&Background"), 0, B_USER, 0, 0, XV_WLAY_DONTCARE, "back" },
#endif
{ quick_button, 14, 64, 9, FMDY, "&Ok", 0, B_ENTER, 0, 0, XV_WLAY_NEXTROW, "ok" },
{ quick_checkbox, 42, 64, 8, FMDY, "&Stable Symlinks", 0, 0,
{ quick_button, 14, 64, 9, FMDY, N_("&Ok"), 0, B_ENTER, 0, 0, XV_WLAY_NEXTROW, "ok" },
{ quick_checkbox, 42, 64, 8, FMDY, N_("&Stable Symlinks"), 0, 0,
&stable_symlinks, 0, XV_WLAY_BELOWCLOSE, "stab-sym" },
{ quick_checkbox, 31, 64, 7, FMDY, "&Dive into subdir if exists", 0, 0,
{ quick_checkbox, 31, 64, 7, FMDY, N_("&Dive into subdir if exists"), 0, 0,
&dive_into_subdirs, 0, XV_WLAY_BELOWOF, "dive" },
{ 0 } };
@ -1970,7 +1972,8 @@ file_mask_dialog (int operation, char *text, char *def_text, int only_one, int *
Quick_input.title = header;
Quick_input.help = "[Mask Copy/Rename]";
Quick_input.ylen = FMDY;
Quick_input.i18n = 0;
if (operation == OP_COPY) {
Quick_input.class = "quick_file_mask_copy";
Quick_input.widgets = quick_widgets;
@ -2023,7 +2026,7 @@ ask_file_mask:
error = re_compile_pattern (source_mask, strlen (source_mask), &rx);
free (source_mask);
if (error) {
message_3s (1, " Error ", "Invalid source pattern `%s' \n %s ",
message_3s (1, MSG_ERROR, _("Invalid source pattern `%s' \n %s "),
orig_mask, error);
if (orig_mask)
free (orig_mask);
@ -2082,7 +2085,7 @@ panel_operate (void *source_panel, int operation, char *thedefault)
free_linklist (&dest_dirs);
if (get_current_type () == view_listing)
if (!panel->marked && !strcmp (selection (panel)->fname, "..")){
message (1, " Error ", " Can't operate on \"..\"! ");
message (1, MSG_ERROR, _(" Can't operate on \"..\"! "));
return 0;
}
@ -2093,15 +2096,15 @@ panel_operate (void *source_panel, int operation, char *thedefault)
if (!only_one){
sprintf (cmd_buf, "%s%d %s%s ", op_names [operation], panel->marked,
(panel->marked == panel->dirs_marked) ? "directories" :
(panel->dirs_marked) ? "files/directories" : "files",
(operation == OP_DELETE) ? "?" : " with source mask:");
(panel->marked == panel->dirs_marked) ? _("directories") :
(panel->dirs_marked) ? _("files/directories") : _("files"),
(operation == OP_DELETE) ? "?" : _(" with source mask:"));
} else {
source = get_file (panel, &src_stat);
sprintf (cmd_buf,"%s%s \"%s\"%s ", op_names [operation],
S_ISDIR (src_stat.st_mode) ? "directory" : "file",
S_ISDIR (src_stat.st_mode) ? _("directory") : _("file"),
name_trunc (source, S_ISDIR (src_stat.st_mode) ? 23 : 28),
(operation == OP_DELETE) ? "?" : " with source mask:");
(operation == OP_DELETE) ? "?" : _(" with source mask:"));
}
/* Show confirmation dialog */
@ -2109,7 +2112,7 @@ panel_operate (void *source_panel, int operation, char *thedefault)
if (know_not_what_am_i_doing)
query_set_sel (1);
i = query_dialog (op_names [operation], cmd_buf,
D_ERROR, 2, "&Yes", "&No");
D_ERROR, 2, _("&Yes"), _("&No"));
if (i != 0)
return 0;
} else if (operation != OP_DELETE) {
@ -2144,7 +2147,7 @@ panel_operate (void *source_panel, int operation, char *thedefault)
v = do_background (copy_strings (operation_names [operation], ": ", panel->cwd, 0));
if (v == -1){
message (1, " Error ", " Sorry, I could not put the job in background ");
message (1, MSG_ERROR, _(" Sorry, I could not put the job in background "));
}
/* If we are the parent */
@ -2207,7 +2210,7 @@ panel_operate (void *source_panel, int operation, char *thedefault)
break;
default:
value = FILE_CONT;
message_1s (1, " Internal failure ", " Unknown file operation ");
message_1s (1, _(" Internal failure "), _(" Unknown file operation "));
}
}
} /* Copy or move operation */
@ -2223,7 +2226,7 @@ panel_operate (void *source_panel, int operation, char *thedefault)
retry_many_dst_stat:
dst_result = mc_stat (dest, &dst_stat);
if (dst_result == 0 && !S_ISDIR (dst_stat.st_mode)){
if (file_error (" Destination \"%s\" must be a directory ", dest) == FILE_RETRY)
if (file_error (_(" Destination \"%s\" must be a directory "), dest) == FILE_RETRY)
goto retry_many_dst_stat;
goto clean_up;
}
@ -2277,8 +2280,8 @@ panel_operate (void *source_panel, int operation, char *thedefault)
value = move_file_file (source_with_path, temp);
break;
default:
message_1s (1, " Internal failure ",
" Unknown file operation ");
message_1s (1, _(" Internal failure "),
_(" Unknown file operation "));
goto clean_up;
}
}
@ -2347,8 +2350,8 @@ real_do_file_error (enum OperationMode mode, char *error)
int result;
char *msg;
msg = mode == Foreground ? " Error " : " Background process error ";
result = query_dialog (msg, error, 3, 3, "&Skip", "&Retry", "&Abort");
msg = mode == Foreground ? MSG_ERROR : _(" Background process error ");
result = query_dialog (msg, error, 3, 3, _("&Skip"), _("&Retry"), _("&Abort"));
switch (result){
case 0:
@ -2386,7 +2389,7 @@ files_error (char *format, char *file1, char *file2)
return do_file_error (cmd_buf);
}
static char *format = "Target file \"%s\" already exists!";
static char *format = N_("Target file \"%s\" already exists!");
static int
replace_callback (struct Dlg_head *h, int Id, int Msg)
{
@ -2416,35 +2419,35 @@ init_replace (enum OperationMode mode)
x_set_dialog_title (replace_dlg,
mode == Foreground ? " File exists " : " Background process: File exists ");
mode == Foreground ? _(" File exists ") : _(" Background process: File exists "));
#ifdef HAVE_X
#define X_TRUNC 128
#else
#define X_TRUNC 52
#endif
sprintf (buffer, format, name_trunc (replace_filename, X_TRUNC - strlen (format)));
sprintf (buffer, _(format), name_trunc (replace_filename, X_TRUNC - strlen (format)));
add_widgetl (replace_dlg, label_new (3, 5, buffer, "target-e"), XV_WLAY_CENTERROW);
add_widgetl (replace_dlg,
button_new (BY + 3, 25, REPLACE_ABORT, NORMAL_BUTTON, "&Abort",
button_new (BY + 3, 25, REPLACE_ABORT, NORMAL_BUTTON, _("&Abort"),
0, 0, "abort"), XV_WLAY_CENTERROW);
tk_new_frame (replace_dlg, "a.");
add_widgetl (replace_dlg,
button_new (BY + 1, 28, REPLACE_SIZE, NORMAL_BUTTON, "if &Size differs",
button_new (BY + 1, 28, REPLACE_SIZE, NORMAL_BUTTON, _("if &Size differs"),
0, 0, "if-size"), XV_WLAY_RIGHTOF);
add_widgetl (replace_dlg,
button_new (BY, 47, REPLACE_NEVER, NORMAL_BUTTON, "non&E",
button_new (BY, 47, REPLACE_NEVER, NORMAL_BUTTON, _("non&E"),
0, 0, "none"), XV_WLAY_RIGHTOF);
add_widgetl (replace_dlg,
button_new (BY, 36, REPLACE_UPDATE, NORMAL_BUTTON, "&Update",
button_new (BY, 36, REPLACE_UPDATE, NORMAL_BUTTON, _("&Update"),
0, 0, "update"), XV_WLAY_RIGHTOF);
add_widgetl (replace_dlg,
button_new (BY, 28, REPLACE_ALWAYS, NORMAL_BUTTON, "al&L",
button_new (BY, 28, REPLACE_ALWAYS, NORMAL_BUTTON, _("al&L"),
0, 0, "all"), XV_WLAY_RIGHTOF);
add_widgetl (replace_dlg, label_new (BY, 5, "Overwrite all targets?", "over-label"),
add_widgetl (replace_dlg, label_new (BY, 5, _("Overwrite all targets?"), "over-label"),
XV_WLAY_CENTERROW);
/* "this target..." widgets */
@ -2453,25 +2456,25 @@ init_replace (enum OperationMode mode)
if ((do_reget == -1 && d_stat->st_size && s_stat->st_size > d_stat->st_size))
add_widgetl (replace_dlg,
button_new (BY - 1, 28, REPLACE_REGET, NORMAL_BUTTON,
"&Reget", 0, 0, "reget"), XV_WLAY_RIGHTOF);
_("&Reget"), 0, 0, "reget"), XV_WLAY_RIGHTOF);
add_widgetl (replace_dlg,
button_new (BY - 2, 45, REPLACE_APPEND, NORMAL_BUTTON, "ap&Pend",
button_new (BY - 2, 45, REPLACE_APPEND, NORMAL_BUTTON, _("ap&Pend"),
0, 0, "append"), XV_WLAY_RIGHTOF);
}
add_widgetl (replace_dlg,
button_new (BY - 2, 37, REPLACE_NO, NORMAL_BUTTON, "&No",
button_new (BY - 2, 37, REPLACE_NO, NORMAL_BUTTON, _("&No"),
0, 0, "no"), XV_WLAY_RIGHTOF);
add_widgetl (replace_dlg,
button_new (BY - 2, 28, REPLACE_YES, NORMAL_BUTTON, "&Yes",
button_new (BY - 2, 28, REPLACE_YES, NORMAL_BUTTON, _("&Yes"),
0, 0, "yes"), XV_WLAY_RIGHTOF);
add_widgetl (replace_dlg, label_new (BY-2,5, "Overwrite this target?", "overlab"),
add_widgetl (replace_dlg, label_new (BY-2,5, _("Overwrite this target?"), "overlab"),
XV_WLAY_CENTERROW);
tk_new_frame (replace_dlg, "i.");
sprintf (buffer, "Target date: %s, size %d",
sprintf (buffer, _("Target date: %s, size %d"),
file_date (d_stat->st_mtime), (int) d_stat->st_size);
add_widgetl (replace_dlg, label_new (6, 5, buffer, "target-date"), XV_WLAY_CENTERROW);
sprintf (buffer, "Source date: %s, size %d",
sprintf (buffer, _("Source date: %s, size %d"),
file_date (s_stat->st_mtime), (int) s_stat->st_size);
add_widgetl (replace_dlg, label_new (5, 5, buffer, "source-date"), XV_WLAY_CENTERROW);
tk_end_frame ();
@ -2535,14 +2538,14 @@ real_query_recursive (enum OperationMode mode, char *s)
if (recursive_result < RECURSIVE_ALWAYS){
char *msg =
mode == Foreground ? "\n Directory not empty. \n Delete it recursively? "
: "\n Background process: Directory not empty \n Delete it recursively? ";
mode == Foreground ? _("\n Directory not empty. \n Delete it recursively? ")
: _("\n Background process: Directory not empty \n Delete it recursively? ");
text = copy_strings (" Delete: ", name_trunc (s, 30), " ", 0);
if (know_not_what_am_i_doing)
query_set_sel (1);
recursive_result = query_dialog (text, msg, 3, 5,
"&Yes", "&No", "a&ll", "non&E", "&Abort");
_("&Yes"), _("&No"), _("a&ll"), _("non&E"), _("&Abort"));
if (recursive_result != RECURSIVE_ABORT)
@ -2550,11 +2553,11 @@ real_query_recursive (enum OperationMode mode, char *s)
free (text);
if (know_not_what_am_i_doing && (recursive_result == RECURSIVE_YES
|| recursive_result == RECURSIVE_ALWAYS)){
text = copy_strings (" Type 'yes' if you REALLY want to delete ",
text = copy_strings (_(" Type 'yes' if you REALLY want to delete "),
recursive_result == RECURSIVE_YES
? name_trunc (s, 19) : "all the directories ", " ", 0);
confirm = input_dialog (mode == Foreground ? " Recursive Delete "
: " Background process: Recursive Delete ",
? name_trunc (s, 19) : _("all the directories "), " ", 0);
confirm = input_dialog (mode == Foreground ? _(" Recursive Delete ")
: _(" Background process: Recursive Delete "),
text, "no");
do_refresh ();
if (!confirm || strcmp (confirm, "yes"))

View File

@ -151,14 +151,14 @@ find_par_start:
find_dlg = create_dlg (0, 0, FIND_Y, FIND_X, dialog_colors,
common_dialog_callback, "[Find File]", "findfile",
DLG_CENTER | DLG_GRID);
x_set_dialog_title (find_dlg, "Find File");
x_set_dialog_title (find_dlg, _("Find File"));
add_widgetl (find_dlg, button_new (9, 36, B_CANCEL, NORMAL_BUTTON,
"&Cancel", 0 ,0, "cancel"), XV_WLAY_RIGHTOF);
_("&Cancel"), 0 ,0, "cancel"), XV_WLAY_RIGHTOF);
add_widgetl (find_dlg, button_new (9, 16, B_TREE, NORMAL_BUTTON,
"&Tree", 0, 0, "tree"), XV_WLAY_RIGHTOF);
_("&Tree"), 0, 0, "tree"), XV_WLAY_RIGHTOF);
add_widgetl (find_dlg, button_new (9, 4, B_ENTER, DEFPUSH_BUTTON,
"&Ok", 0, 0, "ok"), XV_WLAY_CENTERROW);
_("&Ok"), 0, 0, "ok"), XV_WLAY_CENTERROW);
in_with = input_new (7, 14, INPUT_COLOR, 30, in_contents, "content");
add_widgetl (find_dlg, in_with, XV_WLAY_BELOWOF);
@ -169,11 +169,11 @@ find_par_start:
in_start = input_new (3, 14, INPUT_COLOR, 30, in_start_dir, "start");
add_widgetl (find_dlg, in_start, XV_WLAY_NEXTCOLUMN);
add_widgetl (find_dlg, label_new (7, 3, "Content: ", "label-cont"),
add_widgetl (find_dlg, label_new (7, 3, _("Content: "), "label-cont"),
XV_WLAY_BELOWOF);
add_widgetl (find_dlg, label_new (5, 3, "Filename:", "label-file"),
add_widgetl (find_dlg, label_new (5, 3, _("Filename:"), "label-file"),
XV_WLAY_BELOWOF);
add_widgetl (find_dlg, label_new (3, 3, "Start at:", "label-start"),
add_widgetl (find_dlg, label_new (3, 3, _("Start at:"), "label-start"),
XV_WLAY_NEXTCOLUMN);
run_dlg (find_dlg);
@ -366,7 +366,7 @@ search_content (Dlg_head *h, char *directory, char *filename)
return;
}
sprintf (buffer, "Grepping in %s", name_trunc (filename, FIND2_X_USE));
sprintf (buffer, _("Grepping in %s"), name_trunc (filename, FIND2_X_USE));
label_set_text (status_label, buffer);
mc_refresh ();
@ -404,7 +404,7 @@ search_content (Dlg_head *h, char *directory, char *filename)
}
disable_interrupt_key ();
if (i == -1)
message (1, " Find/read ", " Problem reading from child ");
message (1, _(" Find/read "), _(" Problem reading from child "));
mc_doublepclose (pipe, pid);
mc_close (file_fd);
@ -448,7 +448,7 @@ do_search (struct Dlg_head *h)
tmp = pop_directory ();
if (!tmp){
running = 0;
label_set_text (status_label, "Finished");
label_set_text (status_label, _("Finished"));
set_idle_proc (h, 0);
return;
}
@ -468,7 +468,7 @@ do_search (struct Dlg_head *h)
if (verbose){
char buffer [50];
sprintf (buffer, "Searching %s", name_trunc (directory, FIND2_X_USE));
sprintf (buffer, _("Searching %s"), name_trunc (directory, FIND2_X_USE));
label_set_text (status_label, buffer);
}
dirp = mc_opendir (directory);
@ -607,8 +607,8 @@ start_stop (int button, void *extra)
set_idle_proc (find_dlg, running);
is_start = !is_start;
label_set_text (status_label, is_start ? "Stopped" : "Searching");
button_set_text (stop_button, button_labels [is_start]);
label_set_text (status_label, is_start ? _("Stopped") : _("Searching"));
button_set_text (stop_button, _(button_labels [is_start]));
return 0;
}
@ -656,25 +656,25 @@ find_file (char *start_dir, char *pattern, char *content, char **dirname, char
find_dlg = create_dlg (0, 0, FIND2_Y, FIND2_X, dialog_colors,
find_callback, "[Find File]", "mfind", DLG_CENTER | DLG_GRID);
x_set_dialog_title (find_dlg, "Find file");
x_set_dialog_title (find_dlg, _("Find file"));
add_widgetl (find_dlg,
button_new (FIND2_Y-3, 32, B_VIEW, NORMAL_BUTTON, "&Edit - F4", find_do_edit_file, find_dlg, "button-edit"), 0);
button_new (FIND2_Y-3, 32, B_VIEW, NORMAL_BUTTON, _("&Edit - F4"), find_do_edit_file, find_dlg, "button-edit"), 0);
add_widgetl (find_dlg,
button_new (FIND2_Y-3, 17, B_VIEW, NORMAL_BUTTON, "&View - F3", find_do_view_file, find_dlg, "button-view"), 0);
button_new (FIND2_Y-3, 17, B_VIEW, NORMAL_BUTTON, _("&View - F3"), find_do_view_file, find_dlg, "button-view"), 0);
add_widgetl (find_dlg,
button_new (FIND2_Y-3, 3, B_PANELIZE, NORMAL_BUTTON, "Pane&lize", 0, 0, "button-panelize"),
button_new (FIND2_Y-3, 3, B_PANELIZE, NORMAL_BUTTON, _("Pane&lize"), 0, 0, "button-panelize"),
XV_WLAY_CENTERROW);
add_widgetl (find_dlg, button_new (FIND2_Y-4, 37, B_CANCEL, NORMAL_BUTTON, "&Quit", 0, 0, "button-quit"),
add_widgetl (find_dlg, button_new (FIND2_Y-4, 37, B_CANCEL, NORMAL_BUTTON, _("&Quit"), 0, 0, "button-quit"),
XV_WLAY_RIGHTOF);
stop_button = button_new (FIND2_Y-4, 27, B_STOP, NORMAL_BUTTON, "&Stop", start_stop, find_dlg, "start-stop");
stop_button = button_new (FIND2_Y-4, 27, B_STOP, NORMAL_BUTTON, _("&Stop"), start_stop, find_dlg, "start-stop");
add_widgetl (find_dlg, stop_button, XV_WLAY_RIGHTOF);
add_widgetl (find_dlg, button_new (FIND2_Y-4, 16, B_AGAIN, NORMAL_BUTTON, "&Again", 0, 0, "button-again"),
add_widgetl (find_dlg, button_new (FIND2_Y-4, 16, B_AGAIN, NORMAL_BUTTON, _("&Again"), 0, 0, "button-again"),
XV_WLAY_RIGHTOF);
add_widgetl (find_dlg, button_new (FIND2_Y-4, 3, B_ENTER, DEFPUSH_BUTTON, "&Chdir", 0, 0, "button-chdir"),
add_widgetl (find_dlg, button_new (FIND2_Y-4, 3, B_ENTER, DEFPUSH_BUTTON, _("&Chdir"), 0, 0, "button-chdir"),
XV_WLAY_CENTERROW);
status_label = label_new (FIND2_Y-6, 4, "Searching", "label-search");
status_label = label_new (FIND2_Y-6, 4, _("Searching"), "label-search");
add_widgetl (find_dlg, status_label, XV_WLAY_BELOWOF);
find_list = listbox_new (2, 2, FIND2_X-4, FIND2_Y-9, listbox_finish, 0, "listbox");

View File

@ -571,7 +571,7 @@ void help_index_cmd (Dlg_head *h)
currentpoint = startpoint = search_string (data, "[Help]") + 1;
if (!(new_item = search_string (data, "[Contents]")))
message (1, _(" Error "), _(" Can't find node [Contents] in help file "));
message (1, MSG_ERROR, _(" Can't find node [Contents] in help file "));
else
currentpoint = startpoint = new_item + 1;
selected_item = NULL;
@ -746,7 +746,7 @@ static int help_callback (struct Dlg_head *h, int id, int msg)
draw_box (h, 1, 1, help_lines+2, HELP_WINDOW_WIDTH+2);
attrset (COLOR_HOT_NORMAL);
dlg_move (h, 1, (HELP_WINDOW_WIDTH - 1) / 2);
addstr (" Help ");
addstr (_(" Help "));
attrset (HELP_NORMAL_COLOR);
show (h, currentpoint);
break;
@ -769,12 +769,12 @@ void interactive_display (char *filename, char *node)
Widget *md;
if ((data = load_file (filename)) == 0){
message (1, _(" Error "), _(" Can't open file %s \n %s "),
message (1, MSG_ERROR, _(" Can't open file %s \n %s "),
filename, unix_error_string (errno));
return;
}
if (!(main = search_string (data, node))){
message (1, _(" Error "), _(" Can't find node %s in help file "), node);
message (1, MSG_ERROR, _(" Can't find node %s in help file "), node);
interactive_display_finish ();
return;
}

View File

@ -132,16 +132,16 @@ struct _hotlist_but {
char *tkname;
int type;
} hotlist_but[] = {
{ B_MOVE, NORMAL_BUTTON, 1, 42, "&Move", "move", LIST_HOTLIST},
{ B_REMOVE, NORMAL_BUTTON, 1, 30, "&Remove", "r", LIST_HOTLIST},
{ B_APPEND, NORMAL_BUTTON, 1, 15, "&Append", "e", LIST_MOVELIST},
{ B_INSERT, NORMAL_BUTTON, 1, 0, "&Insert", "g", LIST_MOVELIST},
{ B_NEW_ENTRY, NORMAL_BUTTON, 1, 15, "New &Entry", "e", LIST_HOTLIST},
{ B_NEW_GROUP, NORMAL_BUTTON, 1, 0, "New &Group", "g", LIST_HOTLIST},
{ B_CANCEL, NORMAL_BUTTON, 0, 53, "&Cancel", "cc", LIST_HOTLIST|LIST_VFSLIST|LIST_MOVELIST},
{ B_UP_GROUP, NORMAL_BUTTON, 0, 42, "&Up", "up", LIST_HOTLIST|LIST_MOVELIST},
{ B_ADD_CURRENT, NORMAL_BUTTON, 0, 20, "&Add current","ad", LIST_HOTLIST},
{ B_ENTER, DEFPUSH_BUTTON, 0, 0, "Change &To", "ct", LIST_HOTLIST|LIST_VFSLIST|LIST_MOVELIST},
{ B_MOVE, NORMAL_BUTTON, 1, 42, N_("&Move"), "move", LIST_HOTLIST},
{ B_REMOVE, NORMAL_BUTTON, 1, 30, N_("&Remove"), "r", LIST_HOTLIST},
{ B_APPEND, NORMAL_BUTTON, 1, 15, N_("&Append"), "e", LIST_MOVELIST},
{ B_INSERT, NORMAL_BUTTON, 1, 0, N_("&Insert"), "g", LIST_MOVELIST},
{ B_NEW_ENTRY, NORMAL_BUTTON, 1, 15, N_("New &Entry"), "e", LIST_HOTLIST},
{ B_NEW_GROUP, NORMAL_BUTTON, 1, 0, N_("New &Group"), "g", LIST_HOTLIST},
{ B_CANCEL, NORMAL_BUTTON, 0, 53, N_("&Cancel"), "cc", LIST_HOTLIST|LIST_VFSLIST|LIST_MOVELIST},
{ B_UP_GROUP, NORMAL_BUTTON, 0, 42, N_("&Up"), "up", LIST_HOTLIST|LIST_MOVELIST},
{ B_ADD_CURRENT, NORMAL_BUTTON, 0, 20, N_("&Add current"),"ad", LIST_HOTLIST},
{ B_ENTER, DEFPUSH_BUTTON, 0, 0, N_("Change &To"), "ct", LIST_HOTLIST|LIST_VFSLIST|LIST_MOVELIST},
};
/* Directory hotlist */
@ -199,7 +199,7 @@ static INLINE void update_path_name ()
if (hlp->type == HL_TYPE_ENTRY)
text = hlp->directory;
else
text = "Subgroup - press ENTER to see list";
text = _("Subgroup - press ENTER to see list");
#ifndef HAVE_X
p = copy_strings (" ", current_group->label, " ", (char *)0);
@ -533,9 +533,9 @@ static void init_hotlist (int list_type)
list_type == LIST_VFSLIST ? "vfshot" : "hotlist",
DLG_CENTER|DLG_GRID);
x_set_dialog_title (hotlist_dlg,
list_type == LIST_VFSLIST ? "Active VFS directories" : "Directory hotlist");
list_type == LIST_VFSLIST ? _("Active VFS directories") : _("Directory hotlist"));
#define XTRACT(i) BY+hotlist_but[i].y, BX+hotlist_but[i].x, hotlist_but[i].ret_cmd, hotlist_but[i].flags, hotlist_but[i].text, hotlist_button_callback, 0, hotlist_but[i].tkname
#define XTRACT(i) BY+hotlist_but[i].y, BX+hotlist_but[i].x, hotlist_but[i].ret_cmd, hotlist_but[i].flags, _(hotlist_but[i].text), hotlist_button_callback, 0, hotlist_but[i].tkname
for (i = 0; i < BUTTONS; i++){
if (hotlist_but[i].type & list_type)
@ -552,10 +552,10 @@ static void init_hotlist (int list_type)
add_widget (hotlist_dlg, pname);
#ifndef HAVE_X
if (!hotlist_state.moving) {
add_widget (hotlist_dlg, label_new (UY-12+LINES, UX+1, " Directory path ", NULL));
add_widget (hotlist_dlg, label_new (UY-12+LINES, UX+1, _(" Directory path "), NULL));
/* This one holds the displayed pathname */
pname_group = label_new (UY, UX+1, " Directory label ", NULL);
pname_group = label_new (UY, UX+1, _(" Directory label "), NULL);
add_widget (hotlist_dlg, pname_group);
}
#endif
@ -576,7 +576,7 @@ static void init_hotlist (int list_type)
static void init_movelist (int list_type, struct hotlist *item)
{
int i;
char *hdr = copy_strings ("Moving ", item->label, 0);
char *hdr = copy_strings (_("Moving "), item->label, 0);
do_refresh ();
@ -601,7 +601,7 @@ static void init_movelist (int list_type, struct hotlist *item)
* that one will hold the path name label
*/
#ifndef HAVE_X
movelist_group = label_new (UY, UX+1, " Directory label ", NULL);
movelist_group = label_new (UY, UX+1, _(" Directory label "), NULL);
add_widget (movelist_dlg, movelist_group);
#endif
/* get new listbox */
@ -694,11 +694,11 @@ static int add_new_entry_input (char *header, char *text1, char *text2, char *he
{
QuickDialog Quick_input;
QuickWidget quick_widgets [] = {
{ quick_button, 55, 80, 4, 0, "&Cancel", 0, B_CANCEL, 0, 0,
{ quick_button, 55, 80, 4, 0, _("&Cancel"), 0, B_CANCEL, 0, 0,
XV_WLAY_DONTCARE, "button-cancel" },
{ quick_button, 30, 80, 4, 0, "&Insert", 0, B_INSERT, 0, 0,
{ quick_button, 30, 80, 4, 0, _("&Insert"), 0, B_INSERT, 0, 0,
XV_WLAY_DONTCARE, "button-insert" },
{ quick_button, 10, 80, 4, 0, "&Append", 0, B_APPEND, 0, 0,
{ quick_button, 10, 80, 4, 0, _("&Append"), 0, B_APPEND, 0, 0,
XV_WLAY_DONTCARE, "button-append" },
{ quick_input, 4, 80, 4, 0, "",58, 0, 0, 0, XV_WLAY_BELOWCLOSE, "input-pth" },
{ quick_label, 3, 80, 3, 0, 0, 0, 0, 0, 0, XV_WLAY_DONTCARE, "label-pth" },
@ -720,6 +720,7 @@ static int add_new_entry_input (char *header, char *text1, char *text2, char *he
Quick_input.title = header;
Quick_input.help = help;
Quick_input.class = "hotlist_new_entry";
Quick_input.i18n = 0;
quick_widgets [6].text = text1;
quick_widgets [4].text = text2;
quick_widgets [5].text = *r1;
@ -755,7 +756,7 @@ static void add_new_entry_cmd (void)
/* Take current directory as default value for input fields */
title = url = cpanel->cwd;
ret = add_new_entry_input ("New hotlist entry", "Directory label", "Directory path",
ret = add_new_entry_input (_("New hotlist entry"), _("Directory label"), _("Directory path"),
"[Hotlist]", &title, &url);
if (!ret || !title || !*title || !url || !*url)
@ -774,11 +775,11 @@ static int add_new_group_input (char *header, char *label, char **result)
int ret;
QuickDialog Quick_input;
QuickWidget quick_widgets [] = {
{ quick_button, 55, 80, 1, 0, "&Cancel", 0, B_CANCEL, 0, 0,
{ quick_button, 55, 80, 1, 0, N_("&Cancel"), 0, B_CANCEL, 0, 0,
XV_WLAY_DONTCARE, "button-cancel" },
{ quick_button, 30, 80, 1, 0, "&Insert", 0, B_INSERT, 0, 0,
{ quick_button, 30, 80, 1, 0, N_("&Insert"), 0, B_INSERT, 0, 0,
XV_WLAY_DONTCARE, "button-insert" },
{ quick_button, 10, 80, 1, 0, "&Append", 0, B_APPEND, 0, 0,
{ quick_button, 10, 80, 1, 0, N_("&Append"), 0, B_APPEND, 0, 0,
XV_WLAY_DONTCARE, "button-append" },
{ quick_input, 4, 80, 0, 0, "", 58, 0, 0, 0, XV_WLAY_BELOWCLOSE, "input" },
{ quick_label, 3, 80, 2, 0, 0, 0, 0, 0, 0, 0, XV_WLAY_DONTCARE, "label" },
@ -797,6 +798,7 @@ static int add_new_group_input (char *header, char *label, char **result)
Quick_input.title = header;
Quick_input.help = "[Hotlist]";
Quick_input.class = "hotlist_new_group";
Quick_input.i18n = 0;
quick_widgets [4].text = label;
for (i = 0; i < 5; i++)
@ -822,7 +824,7 @@ void add_new_group_cmd (void)
char *label;
int ret;
ret = add_new_group_input (" New hotlist group ", "Name of new group", &label);
ret = add_new_group_input (_(" New hotlist group "), _("Name of new group"), &label);
if (!ret || !label || !*label)
return;
@ -839,8 +841,8 @@ void add2hotlist_cmd (void)
char *prompt, *label;
prompt = xmalloc (strlen (cpanel->cwd) + 20, "add2hotlist_cmd");
sprintf (prompt, "Label for \"%s\":", name_trunc (cpanel->cwd, COLS-2*UX-23));
label = input_dialog (" Add to hotlist ", prompt, cpanel->cwd);
sprintf (prompt, _("Label for \"%s\":"), name_trunc (cpanel->cwd, COLS-2*UX-23));
label = input_dialog (_(" Add to hotlist "), prompt, cpanel->cwd);
free (prompt);
if (!label || !*label)
return;
@ -877,13 +879,13 @@ static void remove_from_hotlist (struct hotlist *entry)
char *header;
int result;
header = copy_strings (" Remove: ",
header = copy_strings (_(" Remove: "),
name_trunc (entry->label, 30),
" ",
0);
result = query_dialog (header, "\n Group not empty.\n Remove it?",
result = query_dialog (header, _("\n Group not empty.\n Remove it?"),
D_ERROR, 2,
"&No", "&Yes");
_("&No"), _("&Yes"));
free (header);
if (!result)
@ -1225,7 +1227,7 @@ void load_hotlist (void)
hotlist = new_hotlist ();
hotlist->type = HL_TYPE_GROUP;
hotlist->label = strdup (" Top level group ");
hotlist->label = strdup (_(" Top level group "));
hotlist->up = hotlist;
/*
* compatibility :-(
@ -1239,12 +1241,14 @@ void load_hotlist (void)
if ((hotlist_file = fopen (hotlist_file_name, "r")) == 0) {
int result;
char *msg;
message (0, " Hotlist Load ",
"Hotlist is now kept in file ~/" HOTLIST_FILENAME,
"MC will load hotlist from ~/" PROFILE_NAME " and then",
"delete [Hotlist] section there"
);
msg = copy_strings (_("Hotlist is now kept in file ~/"), HOTLIST_FILENAME,
_("MC will load hotlist from ~/"), PROFILE_NAME,
_(" and then delete [Hotlist] section there"), NULL);
message (0, _(" Hotlist Load "), msg);
free (msg);
load_group (hotlist);
hotlist_state.loaded = 1;
/*
@ -1256,9 +1260,13 @@ void load_hotlist (void)
if (result) {
remove_old_list = 1;
} else {
message (D_ERROR, " Hotlist Load ",
"MC was unable to write ~/" HOTLIST_FILENAME " file"
"your old hotlist entries were not deleted");
char *msg;
msg = copy_strings (_("MC was unable to write ~/"), HOTLIST_FILENAME,
_(" file, your old hotlist entries were not deleted"), NULL);
message (D_ERROR, _(" Hotlist Load "), msg);
free (msg);
}
} else {
hot_load_file (hotlist);
@ -1266,19 +1274,22 @@ void load_hotlist (void)
hotlist_state.loaded = 1;
if (has_old_list) {
int result;
char *msg;
result = query_dialog (" Hotlist Load ",
"You have ~/" HOTLIST_FILENAME " file and [Hotlist] section in ~/" PROFILE_NAME "\n" /**/
"Your ~/" HOTLIST_FILENAME " most probably was created\n" /**/
"by an earlier development version of MC\n" /**/
"and is more actual than ~/" PROFILE_NAME " entries\n\n" /**/
"You can choose between\n\n" /**/
" Remove - remove old hotlist entries from ~/" PROFILE_NAME "\n" /**/
" Keep - keep your old entries; you will be asked\n" /**/
" the same question next time\n" /**/
" Merge - add old entries to hotlist as group \"Entries from ~/" PROFILE_NAME "\"\n\n",
D_ERROR, 3, "&Remove", "&Keep", "&Merge"
);
msg = copy_strings (
_("You have ~/"), HOTLIST_FILENAME, _(" file and [Hotlist] section in ~/"), PROFILE_NAME, "\n",
_("Your ~/"), HOTLIST_FILENAME, _(" most probably was created\n"),
_("by an earlier development version of MC\nand is more actual than ~/"),
PROFILE_NAME, _(" entries\n\n"),
_("You can choose between\n\n"
" Remove - remove old hotlist entries from ~/"), PROFILE_NAME, "\n",
_(" Keep - keep your old entries; you will be asked\n"
" the same question next time\n"
" Merge - add old entries to hotlist as group \"Entries from ~/"),
PROFILE_NAME, "\"\n\n", NULL);
result = query_dialog (_(" Hotlist Load "),
msg, D_ERROR, 3, _("&Remove"), _("&Keep"), _("&Merge"));
if (result == 0)
remove_old_list = 1;
else if (result == 2) {
@ -1290,17 +1301,21 @@ void load_hotlist (void)
old = new_hotlist ();
old->type = HL_TYPE_GROUP;
old->label = strdup (" Entries from ~/" PROFILE_NAME);
old->label = copy_strings (_(" Entries from ~/"), PROFILE_NAME, NULL);
old->up = hotlist;
old->head = hotlist->head;
old->next = grp;
hotlist->head = old;
hotlist_state.modified = 1;
if (!save_hotlist ())
message (D_ERROR, " Hotlist Load ",
"MC was unable to write ~/" HOTLIST_FILENAME " file"
"your old hotlist entries were not deleted");
else
if (!save_hotlist ()){
char *str;
str = copy_strings (_("MC was unable to write ~/"), HOTLIST_FILENAME,
_(" file your old hotlist entries were not deleted"), NULL);
message (D_ERROR, _(" Hotlist Load "), str);
free (str);
} else
remove_old_list = 1;
hotlist_state.modified = 0;
}

29
src/i18n.h Normal file
View File

@ -0,0 +1,29 @@
/* GNOME already handles the intenrationalization issues */
#ifndef _MC_I18N_H_
#define _MC_I18N_H_
#ifdef HAVE_GNOME
# include <libgnome/gnome-defs.h>
# include <libgnome/gnome-i18n.h>
#else
# ifdef ENABLE_NLS
# include <libintl.h>
# define _(String) gettext (String)
# ifdef gettext_noop
# define N_(String) gettext_noop (String)
# else
# define N_(String) (String)
# endif
# else
/* Stubs that do something close enough. */
# define textdomain(String) (String)
# define gettext(String) (String)
# define dgettext(Domain,Message) (Message)
# define dcgettext(Domain,Message,Type) (Message)
# define bindtextdomain(Domain,Directory) (Domain)
# define _(String) (String)
# define N_(String) (String)
# endif
#endif
#endif /* _MC_I18N_H_ */

View File

@ -75,7 +75,7 @@ void info_show_info (WInfo *info)
info_box (info->widget.parent, info);
attrset (MARKED_COLOR);
widget_move (&info->widget, 1, 3);
printw ("Midnight Commander %s", VERSION);
printw (_("Midnight Commander %s"), VERSION);
attrset (NORMAL_COLOR);
widget_move (&info->widget, 2, 1);
/* .ado: info->widget.x has wrong value (==0) on NT and OS/2, why? */
@ -107,51 +107,51 @@ void info_show_info (WInfo *info)
case 16:
widget_move (&info->widget, 16, 3);
if (myfs_stats.nfree >0 || myfs_stats.nodes > 0)
printw ("Free nodes %d (%d%%) of %d",
printw (_("Free nodes %d (%d%%) of %d"),
myfs_stats.nfree,
myfs_stats.total
? 100 * myfs_stats.nfree / myfs_stats.nodes : 0,
myfs_stats.nodes);
else
addstr ("No node information");
addstr (_("No node information"));
case 15:
widget_move (&info->widget, 15, 3);
if (myfs_stats.avail > 0 || myfs_stats.total > 0){
addstr ("Free space ");
addstr (_("Free space "));
print_bytesize (myfs_stats.avail, 1);
printw (" (%d%%) of ", myfs_stats.total
printw (_(" (%d%%) of "), myfs_stats.total
? 100 * myfs_stats.avail / myfs_stats.total : 0);
print_bytesize (myfs_stats.total, 1);
} else
addstr ("No space information");
addstr (_("No space information"));
case 14:
widget_move (&info->widget, 14, 3);
printw ("Type: %s ", myfs_stats.typename ? myfs_stats.typename : "non-local vfs");
printw (_("Type: %s "), myfs_stats.typename ? myfs_stats.typename : _("non-local vfs"));
if (myfs_stats.type != 0xffff && myfs_stats.type != 0xffffffff)
printw (" (%Xh)", myfs_stats.type);
case 13:
widget_move (&info->widget, 13, 3);
printw ("Device: %s",
printw (_("Device: %s"),
name_trunc (myfs_stats.device, info->widget.cols - 15));
case 12:
widget_move (&info->widget, 12, 3);
printw ("Filesystem: %s",
printw (_("Filesystem: %s"),
name_trunc (myfs_stats.mpoint, info->widget.cols - 15));
case 11:
widget_move (&info->widget, 11, 3);
printw ("Accessed: %s", file_date (buf.st_atime));
printw (_("Accessed: %s"), file_date (buf.st_atime));
case 10:
widget_move (&info->widget, 10, 3);
printw ("Modified: %s", file_date (buf.st_mtime));
printw (_("Modified: %s"), file_date (buf.st_mtime));
case 9:
widget_move (&info->widget, 9, 3);
printw ("Created: %s", file_date (buf.st_ctime));
printw (_("Created: %s"), file_date (buf.st_ctime));
case 8:
widget_move (&info->widget, 8, 3);
@ -164,40 +164,40 @@ void info_show_info (WInfo *info)
#endif
#endif
{
printw ("Size: ");
printw (_("Size: "));
print_bytesize (buf.st_size, 0);
#ifdef HAVE_ST_BLOCKS
printw (" (%d blocks)", buf.st_blocks);
printw (_(" (%d blocks)"), buf.st_blocks);
#endif
}
case 7:
widget_move (&info->widget, 7, 3);
printw ("Owner: %s/%s", get_owner (buf.st_uid),
printw (_("Owner: %s/%s"), get_owner (buf.st_uid),
get_group (buf.st_gid));
case 6:
widget_move (&info->widget, 6, 3);
printw ("Links: %d", buf.st_nlink);
printw (_("Links: %d"), buf.st_nlink);
case 5:
widget_move (&info->widget, 5, 3);
printw ("Mode: %s (%04o)",
printw (_("Mode: %s (%04o)"),
string_perm (buf.st_mode), buf.st_mode & 07777);
case 4:
widget_move (&info->widget, 4, 3);
printw ("Location: %Xh:%Xh", buf.st_dev, buf.st_ino);
printw (_("Location: %Xh:%Xh"), buf.st_dev, buf.st_ino);
case 3:
widget_move (&info->widget, 3, 2);
/* .ado: fname is invalid if selected == 0 && ifno called from current panel */
if (cpanel->selected){
printw ("File: %s",
printw (_("File: %s"),
name_trunc (cpanel->dir.list [cpanel->selected].fname,
info->widget.cols - 15));
} else
printw ("File: None");
printw (_("File: None"));
case 2:
case 1:

View File

@ -159,15 +159,15 @@ static struct {
WCheck *widget;
char *tkname;
} check_options [] = {
{ "&Xterm hintbar", &xterm_hintbar, 0, "h" },
{ "h&Intbar visible", &message_visible, 0, "v" },
{ "&Keybar visible", &keybar_visible, 0, "k" },
{ "command &Prompt", &command_prompt, 0, "p" },
{ "show &Mini status", &show_mini_info, 0, "m" },
{ "menu&Bar visible", &menubar_visible, 0, "me" },
{ "&Equal split", &equal_split, 0, "eq" },
{ "pe&Rmissions", &permission_mode, 0, "pr" },
{ "&File types", &filetype_mode, 0, "ft" },
{ N_("&Xterm hintbar"), &xterm_hintbar, 0, "h" },
{ N_("h&Intbar visible"), &message_visible, 0, "v" },
{ N_("&Keybar visible"), &keybar_visible, 0, "k" },
{ N_("command &Prompt"), &command_prompt, 0, "p" },
{ N_("show &Mini status"), &show_mini_info, 0, "m" },
{ N_("menu&Bar visible"), &menubar_visible, 0, "me" },
{ N_("&Equal split"), &equal_split, 0, "eq" },
{ N_("pe&Rmissions"), &permission_mode, 0, "pr" },
{ N_("&File types"), &filetype_mode, 0, "ft" },
{ 0, 0, 0, 0 }
};
@ -276,13 +276,13 @@ static int layout_callback (struct Dlg_head *h, int Id, int Msg)
attrset (COLOR_HOT_NORMAL);
dlg_move (h, 1, 25);
addstr (" Layout ");
addstr (_(" Layout "));
dlg_move (h, 2, 5);
addstr (" Panel split ");
addstr (_(" Panel split "));
dlg_move (h, 8, 5);
addstr (" Highlight... ");
addstr (_(" Highlight... "));
dlg_move (h, 2, 30);
addstr (" Other options ");
addstr (_(" Other options "));
update_split ();
dlg_move (h, 6, 13);
addch ('=');
@ -291,7 +291,7 @@ static int layout_callback (struct Dlg_head *h, int Id, int Msg)
old_output_lines = _output_lines;
attrset (COLOR_NORMAL);
dlg_move (h, 9, 40);
addstr ("output lines");
addstr (_("output lines"));
dlg_move (h, 9, 34);
printw ("%02d", _output_lines);
}
@ -358,16 +358,16 @@ static void init_layout (void)
layout_dlg = create_dlg (0, 0, 15, 58, dialog_colors, layout_callback,
"[Layout]", "layout", DLG_CENTER | DLG_GRID);
x_set_dialog_title (layout_dlg, "Layout");
x_set_dialog_title (layout_dlg, _("Layout"));
add_widgetl (layout_dlg,
button_new (BY, BX+25, B_CANCEL, NORMAL_BUTTON, "&Cancel", 0, 0, "c"),
button_new (BY, BX+25, B_CANCEL, NORMAL_BUTTON, _("&Cancel"), 0, 0, "c"),
XV_WLAY_RIGHTOF);
add_widgetl (layout_dlg,
button_new (BY, BX+12, B_EXIT, NORMAL_BUTTON, "&Save", 0, 0, "s"),
button_new (BY, BX+12, B_EXIT, NORMAL_BUTTON, _("&Save"), 0, 0, "s"),
XV_WLAY_RIGHTOF);
add_widgetl (layout_dlg,
button_new (BY, BX, B_ENTER, DEFPUSH_BUTTON, "&Ok", 0, 0, "o"),
button_new (BY, BX, B_ENTER, DEFPUSH_BUTTON, _("&Ok"), 0, 0, "o"),
XV_WLAY_CENTERROW);
#ifndef HAVE_X
if (console_flag){
@ -378,18 +378,18 @@ static void init_layout (void)
}
#endif
#define XTRACT(i) *check_options[i].variable, check_options[i].text, check_options[i].tkname
#define XTRACT(i) *check_options[i].variable, _(check_options[i].text), check_options[i].tkname
for (i = 0; i < 6; i++){
check_options [i].widget = check_new (8 - i, 31, XTRACT(i));
add_widgetl (layout_dlg, check_options [i].widget, XV_WLAY_BELOWCLOSE);
}
#ifdef HAVE_XVIEW
add_widgetl (layout_dlg, label_new (2, 30, "Other options", "oo"),
add_widgetl (layout_dlg, label_new (2, 30, _("Other options"), "oo"),
XV_WLAY_NEXTCOLUMN);
add_widgetl (layout_dlg, label_new (8, 5, "Highlight...", "hl"),
add_widgetl (layout_dlg, label_new (8, 5, _("Highlight..."), "hl"),
XV_WLAY_NEXTCOLUMN);
add_widgetl (layout_dlg, label_new (2, 5, "Panel split", "ps"),
add_widgetl (layout_dlg, label_new (2, 5, _("Panel split"), "ps"),
XV_WLAY_NEXTCOLUMN);
#endif
check_options [8].widget = check_new (10, 6, XTRACT(8));

View File

@ -55,8 +55,8 @@ struct {
int ret_cmd, flags, y, x;
char *text;
} learn_but[BUTTONS] = {
{ B_CANCEL, NORMAL_BUTTON, 0, 14, "&Cancel" },
{ B_ENTER, DEFPUSH_BUTTON, 0, 0, "&Save" }
{ B_CANCEL, NORMAL_BUTTON, 0, 14, N_("&Cancel") },
{ B_ENTER, DEFPUSH_BUTTON, 0, 0, N_("&Save") }
};
static Dlg_head *learn_dlg;
@ -88,14 +88,14 @@ static void learn_refresh (void)
static int learn_button (int action, void *param)
{
unsigned char *seq;
Dlg_head *d = message (D_INSERT | 1, " Teach me a key ",
"Please press the %s\n"
Dlg_head *d = message (D_INSERT | 1, _(" Teach me a key "),
_("Please press the %s\n"
"and then wait until this message disappears.\n\n"
"Then, press it again to see if OK appears\n"
"next to its button.\n\n"
"If you want to escape, press a single Escape key\n"
"and wait as well.",
key_name_conv_tab [action - B_USER].longname);
"and wait as well."),
_(key_name_conv_tab [action - B_USER].longname));
mc_refresh ();
if (learnkeys [action - B_USER].sequence != NULL) {
free (learnkeys [action - B_USER].sequence);
@ -117,8 +117,8 @@ static int learn_button (int action, void *param)
define_sequence (key_name_conv_tab [action - B_USER].code, seq,
MCKEY_NOACTION);
} else {
message (0, " Cannot accept this key ",
" You have entered \"%s\"", seq);
message (0, _(" Cannot accept this key "),
_(" You have entered \"%s\""), seq);
}
free (seq);
@ -165,21 +165,21 @@ static int learn_check_key (int c)
if (!learnkeys [i].ok) {
dlg_select_widget (learn_dlg, learnkeys [i].button);
label_set_text ((WLabel *) learnkeys [i].label,
"OK");
_("OK"));
learnkeys [i].ok = 1;
learnok++;
if (learnok >= learn_total) {
learn_dlg->ret_value = B_CANCEL;
if (learnchanged) {
if (query_dialog (" Learn keys ", "\
It seems that all your keys already\n\
work fine. That's great.",
1, 2, "&Save", "&Discard") == 0)
if (query_dialog (_(" Learn keys "),
_("It seems that all your keys already\n"
"work fine. That's great."),
1, 2, _("&Save"), _("&Discard")) == 0)
learn_dlg->ret_value = B_ENTER;
} else {
message (1, " Learn keys ", "\
Great! You have a complete terminal database!\n\
All your keys work well.");
message (1, _(" Learn keys "),
_("Great! You have a complete terminal database!\n"
"All your keys work well."));
}
dlg_stop (learn_dlg);
}
@ -234,9 +234,9 @@ static void init_learn (void)
learn_dlg = create_dlg (0, 0, 23, 78, dialog_colors,
learn_callback, "[Learn keys]", "Learn keys",
DLG_CENTER);
x_set_dialog_title (learn_dlg, "Learn keys");
x_set_dialog_title (learn_dlg, _("Learn keys"));
#define XTRACT(i) BY+learn_but[i].y, BX+learn_but[i].x, learn_but[i].ret_cmd, learn_but[i].flags, learn_but[i].text, 0, 0, NULL
#define XTRACT(i) BY+learn_but[i].y, BX+learn_but[i].x, learn_but[i].ret_cmd, learn_but[i].flags, _(learn_but[i].text), 0, 0, NULL
for (i = 0; i < BUTTONS; i++)
add_widget (learn_dlg, button_new (XTRACT (i)));
@ -254,7 +254,7 @@ static void init_learn (void)
for (i = j - 1, key = key_name_conv_tab + j - 1; i >= 0; i--, key--) {
learnkeys [i].ok = 0;
learnkeys [i].sequence = NULL;
sprintf (buffer, "%-16s", key->longname);
sprintf (buffer, "%-16s", _(key->longname));
add_widget (learn_dlg, learnkeys [i].button = (Widget *)
button_new (y, x, B_USER + i, NARROW_BUTTON, buffer, learn_button, 0, NULL));
add_widget (learn_dlg, learnkeys [i].label = (Widget *)
@ -266,9 +266,12 @@ static void init_learn (void)
y = UY + ROWS - 1;
}
}
add_widget (learn_dlg, label_new (UY+14, 5, "Press all the keys mentioned here. After you have done it, check", NULL));
add_widget (learn_dlg, label_new (UY+15, 5, "which keys are not marked with OK. Press space on the missing", NULL));
add_widget (learn_dlg, label_new (UY+16, 5, "key, or click with the mouse to define it. Move around with Tab.", NULL));
add_widget (learn_dlg,
label_new (UY+14, 5, _("Press all the keys mentioned here. After you have done it, check"), NULL));
add_widget (learn_dlg,
label_new (UY+15, 5, _("which keys are not marked with OK. Press space on the missing"), NULL));
add_widget (learn_dlg,
label_new (UY+16, 5, _("key, or click with the mouse to define it. Move around with Tab."), NULL));
}
static void learn_done (void)

View File

@ -673,11 +673,11 @@ void
do_possible_cd (char *new_dir)
{
if (!do_cd (new_dir, cd_exact))
message (1, " Warning ",
" The Commander can't change to the directory that \n"
" the subshell claims you are in. Perhaps you have \n"
" deleted your working directory, or given yourself \n"
" extra access permissions with the \"su\" command? ");
message (1, _(" Warning "),
_(" The Commander can't change to the directory that \n"
" the subshell claims you are in. Perhaps you have \n"
" deleted your working directory, or given yourself \n"
" extra access permissions with the \"su\" command? "));
}
void
@ -752,7 +752,7 @@ do_execute (const char *shell, const char *command, int internal_command)
if ((pause_after_run == pause_always ||
(pause_after_run == pause_on_dumb_terminals &&
!xterm_flag && !console_flag)) && !quit){
printf ("Press any key to continue...");
printf (_("Press any key to continue..."));
last_paused = 1;
fflush (stdout);
mc_raw_mode ();
@ -802,7 +802,7 @@ shell_execute (char *command, int internal)
if (subshell_state == INACTIVE || force_subshell_execution)
do_execute (shell, command, internal);
else
message (1, " Error ", " The shell is already running a command ");
message (1, MSG_ERROR, _(" The shell is already running a command "));
else
#endif
do_execute (shell, command, internal);
@ -829,9 +829,9 @@ quit_cmd_internal (int quiet)
if (quiet || !confirm_exit){
q = 1;
} else {
if (query_dialog (" The Midnight Commander ",
" Do you really want to quit the Midnight Commander? ",
0, 2, "&Yes", "&No") == 0)
if (query_dialog (_(" The Midnight Commander "),
_(" Do you really want to quit the Midnight Commander? "),
0, 2, _("&Yes"), _("&No")) == 0)
q = 1;
}
if (q){
@ -1158,71 +1158,71 @@ void init_menu () {};
void done_menu () {};
#else
static menu_entry PanelMenu [] = {
{ ' ', "Listing mode...", 'L', listing_cmd },
{ ' ', "Quick view C-x q", 'Q', quick_view_cmd },
{ ' ', "Info C-x i", 'I', info_cmd },
{ ' ', "Tree", 'T', tree_cmd },
{ ' ', "", ' ', 0 },
{ ' ', "Sort order...", 'S', sort_cmd },
{ ' ', "", ' ', 0 },
{ ' ', "Filter...", 'F', filter_cmd },
#ifdef USE_NETCODE
{ ' ', "", ' ', 0 },
{ ' ', "Network link...", 'N', netlink_cmd },
{ ' ', "FTP link...", 'P', ftplink_cmd },
{ ' ', N_("Listing mode..."), 'L', listing_cmd },
{ ' ', N_("Quick view C-x q"), 'Q', quick_view_cmd },
{ ' ', N_("Info C-x i"), 'I', info_cmd },
{ ' ', N_("Tree"), 'T', tree_cmd },
{ ' ', "", ' ', 0 },
{ ' ', N_("Sort order..."), 'S', sort_cmd },
{ ' ', "", ' ', 0 },
{ ' ', N_("Filter..."), 'F', filter_cmd },
#ifdef USE_NETCODE
{ ' ', "", ' ', 0 },
{ ' ', N_("Network link..."), 'N', netlink_cmd },
{ ' ', N_("FTP link..."), 'P', ftplink_cmd },
#endif
{ ' ', "", ' ', 0 },
#ifdef OS2_NT
{ ' ', "Drive... M-d", ALT('d'), drive_cmd_a },
{ ' ', N_("Drive... M-d"),ALT('d'), drive_cmd_a },
#endif
{ ' ', "Rescan C-r", XCTRL('R'), reread_cmd }
{ ' ', N_("Rescan C-r"),XCTRL('R'), reread_cmd }
};
static menu_entry RightMenu [] = {
{ ' ', "Listing mode...", 'L', listing_cmd },
{ ' ', "Quick view C-x q", 'Q', quick_view_cmd },
{ ' ', "Info C-x i", 'I', info_cmd },
{ ' ', "Tree", 'T', tree_cmd },
{ ' ', "", ' ', 0 },
{ ' ', "Sort order...", 'S', sort_cmd },
{ ' ', "", ' ', 0 },
{ ' ', "Filter...", 'F', filter_cmd },
#ifdef USE_NETCODE
{ ' ', "", ' ', 0 },
{ ' ', "Network link...", 'N', netlink_cmd },
{ ' ', "FTP link...", 'P', ftplink_cmd },
{ ' ', N_("Listing mode..."), 'L', listing_cmd },
{ ' ', N_("Quick view C-x q"), 'Q', quick_view_cmd },
{ ' ', N_("Info C-x i"), 'I', info_cmd },
{ ' ', N_("Tree"), 'T', tree_cmd },
{ ' ', "", ' ', 0 },
{ ' ', N_("Sort order..."), 'S', sort_cmd },
{ ' ', "", ' ', 0 },
{ ' ', N_("Filter..."), 'F', filter_cmd },
#ifdef USE_NETCODE
{ ' ', "", ' ', 0 },
{ ' ', N_("Network link..."), 'N', netlink_cmd },
{ ' ', N_("FTP link..."), 'P', ftplink_cmd },
#endif
{ ' ', "", ' ', 0 },
#ifdef OS2_NT
{ ' ', "Drive... M-d", ALT('d'), drive_cmd_b },
{ ' ', N_("Drive... M-d"),ALT('d'), drive_cmd_b },
#endif
{ ' ', "Rescan C-r", XCTRL('R'), reread_cmd }
{ ' ', N_("Rescan C-r"),XCTRL('R'), reread_cmd }
};
static menu_entry FileMenu [] = {
{ ' ', "User menu F2", KEY_F(2), user_menu_cmd },
{ ' ', "View F3", KEY_F(3), view_cmd },
{ ' ', "Filtered view M-!", ALT('!'), filtered_view_cmd },
{ ' ', "Edit F4", KEY_F(4), edit_cmd },
{ ' ', "Copy F5", KEY_F(5), copy_cmd },
{ ' ', "Chmod C-x c", 'C', chmod_cmd },
{ ' ', N_("User menu F2"), KEY_F(2), user_menu_cmd },
{ ' ', N_("View F3"), KEY_F(3), view_cmd },
{ ' ', N_("Filtered view M-!"), ALT('!'), filtered_view_cmd },
{ ' ', N_("Edit F4"), KEY_F(4), edit_cmd },
{ ' ', N_("Copy F5"), KEY_F(5), copy_cmd },
{ ' ', N_("Chmod C-x c"), 'C', chmod_cmd },
#ifndef OS2_NT
{ ' ', "Link C-x l", 'L', link_cmd },
{ ' ', "SymLink C-x s", 'S', symlink_cmd },
{ ' ', "edit sYmlink C-x C-s", 'Y', edit_symlink_cmd },
{ ' ', "chOwn C-x o", 'O', chown_cmd },
{ ' ', "Advanced chown ", 'A', chown_advanced_cmd },
{ ' ', N_("Link C-x l"), 'L', link_cmd },
{ ' ', N_("SymLink C-x s"), 'S', symlink_cmd },
{ ' ', N_("edit sYmlink C-x C-s"), 'Y', edit_symlink_cmd },
{ ' ', N_("chOwn C-x o"), 'O', chown_cmd },
{ ' ', N_("Advanced chown "), 'A', chown_advanced_cmd },
#endif
{ ' ', "Rename/Move F6", KEY_F(6), ren_cmd },
{ ' ', "Mkdir F7", KEY_F(7), mkdir_cmd },
{ ' ', "Delete F8", KEY_F(8), delete_cmd },
{ ' ', "Quick cd M-c", ALT('c'), quick_cd_cmd },
{ ' ', N_("Rename/Move F6"), KEY_F(6), ren_cmd },
{ ' ', N_("Mkdir F7"), KEY_F(7), mkdir_cmd },
{ ' ', N_("Delete F8"), KEY_F(8), delete_cmd },
{ ' ', N_("Quick cd M-c"), ALT('c'), quick_cd_cmd },
{ ' ', "", ' ', 0 },
{ ' ', "Select group M-+", ALT('+'), select_cmd },
{ ' ', "Unselect group M-\\",ALT('\\'), unselect_cmd },
{ ' ', "Reverse selection M-*", ALT('*'), reverse_selection_cmd },
{ ' ', N_("Select group M-+"), ALT('+'), select_cmd },
{ ' ', N_("Unselect group M-\\"),ALT('\\'), unselect_cmd },
{ ' ', N_("Reverse selection M-*"), ALT('*'), reverse_selection_cmd },
{ ' ', "", ' ', 0 },
{ ' ', "Quit F10", KEY_F(10), (callfn) quit_cmd }
{ ' ', N_("Quit F10"), KEY_F(10), (callfn) quit_cmd }
};
void external_panelize (void);
@ -1231,51 +1231,51 @@ static menu_entry CmdMenu [] = {
* as a panel still has some problems, I have not yet finished
* the WTree widget port, sorry.
*/
{ ' ', "Directory tree", 'D', tree_box },
{ ' ', "Find file M-?", ALT('?'), find_cmd },
{ ' ', N_("Directory tree"), 'D', tree_box },
{ ' ', N_("Find file M-?"), ALT('?'), find_cmd },
#ifndef HAVE_XVIEW
{ ' ', "Swap panels C-u", XCTRL('u'), swap_cmd },
{ ' ', "Switch panels on/off C-o", XCTRL('o'), view_other_cmd },
{ ' ', N_("Swap panels C-u"), XCTRL('u'), swap_cmd },
{ ' ', N_("Switch panels on/off C-o"), XCTRL('o'), view_other_cmd },
#endif
{ ' ', "Compare directories", 'C', compare_dirs_cmd },
{ ' ', "eXternal panelize C-x !",'X', external_panelize },
{ ' ', N_("Compare directories"), 'C', compare_dirs_cmd },
{ ' ', N_("eXternal panelize C-x !"),'X', external_panelize },
#ifdef HAVE_DUSUM
{ ' ', "show directory sIzes", 'I', dirsizes_cmd },
{ ' ', N_("show directory sIzes"), 'I', dirsizes_cmd },
#endif
{ ' ', "", ' ', 0 },
{ ' ', "command History", 'H', history_cmd },
{ ' ', "Directory hotlist C-\\", XCTRL('\\'), quick_chdir_cmd },
{ ' ', N_("command History"), 'H', history_cmd },
{ ' ', N_("Directory hotlist C-\\"), XCTRL('\\'), quick_chdir_cmd },
#ifdef USE_VFS
{ ' ', "Active VFS list C-x a", 'A', reselect_vfs },
{ ' ', N_("Active VFS list C-x a"), 'A', reselect_vfs },
#endif
#ifdef WITH_BACKGROUND
{ ' ', "Background jobs C-x j", 'B', jobs_cmd },
{ ' ', N_("Background jobs C-x j"), 'B', jobs_cmd },
#endif
{ ' ', "", ' ', 0 },
#ifdef USE_EXT2FSLIB
{ ' ', "Undelete files (ext2fs only)",'U', undelete_cmd },
{ ' ', N_("Undelete files (ext2fs only)"),'U', undelete_cmd },
#endif
#ifdef VERSION_4
{ ' ', "Listing format edit", 'L', listmode_cmd},
{ ' ', N_("Listing format edit"), 'L', listmode_cmd},
#endif
{ ' ', "Extension file edit", 'E', ext_cmd },
{ ' ', "Menu file edit", 'M', menu_edit_cmd }
{ ' ', N_("Extension file edit"), 'E', ext_cmd },
{ ' ', N_("Menu file edit"), 'M', menu_edit_cmd }
};
/* Must keep in sync with the constants in menu_cmd */
static menu_entry OptMenu [] = {
{ ' ', "Configuration...", 'C', configure_box },
{ ' ', "Layout...", 'L', layout_cmd },
{ ' ', "cOnfirmation...", 'O', confirm_box },
{ ' ', "Display bits...", 'D', display_bits_box },
{ ' ', N_("Configuration..."), 'C', configure_box },
{ ' ', N_("Layout..."), 'L', layout_cmd },
{ ' ', N_("cOnfirmation..."), 'O', confirm_box },
{ ' ', N_("Display bits..."), 'D', display_bits_box },
#if !defined(HAVE_X) && !defined(OS2_NT)
{ ' ', "learn Keys...", 'K', learn_keys },
{ ' ', N_("learn Keys..."), 'K', learn_keys },
#endif
#ifdef USE_VFS
{ ' ', "Virtual FS...", 'V', configure_vfs },
{ ' ', N_("Virtual FS..."), 'V', configure_vfs },
#endif
{ ' ', "", ' ', 0 },
{ ' ', "Save setup", 'S', save_setup_cmd }
{ ' ', N_("Save setup"), 'S', save_setup_cmd }
};
#define menu_entries(x) sizeof(x)/sizeof(menu_entry)
@ -1291,19 +1291,19 @@ init_menu (void)
int i;
#ifdef HAVE_X
MenuBar [0] = create_menu (" Left ", PanelMenu, menu_entries (PanelMenu));
MenuBar [0] = create_menu (_(" Left "), PanelMenu, menu_entries (PanelMenu));
#else
MenuBar [0] = create_menu ( horizontal_split ? " Above " : " Left ",
MenuBar [0] = create_menu ( horizontal_split ? _(" Above ") : _(" Left "),
PanelMenu, menu_entries (PanelMenu));
#endif
MenuBar [1] = create_menu (" File ", FileMenu, menu_entries (FileMenu));
MenuBar [2] = create_menu (" Command ", CmdMenu, menu_entries (CmdMenu));
MenuBar [3] = create_menu (" Options ", OptMenu, menu_entries (OptMenu));
MenuBar [1] = create_menu (_(" File "), FileMenu, menu_entries (FileMenu));
MenuBar [2] = create_menu (_(" Command "), CmdMenu, menu_entries (CmdMenu));
MenuBar [3] = create_menu (_(" Options "), OptMenu, menu_entries (OptMenu));
#ifndef HAVE_XVIEW
#ifdef HAVE_X
MenuBar [4] = create_menu (" Right ", RightMenu, menu_entries (PanelMenu));
MenuBar [4] = create_menu (_(" Right "), RightMenu, menu_entries (PanelMenu));
#else
MenuBar [4] = create_menu (horizontal_split ? " Below " : " Right ",
MenuBar [4] = create_menu (horizontal_split ? _(" Below ") : _(" Right "),
RightMenu, menu_entries (PanelMenu));
for (i = 0; i < 5; i++)
MenuBarEmpty [i] = create_menu (MenuBar [i]->name, 0, 0);
@ -1364,11 +1364,11 @@ toggle_fast_reload (void)
{
fast_reload = !fast_reload;
if (fast_reload_w == 0 && fast_reload){
message (0, " Information ",
" Using the fast reload option may not reflect the exact \n"
" directory contents. In this cases you'll need to do a \n"
" manual reload of the directory. See the man page for \n"
" the details. ");
message (0, _(" Information "),
_(" Using the fast reload option may not reflect the exact \n"
" directory contents. In this cases you'll need to do a \n"
" manual reload of the directory. See the man page for \n"
" the details. "));
fast_reload_w = 1;
}
}
@ -1627,10 +1627,10 @@ void suspend_cmd (void)
void init_labels (Widget *paneletc)
{
define_label (midnight_dlg, paneletc, 1, "Help", help_cmd);
define_label (midnight_dlg, paneletc, 2, "Menu", user_menu_cmd);
define_label (midnight_dlg, paneletc, 9, "PullDn", menu_cmd);
define_label (midnight_dlg, paneletc, 10, "Quit", (voidfn) quit_cmd);
define_label (midnight_dlg, paneletc, 1, _("Help"), help_cmd);
define_label (midnight_dlg, paneletc, 2, _("Menu"), user_menu_cmd);
define_label (midnight_dlg, paneletc, 9, _("PullDn"), menu_cmd);
define_label (midnight_dlg, paneletc, 10, _("Quit"), (voidfn) quit_cmd);
}
#ifndef HAVE_XVIEW
@ -1847,7 +1847,7 @@ static void done_mc ()
done_screen ();
vfs_add_current_stamps ();
if (xterm_flag && xterm_hintbar)
set_hintbar("Thank you for using GNU Midnight Commander");
set_hintbar(_("Thank you for using GNU Midnight Commander"));
}
/* This should be called after destroy_dlg since panel widgets
@ -2189,8 +2189,8 @@ version (int verbose)
#ifndef HAVE_X
fprintf (stderr,
"with mouse support on xterm%s.\n",
status_mouse_support ? " and the Linux console" : "");
_("with mouse support on xterm%s.\n"),
status_mouse_support ? _(" and the Linux console") : "");
#endif /* HAVE_X */
fprintf (stderr, features);
@ -2281,7 +2281,7 @@ OS_Setup ()
char *termvalue;
termvalue = getenv ("TERM");
if (!termvalue){
fprintf (stderr, "The TERM environment variable is unset!\n");
fprintf (stderr, _("The TERM environment variable is unset!\n"));
termvalue = "";
}
#ifndef HAVE_X
@ -2574,12 +2574,12 @@ static void handle_args (int argc, char *argv [])
break;
case 'f':
fprintf (stderr, "Library directory for the Midnight Commander: %s\n", mc_home);
fprintf (stderr, _("Library directory for the Midnight Commander: %s\n"), mc_home);
finish_program = 1;
break;
case 'm':
fprintf (stderr, "Option -m is obsolete. Please look at Display Bits... in the Option's menu\n");
fprintf (stderr, _("Option -m is obsolete. Please look at Display Bits... in the Option's menu\n"));
finish_program = 1;
break;
@ -2751,13 +2751,16 @@ int main (int argc, char *argv [])
installed the mc as setuid */
setuid (getuid ());
#endif
/* We had LC_CTYPE before, LC_ALL includs LC_TYPE as well */
setlocale (LC_ALL, "");
bindtextdomain ("mc", LOCALEDIR);
textdomain ("mc");
vfs_init ();
/* Initialize list of all user group for timur_clr_mode */
init_groups ();
setlocale (LC_CTYPE, "");
OS_Setup ();
#ifdef HAVE_X
@ -2789,8 +2792,8 @@ int main (int argc, char *argv [])
dup2 (2, 1);
else {
fprintf (stderr,
"Couldn't open tty line. You have to run mc without the -P flag.\n"
"On some systems you may want to run # `which mc`\n");
_("Couldn't open tty line. You have to run mc without the -P flag.\n"
"On some systems you may want to run # `which mc`\n"));
exit (1);
}
free (p);
@ -2877,10 +2880,10 @@ int main (int argc, char *argv [])
load_hotlist ();
if (show_change_notice){
message (1, " Notice ",
" The Midnight Commander configuration files \n"
" are now stored in the ~/.mc directory, the \n"
" files have been moved now\n");
message (1, _(" Notice "),
_(" The Midnight Commander configuration files \n"
" are now stored in the ~/.mc directory, the \n"
" files have been moved now\n"));
}
# ifdef HAVE_SUBSHELL_SUPPORT

View File

@ -142,7 +142,7 @@ static void menubar_draw (WMenu *menubar)
if (menubar->active)
attrset(i == menubar->selected?MENU_SELECTED_COLOR:SELECTED_COLOR);
widget_move (&menubar->widget, 0, menubar->widget.x + 2 + (i * 12));
printw ("%s", menubar->menu [i]->name);
printw ("%s", _(menubar->menu [i]->name));
}
if (menubar->dropped)

View File

@ -78,37 +78,37 @@ static struct {
WCheck *widget;
char *tk;
} check_options [] = {
{"safe de&Lete", &know_not_what_am_i_doing, TOGGLE_VARIABLE,0, "safe-del" },
{"cd follows lin&Ks", &cd_symlinks, TOGGLE_VARIABLE, 0, "cd-follow" },
{"advanced cho&Wn", &advanced_chfns, TOGGLE_VARIABLE, 0, "achown" },
{"l&Ynx-like motion", &navigate_with_arrows,TOGGLE_VARIABLE, 0, "lynx" },
{N_("safe de&Lete"), &know_not_what_am_i_doing, TOGGLE_VARIABLE,0, "safe-del" },
{N_("cd follows lin&Ks"), &cd_symlinks, TOGGLE_VARIABLE, 0, "cd-follow" },
{N_("advanced cho&Wn"), &advanced_chfns, TOGGLE_VARIABLE, 0, "achown" },
{N_("l&Ynx-like motion"), &navigate_with_arrows,TOGGLE_VARIABLE, 0, "lynx" },
#ifdef HAVE_GNOME
{"Animation", &dummy, TOGGLE_VARIABLE, 0, "dummy" },
{N_("Animation"), &dummy, TOGGLE_VARIABLE, 0, "dummy" },
#else
{"ro&Tating dash", &nice_rotating_dash,TOGGLE_VARIABLE, 0, "rotating" },
{N_("ro&Tating dash"), &nice_rotating_dash,TOGGLE_VARIABLE, 0, "rotating" },
#endif
{"co&Mplete: show all",&show_all_if_ambiguous,TOGGLE_VARIABLE, 0, "completion" },
{"&Use internal view", &use_internal_view, TOGGLE_VARIABLE, 0, "view-int" },
{"use internal ed&It", &use_internal_edit, TOGGLE_VARIABLE, 0, "edit-int" },
{"auto m&Enus", &auto_menu, TOGGLE_VARIABLE, 0, "auto-menus" },
{"&Auto save setup", &auto_save_setup, TOGGLE_VARIABLE, 0, "auto-save" },
{"shell &Patterns", &easy_patterns, TOGGLE_VARIABLE, 0, "shell-patt" },
{"&Verbose operation", &verbose, TOGGLE_VARIABLE, 0, "verbose" },
{"&Fast dir reload", &fast_reload, toggle_fast_reload, 0, "fast-reload" },
{"mi&X all files", &mix_all_files, toggle_mix_all_files, 0, "mix-files" },
{"&Drop down menus", &drop_menus, TOGGLE_VARIABLE, 0, "drop-menus" },
{"ma&Rk moves down", &mark_moves_down, TOGGLE_VARIABLE, 0, "mark-moves" },
{"show &Hidden files", &show_dot_files, toggle_show_hidden, 0, "show-hidden" },
{"show &Backup files", &show_backups, toggle_show_backup, 0, "show-backup" },
{N_("co&Mplete: show all"),&show_all_if_ambiguous,TOGGLE_VARIABLE, 0, "completion" },
{N_("&Use internal view"), &use_internal_view, TOGGLE_VARIABLE, 0, "view-int" },
{N_("use internal ed&It"), &use_internal_edit, TOGGLE_VARIABLE, 0, "edit-int" },
{N_("auto m&Enus"), &auto_menu, TOGGLE_VARIABLE, 0, "auto-menus" },
{N_("&Auto save setup"), &auto_save_setup, TOGGLE_VARIABLE, 0, "auto-save" },
{N_("shell &Patterns"), &easy_patterns, TOGGLE_VARIABLE, 0, "shell-patt" },
{N_("&Verbose operation"), &verbose, TOGGLE_VARIABLE, 0, "verbose" },
{N_("&Fast dir reload"), &fast_reload, toggle_fast_reload, 0, "fast-reload" },
{N_("mi&X all files"), &mix_all_files, toggle_mix_all_files, 0, "mix-files" },
{N_("&Drop down menus"), &drop_menus, TOGGLE_VARIABLE, 0, "drop-menus" },
{N_("ma&Rk moves down"), &mark_moves_down, TOGGLE_VARIABLE, 0, "mark-moves" },
{N_("show &Hidden files"), &show_dot_files, toggle_show_hidden, 0, "show-hidden" },
{N_("show &Backup files"), &show_backups, toggle_show_backup, 0, "show-backup" },
{ 0, 0, 0, 0 }
};
static WRadio *pause_radio;
static char *pause_options [3] = {
"Never",
"on dumb Terminals",
"alwaYs" };
N_("Never"),
N_("on dumb Terminals"),
N_("alwaYs") };
static int configure_callback (struct Dlg_head *h, int Id, int Msg)
{
@ -124,13 +124,13 @@ static int configure_callback (struct Dlg_head *h, int Id, int Msg)
attrset (COLOR_HOT_NORMAL);
dlg_move (h, 1, (62 - 20)/2);
addstr (" Configure options ");
addstr (_(" Configure options "));
dlg_move (h, OY, OX+1);
addstr (" Other options ");
addstr (_(" Other options "));
dlg_move (h, RY, RX+1);
addstr (" Pause after run... ");
addstr (_(" Pause after run... "));
dlg_move (h, PY, PX+1);
addstr (" Panel options ");
addstr (_(" Panel options "));
#endif
break;
@ -148,21 +148,21 @@ static void init_configure (void)
conf_dlg = create_dlg (0, 0, 19, 64, dialog_colors,
configure_callback, "[Options Menu]",
"option", DLG_CENTER | DLG_GRID);
x_set_dialog_title (conf_dlg, "Configure options");
x_set_dialog_title (conf_dlg, _("Configure options"));
add_widgetl (conf_dlg,
button_new (BY, BX+26, B_CANCEL, NORMAL_BUTTON, "&Cancel", 0, 0, "button-cancel"),
button_new (BY, BX+26, B_CANCEL, NORMAL_BUTTON, _("&Cancel"), 0, 0, "button-cancel"),
XV_WLAY_RIGHTOF);
add_widgetl (conf_dlg,
button_new (BY, BX+12, B_EXIT, NORMAL_BUTTON, "&Save", 0, 0, "button-save"),
button_new (BY, BX+12, B_EXIT, NORMAL_BUTTON, _("&Save"), 0, 0, "button-save"),
XV_WLAY_RIGHTOF);
add_widgetl (conf_dlg,
button_new (BY, BX, B_ENTER, DEFPUSH_BUTTON, "&Ok", 0, 0, "button-ok"),
button_new (BY, BX, B_ENTER, DEFPUSH_BUTTON, _("&Ok"), 0, 0, "button-ok"),
XV_WLAY_CENTERROW);
#define XTRACT(i) *check_options[i].variable, check_options[i].text, check_options [i].tk
#define XTRACT(i) *check_options[i].variable, _(check_options[i].text), check_options [i].tk
/* Add all the checkboxes */
for (i = 0; i < 12; i++){
@ -182,11 +182,11 @@ static void init_configure (void)
XV_WLAY_BELOWCLOSE);
}
#ifdef HAVE_XVIEW
add_widgetl (conf_dlg, label_new (OY, OX + 1, "Other options", "label-other"),
add_widgetl (conf_dlg, label_new (OY, OX + 1, _("Other options"), "label-other"),
XV_WLAY_NEXTCOLUMN);
add_widgetl (conf_dlg, label_new (RY, RX + 1, "Pause after run...", "label-pause"),
add_widgetl (conf_dlg, label_new (RY, RX + 1, _("Pause after run..."), "label-pause"),
XV_WLAY_BELOWOF);
add_widgetl (conf_dlg, label_new (PY, PX + 1, "Panel options", "label-panel"),
add_widgetl (conf_dlg, label_new (PY, PX + 1, _("Panel options"), "label-panel"),
XV_WLAY_NEXTCOLUMN);
#endif
}

View File

@ -89,10 +89,10 @@ struct {
char *text;
char *tkname;
} panelize_but[BUTTONS] = {
{ B_CANCEL, NORMAL_BUTTON, 0, 53, "&Cancel", "c"},
{ B_ADD, NORMAL_BUTTON, 0, 28, "&Add new", "a"},
{ B_REMOVE, NORMAL_BUTTON, 0, 16, "&Remove", "r"},
{ B_ENTER, DEFPUSH_BUTTON, 0, 0, "Pane&lize","l"},
{ B_CANCEL, NORMAL_BUTTON, 0, 53, N_("&Cancel"), "c"},
{ B_ADD, NORMAL_BUTTON, 0, 28, N_("&Add new"), "a"},
{ B_REMOVE, NORMAL_BUTTON, 0, 16, N_("&Remove"), "r"},
{ B_ENTER, DEFPUSH_BUTTON, 0, 0, N_("Pane&lize"),"l"},
};
/* Directory panelize */
@ -113,7 +113,7 @@ static void panelize_refresh (void)
attrset (COLOR_HOT_NORMAL);
dlg_move (panelize_dlg, 1, (72 - 19) / 2);
addstr (" External panelize ");
addstr (_(" External panelize "));
}
#endif
@ -164,7 +164,7 @@ static void init_panelize (void)
panelize_dlg = create_dlg (0, 0, 22, 74, dialog_colors,
panelize_callback, "[External panelize]", "panelize",
DLG_CENTER|DLG_GRID);
x_set_dialog_title (panelize_dlg, "External panelize");
x_set_dialog_title (panelize_dlg, _("External panelize"));
#define XTRACT(i) BY+panelize_but[i].y, BX+panelize_but[i].x, panelize_but[i].ret_cmd, panelize_but[i].flags, panelize_but[i].text, 0, 0, panelize_but[i].tkname
@ -175,7 +175,7 @@ static void init_panelize (void)
pname = input_new (UY+14, UX, INPUT_COLOR, 63, "", "in");
add_widgetl (panelize_dlg, pname, XV_WLAY_RIGHTOF);
add_widgetl (panelize_dlg, label_new (UY+13, UX, "Command", "label-command"), XV_WLAY_NEXTROW);
add_widgetl (panelize_dlg, label_new (UY+13, UX, _("Command"), "label-command"), XV_WLAY_NEXTROW);
/* get new listbox */
l_panelize = listbox_new (UY + 1, UX + 1, 61, 10, 0, l_call, "li");
@ -189,7 +189,7 @@ static void init_panelize (void)
add_widgetl (panelize_dlg, l_panelize, XV_WLAY_EXTENDWIDTH);
listbox_select_entry (l_panelize,
listbox_search_text (l_panelize, "Other command"));
listbox_search_text (l_panelize, _("Other command")));
}
static void panelize_done (void)
@ -229,7 +229,7 @@ void add2panelize_cmd (void)
char *label;
if (pname->buffer && (*pname->buffer)) {
label = input_dialog (" Add to external panelize ", "Unnamed find",
label = input_dialog (_(" Add to external panelize "), "Unnamed find",
"");
if (!label)
return;
@ -244,7 +244,7 @@ void add2panelize_cmd (void)
static void remove_from_panelize (struct panelize *entry)
{
if (strcmp (entry->label, "Other command") != 0) {
if (strcmp (entry->label, _("Other command")) != 0) {
if (entry == panelize) {
panelize = panelize->next;
} else {
@ -267,8 +267,8 @@ void external_panelize (void)
char *target = NULL;
if (!vfs_current_is_local ()){
message (1, " Oops... ",
" I can't run external panalize while logged on a non local directory ");
message (1, _(" Oops... "),
_(" I can't run external panalize while logged on a non local directory "));
return;
}
@ -314,12 +314,12 @@ void load_panelize (void)
profile_keys = profile_init_iterator (panelize_section, profile_name);
add2panelize (strdup ("Other command"), strdup (""));
add2panelize (strdup (_("Other command")), strdup (""));
if (!profile_keys){
add2panelize (strdup ("Find rejects after patching"), strdup ("find . -name \\*.rej -print"));
add2panelize (strdup ("Find *.orig after patching"), strdup ("find . -name \\*.orig -print"));
add2panelize (strdup ("Find SUID and SGID programs"), strdup ("find . \\( \\( -perm -04000 -a -perm +011 \\) -o \\( -perm -02000 -a -perm +01 \\) \\) -print"));
add2panelize (strdup (_("Find rejects after patching")), strdup ("find . -name \\*.rej -print"));
add2panelize (strdup (_("Find *.orig after patching")), strdup ("find . -name \\*.orig -print"));
add2panelize (strdup (_("Find SUID and SGID programs")), strdup ("find . \\( \\( -perm -04000 -a -perm +011 \\) -o \\( -perm -02000 -a -perm +01 \\) \\) -print"));
return;
}
@ -335,7 +335,7 @@ void save_panelize (void)
profile_clean_section (panelize_section, profile_name);
for (;current; current = current->next){
if (strcmp (current->label, "Other command"))
if (strcmp (current->label, _("Other command")))
WritePrivateProfileString (panelize_section,
current->label,
current->command,
@ -370,7 +370,7 @@ void do_external_panelize (char *command)
open_error_pipe ();
external = popen (command, "r");
if (!external){
close_error_pipe (1, "Cannot invoke command.");
close_error_pipe (1, _("Cannot invoke command."));
return;
}
clean_dir (list, cpanel->count);
@ -425,7 +425,7 @@ void do_external_panelize (char *command)
#else /* SCO_FLAVOR */
if (WEXITSTATUS(pclose (external)) < 0)
#endif /* SCO_FLAVOR */
message (0, "External panelize", "Pipe close failed");
message (0, _("External panelize"), _("Pipe close failed"));
close_error_pipe (0, 0);
try_to_select (cpanel, NULL);
paint_panel (cpanel);

View File

@ -412,25 +412,25 @@ static struct {
char *(*string_fn)(file_entry *, int);
sortfn *sort_routine;
} formats [] = {
{ "name", 12, 1, J_LEFT, "Name", 1, string_file_name, (sortfn *) sort_name },
{ "size", 7, 0, J_RIGHT, "Size", 1, string_file_size, (sortfn *) sort_size },
{ "type", 1, 0, J_LEFT, "", 1, string_file_type, (sortfn *) sort_type },
{ "mtime", 12, 0, J_RIGHT, "MTime", 1, string_file_mtime, (sortfn *) sort_time },
{ "bsize", 7, 0, J_RIGHT, "Size", 1, string_file_size_brief, (sortfn *) sort_size },
{ "perm", 10, 0, J_LEFT, "Permission", 1, string_file_permission, NULL },
{ "mode", 6, 0, J_RIGHT, "Perm", 1, string_file_perm_octal, NULL },
{ "|", 1, 0, J_RIGHT, "|", 0, 0, NULL },
{ "nlink", 2, 0, J_RIGHT, "Nl", 1, string_file_nlinks, (sortfn *) sort_links },
{ "ngid", 5, 0, J_RIGHT, "GID", 1, string_file_ngid, (sortfn *) sort_ngid },
{ "nuid", 5, 0, J_RIGHT, "UID", 1, string_file_nuid, (sortfn *) sort_nuid },
{ "owner", 8, 0, J_LEFT, "Owner", 1, string_file_owner, (sortfn *) sort_owner },
{ "group", 8, 0, J_LEFT, "Group", 1, string_file_group, (sortfn *) sort_group },
{ "atime", 12, 0, J_RIGHT, "ATime", 1, string_file_atime, (sortfn *) sort_atime },
{ "ctime", 12, 0, J_RIGHT, "CTime", 1, string_file_ctime, (sortfn *) sort_ctime },
{ "space", 1, 0, J_RIGHT, " ", 0, string_space, NULL },
{ "dot", 1, 0, J_RIGHT, " ", 0, string_dot, NULL },
{ "mark", 1, 0, J_RIGHT, " ", 1, string_marked, NULL },
{ "inode", 5, 0, J_RIGHT, "Inode", 1, string_inode, (sortfn *) sort_inode },
{ "name", 12, 1, J_LEFT, N_("Name"), 1, string_file_name, (sortfn *) sort_name },
{ "size", 7, 0, J_RIGHT, N_("Size"), 1, string_file_size, (sortfn *) sort_size },
{ "type", 1, 0, J_LEFT, "", 1, string_file_type, (sortfn *) sort_type },
{ "mtime", 12, 0, J_RIGHT, N_("MTime"), 1, string_file_mtime, (sortfn *) sort_time },
{ "bsize", 7, 0, J_RIGHT, N_("Size"), 1, string_file_size_brief, (sortfn *) sort_size },
{ "perm", 10, 0, J_LEFT, N_("Permission"), 1, string_file_permission, NULL },
{ "mode", 6, 0, J_RIGHT, N_("Perm"), 1, string_file_perm_octal, NULL },
{ "|", 1, 0, J_RIGHT, N_("|"), 0, 0, NULL },
{ "nlink", 2, 0, J_RIGHT, N_("Nl"), 1, string_file_nlinks, (sortfn *) sort_links },
{ "ngid", 5, 0, J_RIGHT, N_("GID"), 1, string_file_ngid, (sortfn *) sort_ngid },
{ "nuid", 5, 0, J_RIGHT, N_("UID"), 1, string_file_nuid, (sortfn *) sort_nuid },
{ "owner", 8, 0, J_LEFT, N_("Owner"), 1, string_file_owner, (sortfn *) sort_owner },
{ "group", 8, 0, J_LEFT, N_("Group"), 1, string_file_group, (sortfn *) sort_group },
{ "atime", 12, 0, J_RIGHT, N_("ATime"), 1, string_file_atime, (sortfn *) sort_atime },
{ "ctime", 12, 0, J_RIGHT, N_("CTime"), 1, string_file_ctime, (sortfn *) sort_ctime },
{ "space", 1, 0, J_RIGHT, " ", 0, string_space, NULL },
{ "dot", 1, 0, J_RIGHT, " ", 0, string_dot, NULL },
{ "mark", 1, 0, J_RIGHT, " ", 1, string_marked, NULL },
{ "inode", 5, 0, J_RIGHT, N_("Inode"), 1, string_inode, (sortfn *) sort_inode },
};
static char *
@ -634,7 +634,7 @@ display_mini_info (WPanel *panel)
attrset (MARKED_COLOR);
printw ("%*s", panel->widget.cols-2, " ");
widget_move (&panel->widget, llines (panel)+3, 1);
sprintf (buffer, " %s bytes in %d file%s",
sprintf (buffer, _(" %s bytes in %d file%s"),
size_trunc_sep (panel->total), panel->marked,
panel->marked == 1 ? "" : "s");
p = buffer;
@ -661,7 +661,7 @@ display_mini_info (WPanel *panel)
printw ("-> %-*s", panel->widget.cols - 5,
name_trunc (link_target, panel->widget.cols - 5));
} else
addstr ("<readlink failed>");
addstr (_("<readlink failed>"));
return;
}
#endif
@ -1208,7 +1208,10 @@ parse_display_format (WPanel *panel, char *format, char **error, int isstatus, i
darr->use_in_gui = formats [i].use_in_gui;
darr->requested_field_len = formats [i].min_size;
darr->string_fn = formats [i].string_fn;
darr->title = formats [i].title;
if (formats [i].title [0])
darr->title = _(formats [i].title);
else
darr->title = "";
darr->id = formats [i].id;
darr->expand = formats [i].expands;
@ -1252,7 +1255,7 @@ parse_display_format (WPanel *panel, char *format, char **error, int isstatus, i
delete_format (home);
old_char = format [pos];
format [pos] = 0;
*error = copy_strings("Unknow tag on display format: ", format, 0);
*error = copy_strings(_("Unknow tag on display format: "), format, 0);
format [pos] = old_char;
return 0;
}
@ -1935,9 +1938,9 @@ do_enter (WPanel *panel)
{
char *tmp = name_quote (selection (panel)->fname, 0);
char *cmd = copy_strings (".", PATH_SEP_STR, tmp, 0);
if (!confirm_execute || (query_dialog (" The Midnight Commander ",
" Do you really want to execute? ",
0, 2, "&Yes", "&No") == 0))
if (!confirm_execute || (query_dialog (_(" The Midnight Commander "),
_(" Do you really want to execute? "),
0, 2, _("&Yes"), _("&No")) == 0))
execute (cmd);
free (tmp);
free (cmd);
@ -2129,14 +2132,14 @@ panel_callback (Dlg_head *h, WPanel *panel, int msg, int par)
switch (msg){
case WIDGET_INIT:
#ifdef HAVE_X
define_label (h, (Widget *)panel, 1, "Help", help_cmd);
define_label (h, (Widget *)panel, 2, "Menu", user_menu_cmd);
define_label (h, (Widget *)panel, 3, "View", view_panel_cmd);
define_label (h, (Widget *)panel, 4, "Edit", edit_panel_cmd);
define_label (h, (Widget *)panel, 5, "Copy", copy_cmd);
define_label (h, (Widget *)panel, 6, "RenMov", ren_cmd);
define_label (h, (Widget *)panel, 7, "Mkdir", mkdir_panel_cmd);
define_label (h, (Widget *)panel, 8, "Delete", delete_cmd);
define_label (h, (Widget *)panel, 1, _("Help"), help_cmd);
define_label (h, (Widget *)panel, 2, _("Menu"), user_menu_cmd);
define_label (h, (Widget *)panel, 3, _("View"), view_panel_cmd);
define_label (h, (Widget *)panel, 4, _("Edit"), edit_panel_cmd);
define_label (h, (Widget *)panel, 5, _("Copy"), copy_cmd);
define_label (h, (Widget *)panel, 6, _("RenMov"), ren_cmd);
define_label (h, (Widget *)panel, 7, _("Mkdir"), mkdir_panel_cmd);
define_label (h, (Widget *)panel, 8, _("Delete"), delete_cmd);
x_create_panel (h, h->wdata, panel);
#endif
return 1;
@ -2163,14 +2166,14 @@ panel_callback (Dlg_head *h, WPanel *panel, int msg, int par)
show_dir (panel);
focus_select_item (panel);
#ifndef HAVE_X
define_label (h, (Widget *)panel, 1, "Help", help_cmd);
define_label (h, (Widget *)panel, 2, "Menu", user_menu_cmd);
define_label (h, (Widget *)panel, 3, "View", view_panel_cmd);
define_label (h, (Widget *)panel, 4, "Edit", edit_panel_cmd);
define_label (h, (Widget *)panel, 5, "Copy", copy_cmd);
define_label (h, (Widget *)panel, 6, "RenMov", ren_cmd);
define_label (h, (Widget *)panel, 7, "Mkdir", mkdir_panel_cmd);
define_label (h, (Widget *)panel, 8, "Delete", delete_cmd);
define_label (h, (Widget *)panel, 1, _("Help"), help_cmd);
define_label (h, (Widget *)panel, 2, _("Menu"), user_menu_cmd);
define_label (h, (Widget *)panel, 3, _("View"), view_panel_cmd);
define_label (h, (Widget *)panel, 4, _("Edit"), edit_panel_cmd);
define_label (h, (Widget *)panel, 5, _("Copy"), copy_cmd);
define_label (h, (Widget *)panel, 6, _("RenMov"), ren_cmd);
define_label (h, (Widget *)panel, 7, _("Mkdir"), mkdir_panel_cmd);
define_label (h, (Widget *)panel, 8, _("Delete"), delete_cmd);
redraw_labels (h, (Widget *)panel);
#endif
/* Chain behaviour */

View File

@ -280,7 +280,7 @@ void init_subshell (void)
if ((subshell_pipe[READ] = open (tcsh_fifo, O_RDWR)) == -1 ||
(subshell_pipe[WRITE] = open (tcsh_fifo, O_RDWR)) == -1)
{
fprintf (stderr, "Couldn't open named pipe %s\n", tcsh_fifo);
fprintf (stderr, _("Couldn't open named pipe %s\n"), tcsh_fifo);
perror (__FILE__": open");
use_subshell = FALSE;
return;
@ -693,8 +693,8 @@ int exit_subshell (void)
int quit = TRUE;
if (subshell_state != INACTIVE && subshell_alive)
quit = !query_dialog (" Warning ", " The shell is still active."
" Quit anyway? ", 0, 2, "&Yes", "&No");
quit = !query_dialog (_(" Warning "), _(" The shell is still active. Quit anyway? "),
0, 2, _("&Yes"), _("&No"));
#if AIX_TCSH_CODE_BELOW_IS_IT_FIXED
/* New Test code */
@ -719,8 +719,8 @@ int exit_subshell (void)
if (read (subshell_pipe[READ], pty_buffer, pty_buffer_size) == 5)
quit = TRUE;
else
quit = !query_dialog (" Warning ", " There are stopped jobs."
" Quit anyway? ", 0, 2, "&Yes", "&No");
quit = !query_dialog (_(" Warning "), _(" There are stopped jobs.")
_(" Quit anyway? "), 0, 2, _("&Yes"), _("&No"));
synchronize ();
subshell_state = RUNNING_COMMAND;
@ -774,7 +774,7 @@ void do_subshell_chdir (char *directory, int do_update, int reset_prompt)
feed_subshell (QUIETLY, FALSE);
if (subshell_alive && strcmp (subshell_cwd, cpanel->cwd) && strcmp (cpanel->cwd, "."))
fprintf (stderr, "Warning: Couldn't change to %s.\n", cpanel->cwd);
fprintf (stderr, _("Warning: Couldn't change to %s.\n"), cpanel->cwd);
if (reset_prompt)
prompt_pos = 0;

View File

@ -623,7 +623,7 @@ void save_tree (WTree *tree)
file = fopen (filename, "w");
free (filename);
if (!file){
fprintf (stderr, "Can't open the " MC_TREE " file for writing:\n%s\n",
fprintf (stderr, _("Can't open the %s file for writing:\n%s\n"), MC_TREE,
unix_error_string (errno));
return;
}
@ -636,7 +636,7 @@ void save_tree (WTree *tree)
else
i = fprintf (file, "%s\n", current->name);
if (i == EOF){
fprintf (stderr, "Can't write to the " MC_TREE " file:\n%s\n",
fprintf (stderr, _("Can't write to the %s file:\n%s\n"), MC_TREE,
unix_error_string (errno));
break;
}
@ -1095,9 +1095,9 @@ void tree_copy (WTree *tree, char *default_dest)
if (!tree->selected_ptr)
return;
sprintf (cmd_buf, "Copy \"%s\" directory to:",
sprintf (cmd_buf, _("Copy \"%s\" directory to:"),
name_trunc (tree->selected_ptr->name, 50));
dest = input_expand_dialog (" Copy ", cmd_buf, default_dest);
dest = input_expand_dialog (_(" Copy "), cmd_buf, default_dest);
if (!dest || !*dest){
return;
}
@ -1128,20 +1128,20 @@ void tree_move (WTree *tree, char *default_dest)
if (!tree->selected_ptr)
return;
sprintf (cmd_buf, "Move \"%s\" directory to:",
sprintf (cmd_buf, _("Move \"%s\" directory to:"),
name_trunc (tree->selected_ptr->name, 50));
dest = input_expand_dialog (" Move ", cmd_buf, default_dest);
dest = input_expand_dialog (_(" Move "), cmd_buf, default_dest);
if (!dest || !*dest){
return;
}
if (stat (dest, &buf)){
message (1, " Error ", " Can't stat the destination \n %s ",
message (1, _(" Error "), _(" Can't stat the destination \n %s "),
unix_error_string (errno));
free (dest);
return;
}
if (!S_ISDIR (buf.st_mode)){
message (1, " Error ", " The destination isn't a directory ");
message (1, _(" Error "), _(" The destination isn't a directory "));
free (dest);
return;
}
@ -1191,8 +1191,8 @@ static void tree_rmdir_cmd (WTree *tree)
cmd_buf = xmalloc (strlen (tree->selected_ptr->name) + 20,
"tree, rmdir_cmd");
sprintf (cmd_buf, " Delete %s? ", tree->selected_ptr->name);
result = query_dialog (" Delete ", cmd_buf, 3, 2, "&Yes", "&No");
sprintf (cmd_buf, _(" Delete %s? "), tree->selected_ptr->name);
result = query_dialog (_(" Delete "), cmd_buf, 3, 2, _("&Yes"), _("&No"));
free (cmd_buf);
if (result != 0){
return;
@ -1229,8 +1229,8 @@ static void tree_toggle_navig (Dlg_head *h)
void set_navig_label (Dlg_head *h)
{
define_label_data (h, (Widget *)tree,
4, tree_navigation_flag ? "Static" : "Dynamc",
(void (*)(void *))tree_toggle_navig, h);
4, tree_navigation_flag ? _("Static") : _("Dynamc"),
(void (*)(void *))tree_toggle_navig, h);
}
static void move_down (WTree *tree)
@ -1310,7 +1310,7 @@ static void chdir_sel (WTree *tree)
paint_panel (cpanel);
select_item (cpanel);
} else {
message (1, " Error ", " Can't chdir to \"%s\" \n %s ",
message (1, MSG_ERROR, _(" Can't chdir to \"%s\" \n %s "),
tree->selected_ptr->name, unix_error_string (errno));
}
change_panel ();
@ -1448,24 +1448,24 @@ static int tree_callback (Dlg_head *h, WTree *tree, int msg, int par)
case WIDGET_FOCUS:
tree->active = 1;
define_label (h, (Widget *)tree, 1, "Help", (voidfn) tree_help_cmd);
define_label (h, (Widget *)tree, 1, _("Help"), (voidfn) tree_help_cmd);
define_label_data (h, (Widget *)tree,
2, "Rescan", (buttonbarfn)tree_rescan_cmd, tree);
2, _("Rescan"), (buttonbarfn)tree_rescan_cmd, tree);
define_label_data (h, (Widget *)tree,
3, "Forget", (buttonbarfn)tree_forget_cmd, tree);
3, _("Forget"), (buttonbarfn)tree_forget_cmd, tree);
define_label_data (h, (Widget *)tree,
5, "Copy", (buttonbarfn) tree_copy_cmd, tree);
5, _("Copy"), (buttonbarfn) tree_copy_cmd, tree);
define_label_data (h, (Widget *)tree,
6, "RenMov", (buttonbarfn) tree_move_cmd, tree);
6, _("RenMov"), (buttonbarfn) tree_move_cmd, tree);
#if 0
/* FIXME: mkdir is currently defunct */
define_label_data (h, (Widget *)tree,
7, "Mkdir", (buttonbarfn) tree_mkdir_cmd, tree);
7, _("Mkdir"), (buttonbarfn) tree_mkdir_cmd, tree);
#else
define_label (h, (Widget *)tree, 7, "", 0);
#endif
define_label_data (h, (Widget *)tree,
8, "Rmdir", (buttonbarfn) tree_rmdir_cmd, tree);
8, _("Rmdir"), (buttonbarfn) tree_rmdir_cmd, tree);
set_navig_label (h);
redraw_labels (h, (Widget *)tree);

View File

@ -260,7 +260,7 @@ char *check_patterns (char *p)
if (value == 0 || value == 1)
easy_patterns = value;
else
message (1, " Error ", " Invalid shell pattern defination \"%c\". ", value + '0');
message (1, MSG_ERROR, _(" Invalid shell pattern defination \"%c\". "), value + '0');
}
while (*p == '\n' || *p == '\t' || *p == ' ') p++;
return p;
@ -392,7 +392,7 @@ void debug_out (char *start, char *end, int cond)
len = strlen (msg);
if (len)
msg [len - 1] = 0;
message (0, " Debug ", msg);
message (0, _(" Debug "), msg);
debug_flag = 0;
}
} else {
@ -401,13 +401,13 @@ void debug_out (char *start, char *end, int cond)
return;
/* Save the result of the condition */
if (debug_error){
strcat (msg, " ERROR: ");
strcat (msg, _(" ERROR: "));
debug_error = 0;
}
else if (cond)
strcat (msg, " True: ");
strcat (msg, _(" True: "));
else
strcat (msg, " False: ");
strcat (msg, _(" False: "));
/* Copy condition statement */
len = strlen (msg);
if (end == NULL){
@ -503,7 +503,7 @@ void execute_menu_command (char *s)
file_name = copy_strings (file_name, ".cmd", NULL);
#endif
if ((cmd_file = fopen (file_name, "w+")) == NULL){
message (1, " Error ", " Can't create temporary command file \n %s ",
message (1, MSG_ERROR, _(" Can't create temporary command file \n %s "),
unix_error_string (errno));
return;
}
@ -529,7 +529,7 @@ void execute_menu_command (char *s)
char *parameter;
char *tmp;
parameter_found = 0;
parameter = input_dialog (" Parameter ", prompt, "");
parameter = input_dialog (_(" Parameter "), prompt, "");
if (!parameter || !*parameter){
/* User canceled */
fclose (cmd_file);
@ -602,9 +602,9 @@ menu_file_own(char* path)
extern int verbose;
if (verbose)
{
message (0, " Warning -- ignoring file ",
"File %s is not owned by root or you or is world writable.\n"
"Using it may compromise your security",
message (0, _(" Warning -- ignoring file "),
_("File %s is not owned by root or you or is world writable.\n"
"Using it may compromise your security"),
path
);
}
@ -620,8 +620,8 @@ void user_menu_cmd (void)
Listbox *listbox;
if (!vfs_current_is_local ()){
message (1, " Oops... ",
" I can't run programs while logged on a non local directory ");
message (1, _(" Oops... "),
_(" I can't run programs while logged on a non local directory "));
return;
}
@ -636,7 +636,7 @@ void user_menu_cmd (void)
}
if ((data = load_file (menu)) == NULL){
message (1, " Error ", " Can't open file %s \n %s ",
message (1, MSG_ERROR, _(" Can't open file %s \n %s "),
menu, unix_error_string (errno));
free (menu);
return;

View File

@ -229,7 +229,7 @@ char *name_trunc (char *txt, int trunc_len)
txt = PATH_SEP_STR;
if (trunc_len > sizeof (x)-1){
fprintf (stderr, "name_trunc: too big");
fprintf (stderr, _("name_trunc: too big"));
trunc_len = sizeof (x)-1;
}
txt_len = strlen (txt);

View File

@ -200,10 +200,7 @@ void tell_parent (int msg);
# define MC_ARCH_FLAGS 0
#endif
/* GNOME provides the internationalization code as well */
#ifndef HAVE_GNOME
# define _(x) x
#endif
#include "i18n.h"
/* taken from regex.c: */
/* Jim Meyering writes:

View File

@ -349,11 +349,11 @@ static int old_error; /* File descriptor of old standard error */
void open_error_pipe (void)
{
if (pipe (error_pipe) < 0){
message (0, " Warning ", " Pipe failed ");
message (0, _(" Warning "), _(" Pipe failed "));
}
old_error = dup (2);
if(old_error < 0 || close(2) || dup (error_pipe[1]) != 2){
message (0, " Warning ", " Dup failed ");
message (0, _(" Warning "), _(" Dup failed "));
close (error_pipe[0]);
close (error_pipe[1]);
}
@ -367,7 +367,7 @@ void close_error_pipe (int error, char *text)
int len = 0;
if (error)
title = " Error ";
title = MSG_ERROR;
else
title = " Warning ";
if (old_error >= 0){
@ -419,7 +419,7 @@ void check_error_pipe (void)
close (error_pipe[0]);
}
if (len > 0)
message (0, " Warning ", error);
message (0, _(" Warning "), error);
}
static struct sigaction ignore, save_intr, save_quit, save_stop;

View File

@ -401,10 +401,10 @@ view_ok_to_quit (WView *view)
return 1;
query_set_sel (1);
text = copy_strings ("File: \n\n ", view->filename,
"\n\nhas been modified, do you want to save the changes?\n", NULL);
text = copy_strings (_("File: \n\n "), view->filename,
_("\n\nhas been modified, do you want to save the changes?\n"), NULL);
r = query_dialog (" Save changes ", text, 2, 3, "&Yes", "&No", "&Cancel");
r = query_dialog (_(" Save changes "), text, 2, 3, _("&Yes"), _("&No"), _("&Cancel"));
free (text);
switch (r) {
@ -446,7 +446,7 @@ init_growing_view (WView *view, char *name, char *filename)
open_error_pipe ();
if ((view->stdfile = popen (name, "r")) == NULL){
close_error_pipe (view->have_frame?-1:1, view->data);
return set_view_init_error (view, " Can't spawn child program ");
return set_view_init_error (view, _(" Can't spawn child program "));
}
#ifndef HAVE_XVIEW
@ -456,13 +456,13 @@ init_growing_view (WView *view, char *name, char *filename)
pclose (view->stdfile);
view->stdfile = NULL;
close_error_pipe (view->have_frame?-1:1, view->data);
return set_view_init_error (view, " Empty output from child filter ");
return set_view_init_error (view, _(" Empty output from child filter "));
}
#endif
} else {
view->stdfile = NULL;
if ((view->file = mc_open (filename, O_RDONLY)) == -1)
return set_view_init_error (view, " Could not open file ");
return set_view_init_error (view, _(" Could not open file "));
}
return 0;
}
@ -480,7 +480,7 @@ static char *load_view_file (WView *view, char *filename)
if ((view->file = mc_open (filename, O_RDONLY)) < 0){
set_view_init_error (view, 0);
return (copy_strings (" Can't open file \"",
return (copy_strings (_(" Can't open file \""),
filename, "\"\n ",
unix_error_string (errno), " ", 0));
@ -488,13 +488,13 @@ static char *load_view_file (WView *view, char *filename)
if (mc_fstat (view->file, &view->s) < 0){
set_view_init_error (view, 0);
close_view_file (view);
return copy_strings (" Can't stat file \n ",
return copy_strings (_(" Can't stat file \n "),
unix_error_string (errno), " ", 0);
}
if (S_ISDIR (view->s.st_mode) || S_ISSOCK (view->s.st_mode)
|| S_ISFIFO (view->s.st_mode)){
close_view_file (view);
return set_view_init_error (view, " Can't view: not a regular file ");
return set_view_init_error (view, _(" Can't view: not a regular file "));
}
if (view->s.st_size == 0){
@ -514,7 +514,7 @@ static char *load_view_file (WView *view, char *filename)
else {
char *tmp;
if ((view->localcopy = mc_getlocalcopy (filename)) == 0)
return set_view_init_error (view, " Can not fetch local copy " );
return set_view_init_error (view, _(" Can not fetch local copy ") );
tmp = name_quote (view->localcopy, 0);
cmd = copy_strings (decompress_command (type), " ", tmp, 0);
free (tmp);
@ -601,7 +601,7 @@ do_view_init (WView *view, char *_command, char *_file, int start_line)
if (error){
if (!view->have_frame){
message (1, " Error ", error);
message (1, MSG_ERROR, error);
free (error);
return -1;
}
@ -697,23 +697,23 @@ view_status (WView *view)
hline (' ', w);
if (w > 6){
i = w > 24 ? 18 : w - 6;
printw ("File: %s", name_trunc (view->filename ? view->filename:
printw (_("File: %s"), name_trunc (view->filename ? view->filename:
view->command ? view->command:"", i));
if (w > 30){
widget_move (view, view->have_frame, 24);
if (view->hex_mode)
printw ("Offset 0x%08x", view->edit_cursor);
printw (_("Offset 0x%08x"), view->edit_cursor);
else
printw ("Col %d", -view->start_col);
printw (_("Col %d"), -view->start_col);
}
if (w > 60){
widget_move (view, view->have_frame, 42);
printw ("%s bytes", size_trunc (view->s.st_size));
printw (_("%s bytes"), size_trunc (view->s.st_size));
}
if (w > 70){
printw (" ");
if (view->growing_buffer)
addstr (" [grow]");
addstr (_(" [grow]"));
}
if (w - i > 4)
if (view->hex_mode)
@ -1463,7 +1463,7 @@ search (WView *view, char *text, int (*search)(WView *, char *, char *, int))
got_interrupt ();
if (verbose){
d = message (D_INSERT, " Search ", "Searching %s", text);
d = message (D_INSERT, _(" Search "), _("Searching %s"), text);
mc_refresh ();
}
ch = 0;
@ -1553,7 +1553,7 @@ search (WView *view, char *text, int (*search)(WView *, char *, char *, int))
}
if (!s){
message (0, " Search ", " Search string not found ");
message (0, _(" Search "), _(" Search string not found "));
view->found_len = 0;
}
}
@ -1675,7 +1675,7 @@ hex_search (WView *view, char *text)
/* Then start the search */
pos = block_search (view, buffer, block_len);
if (pos == -1){
message (0, " Search ", " Search string not found ");
message (0, _(" Search "), _(" Search string not found "));
view->found_len = 0;
return;
}
@ -1714,7 +1714,7 @@ static int regexp_view_search (WView *view, char *pattern, char *string, int mat
}
flags |= REG_EXTENDED;
if (regcomp (&r, pattern, flags)){
message (1, " Error ", " Invalid regular expression ");
message (1, MSG_ERROR, _(" Invalid regular expression "));
return -1;
}
old_pattern = strdup (pattern);
@ -1842,9 +1842,9 @@ goto_line (WView *view)
for (i = view->first; i < view->start_display; i++)
if (get_byte (view, i) == '\n')
oldline ++;
sprintf (prompt, " The current line number is %d.\n"
" Enter the new line number:", oldline);
line = input_dialog (" Goto line ", prompt, "");
sprintf (prompt, _(" The current line number is %d.\n"
" Enter the new line number:"), oldline);
line = input_dialog (_(" Goto line "), prompt, "");
if (line){
if (*line){
move_to_top (view);
@ -1871,7 +1871,7 @@ regexp_search (WView *view, int direction)
}
regexp = old ? old : regexp;
regexp = input_dialog (" Search ", " Enter regexp:", regexp);
regexp = input_dialog (_(" Search "), _(" Enter regexp:"), regexp);
if ((!regexp) || (!*regexp)){
return;
}
@ -1903,7 +1903,7 @@ normal_search (WView *view, int direction)
char *exp = "";
exp = old ? old : exp;
exp = input_dialog (" Search ", " Enter search string:", exp);
exp = input_dialog (_(" Search "), _(" Enter search string:"), exp);
if ((!exp) || (!*exp)){
return;
}
@ -1971,29 +1971,29 @@ view_labels (WView *view)
{
Dlg_head *h = view->widget.parent;
define_label (h, (Widget *) view, 1, "Help", help_cmd);
define_label (h, (Widget *) view, 1, _("Help"), help_cmd);
my_define (h, 10, "Quit", view_quit_cmd, view);
my_define (h, 4, view->hex_mode ?"Ascii":"Hex", toggle_hex_mode, view);
my_define (h, 5, "Line", goto_line, view);
my_define (h, 6, view->hex_mode ? "Save" : "RxSrch", regexp_search_cmd, view);
my_define (h, 10, _("Quit"), view_quit_cmd, view);
my_define (h, 4, view->hex_mode ? _("Ascii"): _("Hex"), toggle_hex_mode, view);
my_define (h, 5, _("Line"), goto_line, view);
my_define (h, 6, view->hex_mode ? _("Save") : _("RxSrch"), regexp_search_cmd, view);
my_define (h, 2, view->hex_mode ? view->hexedit_mode ?
view->view_side == view_side_left ? "EdText" : "EdHex" :
view->growing_buffer ? "" : "Edit" :
view->wrap_mode ? "UnWrap" : "Wrap",
view->view_side == view_side_left ? _("EdText") : _("EdHex") :
view->growing_buffer ? "" : _("Edit") :
view->wrap_mode ? _("UnWrap") : _("Wrap"),
toggle_wrap_mode, view);
my_define (h, 7, view->hex_mode ? "HxSrch" : "Search",
my_define (h, 7, view->hex_mode ? _("HxSrch") : _("Search"),
normal_search_cmd, view);
my_define (h, 8, view->viewer_magic_flag ? "Raw" : "Parse",
my_define (h, 8, view->viewer_magic_flag ? _("Raw") : _("Parse"),
change_viewer, view);
if (!view->have_frame){
my_define (h, 9, view->viewer_nroff_flag ? "Unform" : "Format",
my_define (h, 9, view->viewer_nroff_flag ? _("Unform") : _("Format"),
change_nroff, view);
my_define (h, 3, "Quit", view_quit_cmd, view);
my_define (h, 3, _("Quit"), view_quit_cmd, view);
}
redraw_labels (h, (Widget *) view);

View File

@ -213,55 +213,55 @@ int is_quit_char (int c)
key_code_name_t key_name_conv_tab [] = {
/* KEY_F(0) is not here, since we are mapping it to f10, so there is no reason
to define f0 as well. Also, it makes Learn keys a bunch of problems :( */
{ KEY_F(1), "f1", "Function key 1" },
{ KEY_F(2), "f2", "Function key 2" },
{ KEY_F(3), "f3", "Function key 3" },
{ KEY_F(4), "f4", "Function key 4" },
{ KEY_F(5), "f5", "Function key 5" },
{ KEY_F(6), "f6", "Function key 6" },
{ KEY_F(7), "f7", "Function key 7" },
{ KEY_F(8), "f8", "Function key 8" },
{ KEY_F(9), "f9", "Function key 9" },
{ KEY_F(10), "f10", "Function key 10" },
{ KEY_F(11), "f11", "Function key 11" },
{ KEY_F(12), "f12", "Function key 12" },
{ KEY_F(13), "f13", "Function key 13" },
{ KEY_F(14), "f14", "Function key 14" },
{ KEY_F(15), "f15", "Function key 15" },
{ KEY_F(16), "f16", "Function key 16" },
{ KEY_F(17), "f17", "Function key 17" },
{ KEY_F(18), "f18", "Function key 18" },
{ KEY_F(19), "f19", "Function key 19" },
{ KEY_F(20), "f20", "Function key 20" },
{ KEY_BACKSPACE, "bs", "Backspace key" },
{ KEY_END, "end", "End key" },
{ KEY_UP, "up", "Up arrow key" },
{ KEY_DOWN, "down", "Down arrow key" },
{ KEY_LEFT, "left", "Left arrow key" },
{ KEY_RIGHT, "right", "Right arrow key" },
{ KEY_HOME, "home", "Home key" },
{ KEY_NPAGE, "pgdn", "Page Down key" },
{ KEY_PPAGE, "pgup", "Page Up key" },
{ KEY_IC, "insert", "Insert key" },
{ KEY_DC, "delete", "Delete key" },
{ ALT('\t'), "complete", "Completion/M-tab" },
{ KEY_KP_ADD, "kpplus", "+ on keypad" },
{ KEY_KP_SUBTRACT,"kpminus", "- on keypad" },
{ KEY_KP_MULTIPLY,"kpasterix", "* on keypad" },
{ KEY_F(1), "f1", N_("Function key 1") },
{ KEY_F(2), "f2", N_("Function key 2") },
{ KEY_F(3), "f3", N_("Function key 3") },
{ KEY_F(4), "f4", N_("Function key 4") },
{ KEY_F(5), "f5", N_("Function key 5") },
{ KEY_F(6), "f6", N_("Function key 6") },
{ KEY_F(7), "f7", N_("Function key 7") },
{ KEY_F(8), "f8", N_("Function key 8") },
{ KEY_F(9), "f9", N_("Function key 9") },
{ KEY_F(10), "f10", N_("Function key 10") },
{ KEY_F(11), "f11", N_("Function key 11") },
{ KEY_F(12), "f12", N_("Function key 12") },
{ KEY_F(13), "f13", N_("Function key 13") },
{ KEY_F(14), "f14", N_("Function key 14") },
{ KEY_F(15), "f15", N_("Function key 15") },
{ KEY_F(16), "f16", N_("Function key 16") },
{ KEY_F(17), "f17", N_("Function key 17") },
{ KEY_F(18), "f18", N_("Function key 18") },
{ KEY_F(19), "f19", N_("Function key 19") },
{ KEY_F(20), "f20", N_("Function key 20") },
{ KEY_BACKSPACE, "bs", N_("Backspace key") },
{ KEY_END, "end", N_("End key") },
{ KEY_UP, "up", N_("Up arrow key") },
{ KEY_DOWN, "down", N_("Down arrow key") },
{ KEY_LEFT, "left", N_("Left arrow key") },
{ KEY_RIGHT, "right", N_("Right arrow key") },
{ KEY_HOME, "home", N_("Home key") },
{ KEY_NPAGE, "pgdn", N_("Page Down key") },
{ KEY_PPAGE, "pgup", N_("Page Up key") },
{ KEY_IC, "insert", N_("Insert key") },
{ KEY_DC, "delete", N_("Delete key") },
{ ALT('\t'), "complete", N_("Completion/M-tab") },
{ KEY_KP_ADD, "kpplus", N_("+ on keypad") },
{ KEY_KP_SUBTRACT,"kpminus", N_("- on keypad") },
{ KEY_KP_MULTIPLY,"kpasterix", N_("* on keypad") },
/* From here on, these won't be shown in Learn keys (no space) */
{ KEY_LEFT, "kpleft", "Left arrow keypad" },
{ KEY_RIGHT, "kpright", "Right arrow keypad" },
{ KEY_UP, "kpup", "Up arrow keypad" },
{ KEY_DOWN, "kpdown", "Down arrow keypad" },
{ KEY_HOME, "kphome", "Home on keypad" },
{ KEY_END, "kpend", "End on keypad" },
{ KEY_NPAGE, "kpnpage", "Page Down keypad" },
{ KEY_PPAGE, "kpppage", "Page Up keypad" },
{ KEY_IC, "kpinsert","Insert on keypad" },
{ KEY_DC, "kpdelete","Delete on keypad" },
{ (int) '\n', "kpenter", "Enter on keypad" },
{ (int) '/', "kpslash", "Slash on keypad" },
{ (int) '#', "kpnumlock", "NumLock on keypad" },
{ KEY_LEFT, "kpleft", N_("Left arrow keypad") },
{ KEY_RIGHT, "kpright", N_("Right arrow keypad") },
{ KEY_UP, "kpup", N_("Up arrow keypad") },
{ KEY_DOWN, "kpdown", N_("Down arrow keypad") },
{ KEY_HOME, "kphome", N_("Home on keypad") },
{ KEY_END, "kpend", N_("End on keypad") },
{ KEY_NPAGE, "kpnpage", N_("Page Down keypad") },
{ KEY_PPAGE, "kpppage", N_("Page Up keypad") },
{ KEY_IC, "kpinsert", N_("Insert on keypad") },
{ KEY_DC, "kpdelete", N_("Delete on keypad") },
{ (int) '\n', "kpenter", N_("Enter on keypad") },
{ (int) '/', "kpslash", N_("Slash on keypad") },
{ (int) '#', "kpnumlock", N_("NumLock on keypad") },
{ 0, 0 }
};

View File

@ -111,7 +111,7 @@ Listbox *create_listbox_window (int cols, int lines, char *title, char *help)
{
int xpos, ypos, len;
Listbox *listbox = xmalloc (sizeof (Listbox), "create_listbox_window");
char* cancel_string = "&Cancel";
char* cancel_string = _("&Cancel");
/* Adjust sizes */
lines = (lines > LINES-6) ? LINES - 6 : lines;
@ -289,7 +289,7 @@ int query_dialog (char *header, char *text, int flags, int count, ...)
destroy_dlg (query_dlg);
} else {
#ifdef HAVE_X
add_widgetl (query_dlg, button_new(0, 0, B_EXIT, NORMAL_BUTTON, "&Ok", 0, 0, NULL),
add_widgetl (query_dlg, button_new(0, 0, B_EXIT, NORMAL_BUTTON, _("&Ok"), 0, 0, NULL),
XV_WLAY_CENTERROW);
add_widget (query_dlg, label_new (2, 3, text, NULL));
@ -327,6 +327,9 @@ Dlg_head *message (int error, char *header, char *text, ...)
char buffer [4096];
Dlg_head *d;
if (header == MSG_ERROR)
header = _(" Error ");
/* Setup the display information */
strcpy (buffer, "\n");
va_start (args, text);
@ -392,10 +395,10 @@ Chooser *new_chooser (int lines, int cols, char *help, int flags)
if (button_lines){
add_widget (c->dialog, button_new (lines-button_lines+1,
20, B_ENTER, DEFPUSH_BUTTON, "&Remove",
20, B_ENTER, DEFPUSH_BUTTON, _("&Remove"),
remove_callback, c, "button-remove"));
add_widget (c->dialog, button_new (lines-button_lines+1,
4, B_CANCEL, NORMAL_BUTTON, "&Cancel",
4, B_CANCEL, NORMAL_BUTTON, _("&Cancel"),
0, 0, "button-cancel"));
}
add_widget (c->dialog, c->listbox);
@ -442,6 +445,7 @@ static int quick_callback (struct Dlg_head *h, int id, int Msg)
return 0;
}
#define I18N(x) (do_int? (x = _(x)) : x)
int quick_dialog_skip (QuickDialog *qd, int nskip)
{
Dlg_head *dd;
@ -452,6 +456,14 @@ int quick_dialog_skip (QuickDialog *qd, int nskip)
int return_val;
WInput *input;
QuickWidget *qw;
int do_int;
if (!qd->i18n){
qd->i18n = 1;
do_int = 1;
qd->title = _(qd->title);
} else
do_int = 0;
if (qd->xpos == -1)
dd = create_dlg (0, 0, qd->ylen, qd->xlen, dialog_colors, quick_callback,
@ -476,7 +488,7 @@ int quick_dialog_skip (QuickDialog *qd, int nskip)
switch (qw->widget_type){
case quick_checkbox:
widget = check_new (ypos, xpos, *qw->result, qw->text, qw->tkname);
widget = check_new (ypos, xpos, *qw->result, I18N (qw->text), qw->tkname);
break;
case quick_radio:
@ -487,7 +499,7 @@ int quick_dialog_skip (QuickDialog *qd, int nskip)
case quick_button:
widget = button_new (ypos, xpos, qw->value, (qw->value==B_ENTER) ? DEFPUSH_BUTTON : NORMAL_BUTTON,
qw->text, 0, 0, qw->tkname);
I18N (qw->text), 0, 0, qw->tkname);
break;
/* We use the hotkey pos as the field length */
@ -502,7 +514,7 @@ int quick_dialog_skip (QuickDialog *qd, int nskip)
break;
case quick_label:
widget = label_new (ypos, xpos, qw->text, qw->tkname);
widget = label_new (ypos, xpos, I18N(qw->text), qw->tkname);
break;
default:
@ -556,9 +568,9 @@ char *real_input_dialog_help (char *header, char *text, char *help, char *def_te
{
QuickDialog Quick_input;
QuickWidget quick_widgets [] = {
{ quick_button, 6, 10, 1, 0, "&Cancel", 0, B_CANCEL, 0, 0,
{ quick_button, 6, 10, 1, 0, N_("&Cancel"), 0, B_CANCEL, 0, 0,
XV_WLAY_RIGHTOF, "button-cancel" },
{ quick_button, 3, 10, 1, 0, "&Ok", 0, B_ENTER, 0, 0,
{ quick_button, 3, 10, 1, 0, N_("&Ok"), 0, B_ENTER, 0, 0,
XV_WLAY_CENTERROW, "button-ok" },
{ quick_input, 4, 80, 0, 0, "", 58, 0, 0, 0, XV_WLAY_NEXTROW, 0 },
{ quick_label, 3, 80, 2, 0, "", 0, 0, 0, 0, XV_WLAY_NEXTROW, "label" },
@ -584,7 +596,7 @@ char *real_input_dialog_help (char *header, char *text, char *help, char *def_te
len = max (strlen (header), msglen (text, &lines)) + 4;
len = max (len, 64);
if (strncmp (text, "Password", 8) == 0){
if (strncmp (text, _("Password"), 8) == 0){
quick_widgets [INPUT_INDEX].value = 1;
tk_name[3]=0;
} else {
@ -596,6 +608,7 @@ char *real_input_dialog_help (char *header, char *text, char *help, char *def_te
Quick_input.title = header;
Quick_input.help = help;
Quick_input.class = "quick_input";
Quick_input.i18n = 0;
quick_widgets [INPUT_INDEX+1].text = text;
quick_widgets [INPUT_INDEX].text = def_text;
@ -624,9 +637,10 @@ int input_dialog_help_2 (char *header, char *text1, char *text2, char *help, cha
{
QuickDialog Quick_input;
QuickWidget quick_widgets [] = {
{ quick_button, 6, 10, 4, 0, "Cancel", 0, B_CANCEL, 0, 0,
{ quick_button, 6, 10, 4, 0, N_("&Cancel"), 0, B_CANCEL, 0, 0,
XV_WLAY_DONTCARE, "button-cancel" },
{ quick_button, 3, 10, 4, 0, "Ok", 0, B_ENTER, 0, 0,
{ quick_button, 3, 10, 4, 0, N_("Ok")
, 0, B_ENTER, 0, 0,
XV_WLAY_DONTCARE, "button-ok" },
{ quick_input, 4, 80, 4, 0, "", 58, 0, 0, 0, XV_WLAY_BELOWCLOSE, "input-pth" },
{ quick_label, 3, 80, 3, 0, "", 0, 0, 0, 0, XV_WLAY_DONTCARE, "label-pth" },
@ -648,6 +662,7 @@ int input_dialog_help_2 (char *header, char *text1, char *text2, char *help, cha
Quick_input.title = header;
Quick_input.help = help;
Quick_input.class = "quick_input_2";
Quick_input.i18n = 0;
quick_widgets [5].text = text1;
quick_widgets [3].text = text2;

View File

@ -56,6 +56,7 @@ typedef struct {
char *help;
char *class; /* Used for Tk's class name */
QuickWidget *widgets;
int i18n; /* If true, internationalization has happened */
} QuickDialog;
int quick_dialog (QuickDialog *qd);