Localization added together with Czech catalog. Czech man page missing.
authorshort <>
Wed, 3 Nov 1999 12:53:48 +0000 (12:53 +0000)
committershort <>
Wed, 3 Nov 1999 12:53:48 +0000 (12:53 +0000)
Makefile.am
acconfig.h
autogen.sh
configure.in
mdsms.c
po/POTFILES.in [new file with mode: 0644]
po/cs.po [new file with mode: 0644]

index 4dce71f..4f7d77c 100644 (file)
@@ -1,11 +1,17 @@
 # $Id$
 
 AUTOMAKE_OPTIONS = dist-tarZ
+SUBDIRS = intl . po
+#?: @@INTLSUB@@ src @@POSUB@@
 
-EXTRA_DIST = autogen.sh mdsms.1.c mdsms.1.in ChangeLog need-declaration.m4
+EXTRA_DIST = autogen.sh mdsms.1.c mdsms.1.in ChangeLog need-declaration.m4 ABOUT-NLS
 
 CLEANFILES = ChangeLog mdsms.1 mdsms.1.in2
 
+# assumed to exist: datadir = $(prefix)/@DATADIRNAME@
+localedir = $(datadir)/locale
+INCLUDES += -DLOCALEDIR=\"$(localedir)\"
+
 bin_PROGRAMS = mdsms
 man_MANS = mdsms.1
 noinst_PROGRAMS = manfmt
index 4859a4b..b51d61b 100644 (file)
@@ -3,6 +3,21 @@
  * $Id$
  */
 
+/* Define if your locale.h file contains LC_MESSAGES.  */
+#undef HAVE_LC_MESSAGES
+
+/* Define to 1 if NLS is requested.  */
+#undef ENABLE_NLS
+
+/* Define as 1 if you have catgets and don't want to use GNU gettext.  */
+#undef HAVE_CATGETS
+
+/* Define as 1 if you have gettext and don't want to use GNU gettext.  */
+#undef HAVE_GETTEXT
+
+/* Define as 1 if you have the stpcpy function.  */
+#undef HAVE_STPCPY
+
 /* __NORETURN define - usually a GCC extension. */
 #undef __NORETURN
 
@@ -185,3 +200,30 @@ extern char *sys_errlist[];
 #ifndef HAVE_OFFSETOF
 #define offsetof(a,b) ((size_t)&((a *)0)->b)
 #endif
+
+/*
+ * Handles all of the internationalization configuration options.
+ * Author: Tom Tromey <tromey@creche.cygnus.com>
+ * Stolen from <libgnome/gnome-i18n.h>
+ * Modified by Jan Kratochvil <short@ucw.cz>
+ */
+#ifdef ENABLE_NLS
+#ifdef HAVE_LIBINTL_H
+#    include <libintl.h>
+#endif /* HAVE_LIBINTL_H */
+#    define _(String) gettext (String)
+#    ifdef gettext_noop
+#        define N_(String) gettext_noop (String)
+#    else
+#        define N_(String) (String)
+#    endif
+#else /* ENABLE_NLS */
+/* 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 /* ENABLE_NLS */
index 9589652..e17d0ce 100755 (executable)
@@ -3,19 +3,25 @@
 
 # $Id$
 
-CONFDEFS="--enable-maintainer-mode --enable-debug"
+# /lib/gconv/ISO8859-2.so is apparently clashing with EFence. :-(
+CONFDEFS="--enable-maintainer-mode --enable-debug --without-efence"
 
 # if [ -f Makefile ];then touch ChangeLog;make maintainer-clean;fi
 rm -r -f \
        `find -name "*~"` \
        errs* \
+       `find po -type f -not '(' -name POTFILES.in -o -name "*.po" -o -path "po/CVS*" ')'` \
+       intl \
        install-sh \
        mkinstalldirs \
        missing \
        INSTALL \
        COPYING \
+       ABOUT-NLS \
        Makefile \
        Makefile.in \
+       */Makefile \
+       */Makefile.in \
        configure \
        configure.scan \
        config.guess \
@@ -23,6 +29,7 @@ rm -r -f \
        config.sub \
        config.log \
        config.h \
+       confdefs.h \
        autoh[0-9]* \
        config.cache \
        config.h.in \
@@ -61,6 +68,7 @@ if [ "$1" = clean ];then exit;fi
        )
 
 aclocal -I .
+gettextize --copy
 autoheader
 touch ChangeLog
 automake --gnu -c --add-missing
index d750ae6..4f4b2e7 100644 (file)
@@ -26,6 +26,10 @@ AC_ARG_WITH(lock-directory,
      with_lock_directory=$withval, with_lock_directory=)
 AC_MSG_RESULT($with_lock_directory)
 
+AC_ARG_WITH(efence,
+[  --without-efence        disable use of Electric Fence in maintainer-mode],
+    efence=$withval, efence=yes)
+
 dnl Checks for programs.
 AC_PROG_CC
 if test "$USE_MAINTAINER_MODE" = yes;then
@@ -44,6 +48,10 @@ AC_PROG_CPP
 
 dnl Checks for pathnames.
 
+ALL_LINGUAS="cs"
+AM_GNU_GETTEXT
+AC_CHECK_HEADERS(libintl.h)
+
 AC_MSG_CHECKING([for modem lock directory])
 dirx=""
 if test "$with_lock_directory" = no;then
@@ -254,4 +262,6 @@ fi
 
 AC_SUBST(LIBOBJS)
 
-AC_OUTPUT(Makefile)
+AC_OUTPUT([Makefile
+po/Makefile.in
+intl/Makefile],[sed -e "/POTFILES =/r po/POTFILES" -e "s/ ChangeLog / /" po/Makefile.in > po/Makefile])
diff --git a/mdsms.c b/mdsms.c
index 24de203..2b7edd1 100644 (file)
--- a/mdsms.c
+++ b/mdsms.c
@@ -56,6 +56,9 @@ static char rcsid[] ATTR_UNUSED = "$Id$";
 #ifdef HAVE_SYS_POLL_H
 #include <sys/poll.h>
 #endif
+#ifdef HAVE_LOCALE_H
+#include <locale.h>
+#endif
 
 #ifdef HAVE_GETOPT_LONG
 #include <getopt.h>
@@ -83,7 +86,7 @@ static char rcsid[] ATTR_UNUSED = "$Id$";
 #define d7(n1,n2,n3,n4,n5,n6,n7)    dB((dO,n1,n2,n3,n4,n5,n6,n7   ))
 #define d8(n1,n2,n3,n4,n5,n6,n7,n8) dB((dO,n1,n2,n3,n4,n5,n6,n7,n8))
 
-static const char version[]="This is Mobile Device SMS tool (" PACKAGE " " VERSION ")\n";
+static const char version[]="Mobile Device SMS tool (" PACKAGE " " VERSION ")\n";
 
 static int verbose
 #ifdef DEBUG
@@ -141,7 +144,7 @@ char host[LINE_MAX];
        if (!logf) return;
        if (mypid==-1) {
                mypid=getpid();
-               if (gethostname(host,sizeof(host))) strcpy(host,"<ERROR>");
+               if (gethostname(host,sizeof(host))) strcpy(host,_("<ERROR>"));
                }
        time(&stamp);
        ctm=ctime(&stamp);
@@ -188,7 +191,7 @@ char fatal,pm;
 static void chk(const void *p)
 {
        if (p) return;
-       error("!Virtual memory exhausted");
+       error(_("!Virtual memory exhausted"));
 }
 
 static char *devcmd(const char *term,const char *catch,const char *send,...) ATTR_PRINTFORMAT(3,4);
@@ -200,7 +203,7 @@ static void unlockdevice(int hard)
        if (!hard && locked>1) { locked--; return; }
        d2("Removing lockfile \"%s\"\n",lockreal);
        if (unlink(lockreal))
-               error("^Error removing my device lockfile \"%s\"",lockreal);
+               error(_("^Error removing my device lockfile \"%s\""),lockreal);
        locked=0;
 }
 
@@ -217,7 +220,7 @@ char *cmd=restore;
                }
        if (restios_yes) {
                if (tcsetattr(devfd,TCSANOW,&restios))
-                       error("^Error restoring termios for device");
+                       error(_("^Error restoring termios for device"));
                restios_yes=0;
                }
        unlockdevice(1);
@@ -227,11 +230,11 @@ char *cmd=restore;
 
 static void usage(void)
 {
-       fprintf(stderr,"\
+       fprintf(stderr,_("\
 \n\
 %s\
 \n\
-Usage: " PACKAGE " [-c|--config <cfgfile>] [-d|--device <device>]\n\
+Usage: %s [-c|--config <cfgfile>] [-d|--device <device>]\n\
              {--send | --send-mobildock | --receive | --logo-send}\n\
              [-L|--log <file>] [-b|--baud <rate>]\n\
              [-l|--lockfile <lock>] [-s|--smsc <smsc #>] [-m|--maxretry <#>]\n\
@@ -247,16 +250,17 @@ Usage: " PACKAGE " [-c|--config <cfgfile>] [-d|--device <device>]\n\
              <dest. phone> <ring filename>\n\
 \n\
  -c, --config\tRead this additional config file\n\
-\t\t(def. \"" CONFIG_MAIN "\" and \"$HOME" CONFIG_HOME "\")\n\
- -d, --device\tMobile on this serial device (def. \"" DEF_DEVICE "\")\n\
- -L, --log\tLog all important messages to this file (def. \"" DEF_LOGNAME "\")\n\
+\t\t(def. \"%s\" and \"$HOME%s\")\n\
+ -d, --device\tMobile on this serial device (def. \"%s\")\n\
+ -L, --log\tLog all important messages to this file (def. \"%s\")\n\
  -b, --baud\tSet baudrate, 2400-57600 supported (def. %d)\n\
  -l, --lockfile\tLock serial port by this file, \"%%s\" is basename of device\n\
 \t\t(def. \"%s\")\n\
  -s, --smsc\tUse this SMS Center number (def. query from mobile)\n\
  -m, --maxretry\tMaximum retries of any command before giving up (def. %d)\n\
  -r, --readtime\tSeconds for maximum wait time for response\n\
-\t\t(def. %ds standard, %ds for MobilDock modes, multiplied %dx for long cmds)\n\
+\t\t(def. %ds standard, %ds for MobilDock modes,\n\
+\t\t multiplied %dx for long cmds)\n\
  -t, --chartime\tMilliseconds between each char (def. %dms)\n\
  -T, --cmdtime\tMilliseconds before each whole AT command (def. %dms)\n\
  -v, --verbose\tIncrease verbosity level, more \"-v\"s give more messages\n\
@@ -273,13 +277,14 @@ Usage: " PACKAGE " [-c|--config <cfgfile>] [-d|--device <device>]\n\
 \t\t%%t - ctime(3) style timestamp (e.g. \"Wed Jun 30 21:49:08 1993\")\n\
 --logo-send:\n\
  <GSMnet id>\t* Oper. logo: Enter custom network code MccMnc, e.g. 23002\n\
-\t\t* Oper. logo: Specify \"" WORD_NET "\" to read network code from NOL file\n\
-\t\t* Group gfx : Specify \"" WORD_GROUP "\" to send logo as group graphics\n\
+\t\t* Oper. logo: Specify \"%s\" to read network code from NOL file\n\
+\t\t* Group gfx : Specify \"%s\" to send logo as group graphics\n\
 \n\
 You may need to use the following line to catch all of this help text:\n\
 ./mdsms 2>&1|more\n\
-\n",version,DEF_BAUD,DEF_LOCKFILE,DEF_MAXRETRY,
-DEF_READTIME,DEF_READTIME_MOBILDOCK,EXT_READTIME,DEF_CHARTIME,DEF_CMDTIME);
+\n"),version,PACKAGE,CONFIG_MAIN,CONFIG_HOME,DEF_DEVICE,DEF_LOGNAME,DEF_BAUD,DEF_LOCKFILE,DEF_MAXRETRY,
+DEF_READTIME,DEF_READTIME_MOBILDOCK,EXT_READTIME,DEF_CHARTIME,DEF_CMDTIME,
+WORD_NET,WORD_GROUP);
        exit(EXIT_FAILURE);
 }
 
@@ -319,7 +324,7 @@ static unsigned cfgstacki=0;
 static void chkfclose(FILE *f,const char *fname)
 {
        if (fclose(f))
-               error("^Error closing \"%s\"",fname);
+               error(_("^Error closing \"%s\""),fname);
 }
 
 static long getfilesize(FILE *f,const char *fname)
@@ -327,9 +332,9 @@ static long getfilesize(FILE *f,const char *fname)
 long size;
 
        if (fseek(f,0,SEEK_END))
-               error("^Error seeking to end of \"%s\"",fname);
+               error(_("^Error seeking to end of \"%s\""),fname);
        if ((size=ftell(f))<0)
-               size=-1,error("^Error measuring \"%s\"",fname);
+               size=-1,error(_("^Error measuring length of \"%s\""),fname);
        rewind(f);
        return(size);
 }
@@ -345,22 +350,22 @@ long size;
 static unsigned tot=0;
 
        if (tot++>=MAXCFGNUM) {
-               if (tot==MAXCFGNUM+1) error("Too many config files to read, max is %d, break-out",MAXCFGNUM);
+               if (tot==MAXCFGNUM+1) error(_("Too many config files to read, max is %d, break-out"),MAXCFGNUM);
                return;
                }
        if (!(f=fopen(fname,"rt"))) {
-               if (!quiet) error("^Can't open config file \"%s\" for r/o",fname);
+               if (!quiet) error(_("^Can't open config file \"%s\" for r/o"),fname);
                return;
                }
                
-       if (verbose>=2) error(".Reading config file \"%s\"",fname);
+       if (verbose>=2) error(_(".Reading config file \"%s\""),fname);
        if ((size=getfilesize(f,fname))==-1) size=0;
        if (size>MAXCONFIG) 
-               error("File \"%s\" is too long, read only %d bytes",fname,MAXCONFIG);
+               error(_("File \"%s\" is too long, read only %d bytes"),fname,MAXCONFIG);
        chk(buf=malloc((size?size:MAXCONFIG)+1));
        got=fread(buf,1,(size?size:MAXCONFIG),f);
        if (size && got!=size)
-               error("File \"%s\" read error, got only %u bytes of %ld",fname,got,size);
+               error(_("File \"%s\" read error, got only %u bytes of %ld"),fname,got,size);
        chkfclose(f,fname);
        buf[got]='\0';
        args[0]=pname;
@@ -371,13 +376,13 @@ char c=*s;
                        if (!blank) {
                                *d='\0';
                                blank=1;
-                               if (verbose>=2) error("\nConfig \"%s\": arg#%d: %s",fname,argp-1,args[argp-1]);
+                               if (verbose>=2) error(_("\nConfig \"%s\": arg#%d: %s"),fname,argp-1,args[argp-1]);
                                }
                        continue;
                        }
                if (blank) {
                        if (argp>=NELEM(args)-1) {
-                               error("Too many arguments in \"%s\", from offset %d ignored",fname,s-buf);
+                               error(_("Too many arguments in \"%s\", from offset %d ignored"),fname,s-buf);
                                break;
                                }
                        args[argp++]=s;
@@ -527,7 +532,7 @@ int i;
        while ((optc=getopt_long(argp,args,"c:d:L:b:l:s:m:r:t:T:fvhV",longopts,NULL))!=EOF) switch (optc) {
                case 'c':
                        if (cfgstacki>=NELEM(cfgstack)) {
-                               error("Looping (%d) during attempt to read config file \"%s\", break-out",NELEM(cfgstack),from);
+                               error(_("Looping (%d) during attempt to read config file \"%s\", break-out"),NELEM(cfgstack),from);
                                break;
                                }
                        chk(cfgstack[cfgstacki++]=strdup(optarg));
@@ -566,7 +571,7 @@ int i;
                        exit(EXIT_FAILURE);
                default:
                        if (optc!='h')
-                               error("\nLast getopt(3) error occured during parsing option %d from \"%s\"! Follows help:",optind-1,from);
+                               error(_("\nLast getopt(3) error occured during parsing option %d from \"%s\"! Follows help:"),optind-1,from);
                        usage();
                        break;
                }
@@ -587,13 +592,13 @@ static const struct nullcheck {
        const char *name;
        } nullcheck[]={
                {&phone,MODE_BIT(MODE_SEND)|MODE_BIT(MODE_SEND_MOBILDOCK)|MODE_BIT(MODE_LOGO_SEND),
-                       "destination phone number"},
-               {&logoname,MODE_BIT(MODE_LOGO_SEND),"logo filename"},
-               {&ringname,MODE_BIT(MODE_RING_SEND),"ring filename"},
-               {&body,MODE_BIT(MODE_RECEIVE),"body text"}, /* we allow empty bodies for SENDs */
+                       N_("destination phone number")},
+               {&logoname,MODE_BIT(MODE_LOGO_SEND),N_("logo filename")},
+               {&ringname,MODE_BIT(MODE_RING_SEND),N_("ring filename")},
+               {&body,MODE_BIT(MODE_RECEIVE),N_("body text")}, /* we allow empty bodies for SENDs */
 #if 0
-               {&gsmnet,"GSM operator network code",MODE_LOGO_SEND},
-               {&device,"device for communication",0},
+               {&gsmnet,MODE_BIT(MODE_LOGO_SEND),N_("GSM operator network code")},
+               {&device,0,N_("device for communication")},
 #endif
        };
 static char **emptycheck[]={&logname,&smsc,&logoname,&gsmnet};
@@ -613,7 +618,7 @@ static inline void cmdline_done(void)
 {
 char *s;
        while ((s=nextargstack())) {
-               error("\nExcessive option %d from \"%s\" ignored: %s",
+               error(_("\nExcessive option %d from \"%s\" ignored: %s"),
                        lastargstack_index,lastargstack_from,s);
                free(s);
                }
@@ -627,12 +632,12 @@ static char err[LINE_MAX];
 
        for (s=s1=(phone+(*phone=='+'));*s && s-s1<MAXNUMLEN;s++)
                if (!isdigit(*s)) {
-                       VARPRINTF2(err,"Invalid digit '%c' in phone number - at offset %d",
+                       VARPRINTF2(err,_("Invalid digit '%c' in phone number - at offset %d"),
                                *s,s-phone);
                        return(err);
                        }
        if (!*s) return(NULL);
-       VARPRINTF2(err,"Phone number too long (%d), max. %d digits allowed",
+       VARPRINTF2(err,_("Phone number too long (%d), max. %d digits allowed"),
                strlen(s1),MAXNUMLEN);
        return(err);
 }
@@ -643,7 +648,7 @@ static void cmdline_phone(void)
 char *s;
 
                if ((s=check_phone(phone)))
-                       error("!%s in option %d from \"%s\": %s",
+                       error(_("!%s in option %d from \"%s\": %s"),
                                        s,lastargstack_index,lastargstack_from,phone);
                }
 }
@@ -658,7 +663,7 @@ char *s;
                        switch (*++s) {
                                case 'p': case 'T': case 't': break;
                                default:
-                                       error("Unknown formatsymbol '%c', use (\"%%%%%c\" to fix it) at pos %d in: %s",
+                                       error(_("Unknown formatsymbol '%c' (use \"%%%%%c\" to fix it) at pos %d in: %s"),
                                                *s,*s,s-body,body);
                                }
                }
@@ -685,20 +690,20 @@ char *s,*d,e=0;
                        for (d=s=gsmnet;*s;s++) {
                                if (isdigit(*s)) { *d++=*s; continue; }
                                if (isspace(*s)) continue;
-                               error("\nInvalid characted '%c' in GSMnet at offs %d: %s",
+                               error(_("\nInvalid characted '%c' in GSMnet at offs %d: %s"),
                                        *s,s-gsmnet,ogsmnet);
                                e=1;
                                break;
                                }
                        if ((d-gsmnet)!=5) {
-                               error("\nGSMnet is required to have exactly 5 digits or to be\n\
-either \"" WORD_NET "\" or \"" WORD_GROUP "\", but found length %d: %s",
-                                       d-gsmnet,ogsmnet);
+                               error(_("\nGSMnet is required to have exactly 5 digits or to be\n\
+either \"%s\" or \"%s\", but found length %d: %s"),
+                                       WORD_NET,WORD_GROUP,d-gsmnet,ogsmnet);
                                e=1;
                                }
                        if (!e) *d='\0';
                        else {
-                               error("\nGSMnet option %d from \"%s\" rejected due to previous errors: %s",
+                               error(_("\nGSMnet option %d from \"%s\" rejected due to previous errors: %s"),
                                        lastargstack_index,lastargstack_from,ogsmnet);
                                free(gsmnet);
                                gsmnet=NULL;
@@ -716,7 +721,7 @@ static inline void cmdline_ring_send(void)
 static void lockclose(int fd)
 {
        if (close(fd))
-               error("Error closing lockfile \"%s\"",lockreal);
+               error(_("Error closing lockfile \"%s\""),lockreal);
 }
 
 static inline int lockdevice(int attempt)
@@ -735,12 +740,12 @@ pid_t pid;
 recheck:
                if (delay) sleep(delay);
                delay=DEVLOCK_PERIOD;
-               if (verbose>=3) error(".Checking the lockfile \"%s\"..",lockreal);
+               if (verbose>=3) error(_(".Checking the lockfile \"%s\".."),lockreal);
                if ((fd=open(lockreal,O_RDONLY))==-1) break;
                if ((got=read(fd,buf,sizeof(buf)-1))<=0) {
 isempty:
                        if (empty>=DEVLOCK_MAXEMPTY) {
-                               error(".Lockfile \"%s\" is still not valid, removing it",lockreal);
+                               error(_(".Lockfile \"%s\" is still not valid, removing it"),lockreal);
                                goto remove;
                                }
                        empty++;
@@ -752,27 +757,27 @@ isempty:
                empty=0;
                errno=0;
                if (kill(pid,0) && errno!=ESRCH && errno!=EPERM)
-                       error("^Error during checking consciousness of PID %d",pid);
+                       error(_("^Error during checking consciousness of PID %d"),pid);
                if (errno!=ESRCH) {
                        if (attempt) return(0);
                        continue;
                        }
-               error(".Lockfile \"%s\" is stale (PID %d), removing it",lockreal,pid);
+               error(_(".Lockfile \"%s\" is stale (PID %d), removing it"),lockreal,pid);
 remove:
                lockclose(fd);
                if (unlink(lockreal))
-                       error("^Error removing foreign lockfile \"%s\"",lockreal);
+                       error(_("^Error removing foreign lockfile \"%s\""),lockreal);
                break;
                }
        errno=0;
        if ((fd=open(lockreal,O_WRONLY|O_CREAT|O_EXCL,0644))==-1) {
                if (errno==EEXIST) goto recheck;
-               error("^!Error creating lockfile \"%s\"",lockreal);
+               error(_("^!Error creating lockfile \"%s\""),lockreal);
                }
        locked=1;
        got=VARPRINTF(buf,"%010d\n",getpid()); assert(got==11);
        if (write(fd,buf,got)!=got)
-               error("^!Error writing data to lockfile \"%s\"",lockreal);
+               error(_("^!Error writing data to lockfile \"%s\""),lockreal);
        lockclose(fd);
        return((locked=1));
 }
@@ -792,7 +797,7 @@ static void sigalarm(int signo)
 {
        setalarm();
        wasalarm=1;
-       if (verbose>=1) error("Timed out");
+       if (verbose>=1) error(_("Timed out"));
 }
 
 static void blocking(char yes)
@@ -800,7 +805,7 @@ static void blocking(char yes)
 static char state=-1;
        if (state==yes) return;
        if (fcntl(devfd,F_SETFL,(yes?0:O_NONBLOCK)))
-               error("^!fcntl() on device for %sblocking mode",(yes?"":"non-"));
+               error(_("^!fcntl() on device for %s mode"),(yes?_("blocking"):_("non-blocking")));
        state=yes;
 }
 
@@ -832,8 +837,8 @@ const char *p;
 static int retrycnt=0;
 static void retrying(void)
 {
-       if (maxretryn>=0 && ++retrycnt>maxretryn) error("!Maximum command retry count (%ld) exceeded",maxretryn);
-       if (verbose>=2) error(".Retrying phase, %d out of %ld..",retrycnt,maxretryn);
+       if (maxretryn>=0 && ++retrycnt>maxretryn) error(_("!Maximum command retry count (%ld) exceeded"),maxretryn);
+       if (verbose>=2) error(_(".Retrying phase, %d out of %ld.."),retrycnt,maxretryn);
 }
 
 static char *reform(const char *s,int slot)
@@ -846,7 +851,7 @@ char c,*d;
 struct formslot *fs;
 
        assert(slot>=0 && slot<NELEM(arr));
-       if (!s) return("<unset>");
+       if (!s) return(_("<unset>"));
        if (!(fs=&arr[slot])->s)
                chk(fs->s=malloc(fs->l=LINE_MAX));
        d=fs->s;
@@ -910,23 +915,23 @@ err:
                va_start(ap,send);
                l=VARVPRINTF(buf,send,ap); bufl=l+(!!osend);
                va_end(ap);
-               if (bufl>=sizeof(buf)-1) error("!Command too big (%d>%d)",bufl,sizeof(buf)-1);
-               if (verbose>=2) error(".devcmd(send=%s,term=%s,catch=%s,timeout=%ld)",
+               if (bufl>=sizeof(buf)-1) error(_("!Command too big (%d>%d)"),bufl,sizeof(buf)-1);
+               if (verbose>=2) error(_(".devcmd(send=%s,term=%s,catch=%s,timeout=%ld)"),
                        reform(buf,0),reform(term,1),reform(catch,2),alarmtime);
                if (osend) buf[l]='\r';
                for (offs=0,got=0;offs<bufl;offs++) {
                        alarm(MAXSENDTIME);
                        usleep((offs?chartimen:cmdtimen)*1000);
                        if (!offs && tcflush(devfd,TCIOFLUSH))
-                               error("^Error flushing I/O queue of device");
+                               error(_("^Error flushing I/O queue of device"));
                        if (write(devfd,buf+offs,1)!=1) break;
                        got++;
                        if (tcdrain(devfd))
-                               error("^Error forcing output of char at pos %d of cmd %s",offs,reform(buf,0));
+                               error(_("^Error forcing output of char at pos %d of cmd %s"),offs,reform(buf,0));
                        }
                alarm(0);
                if (got!=bufl) {
-                       error("^Wrote only %d of %d bytes of command",got,bufl);
+                       error(_("^Wrote only %d of %d bytes of command"),got,bufl);
                        goto err;
                        }
                }
@@ -960,8 +965,8 @@ err:
                        got=read(devfd,buf+bufl,1);
                        }
                if (got<=0) {
-                       if (wasalarm) error("Maximum response timeout (%lds) exceeded",alarmtime);
-                       else error("^Couldn't read device data (ret=%d)",got);
+                       if (wasalarm) error(_("Maximum response timeout (%lds) exceeded"),alarmtime);
+                       else error(_("^Couldn't read device data (ret=%d)"),got);
                        goto err;
                        }
 skipread:
@@ -970,7 +975,7 @@ skipread:
                s=buf+bufl;
                while (buf+bufl2>s && (s=memchr(s,'\0',buf+bufl2-s))) *s++=REPL_NULLCHAR;
                if (verbose>=3)
-                       error("\nGot chunk of data from device: %s",reform(buf+bufl,0));
+                       error(_("\nGot chunk of data from device: %s"),reform(buf+bufl,0));
                if (!noconvcr) {
                        s=buf+bufl;
                        while (buf+bufl2>s && (s=memchr(s,'\r',buf+bufl2-s))) *s++='\n';
@@ -982,7 +987,7 @@ skipread:
                assert(strlen(buf)==bufl);
                /* d3(">%s|%s<\n",buf,term); */
                if (strstr(buf,ERROR_SUBSTR1) || strstr(buf,ERROR_SUBSTR2)) {
-                       error("Found ERROR response on command %s",reform(send,0));
+                       error(_("Found ERROR response on command %s"),reform(send,0));
                        goto err;
                        }
                if (catch && !record && bufl>=catchl && (hit=strstr(buf,catch))) {
@@ -1000,13 +1005,13 @@ skipread:
        alarm(0);
        if (!catchdatal) {
                if (!catch) return("");
-               error("Data requested on command %s but no found after term %s",reform(send,0),reform(term,1));
+               error(_("Data requested on command %s but no found after term %s"),reform(send,0),reform(term,1));
                goto err;
                }
        assert(!!catch);
        record=emptystring;
        catched(record+1,edata);
-       if (verbose>=2) error(".Returning data %s for cmd %s",reform(catchdata,0),reform(send,1));
+       if (verbose>=2) error(_(".Returning data %s for cmd %s"),reform(catchdata,0),reform(send,1));
        return(catchdata);
 }
 
@@ -1020,7 +1025,7 @@ unsigned char n;
        *++d=(plus?ADDR_INT:ADDR_NAT);
        while (*addr) {
                if (*addr<'0' || *addr>'9')
-                       error("!Error during conversion of number at: %s",addr);
+                       error(_("!Error during conversion of number at: %s"),addr);
                tot++;
                n=(*addr++)-'0';
                if ((flip=!flip)) *++d=0xF0|n;
@@ -1060,23 +1065,23 @@ unsigned char bin[2+(MAXNUMLEN+1)/2];
        s=devcmd(NULL,"\n+CSCA:","\r\nAT+CSCA?");
        while (isspace(*s)) s++;
        if (!*s || !strcmp(s,"EMPTY"))
-               error("!No SMS set in mobile station found, please use option \"-s\"");
-       if (verbose>=1) error("\nFound default SMSC in mobile: %s",s);
-       if (*s!='"') error("!No left-quote found in: %s",s);
-       if (!(t=strrchr(s+1,'"'))) error("!No right-quote found in: %s",s);
+               error(_("!No SMSC set in mobile station found, please use option \"-s\""));
+       if (verbose>=1) error(_("\nFound default SMSC in mobile: %s"),s);
+       if (*s!='"') error(_("!No left-quote found in: %s"),s);
+       if (!(t=strrchr(s+1,'"'))) error(_("!No right-quote found in: %s"),s);
        if (s+1==t)
-               error("!No SMS set in mobile station found, please use option \"-s\"");
+               error(_("!No SMS set in mobile station found, please use option \"-s\""));
        e=t++;
        while (isspace(*t)) t++;
-       if (*t++!=',') error("!No comma found after quotes in: %s",s);
+       if (*t++!=',') error(_("!No comma found after quotes in: %s"),s);
        while (isspace(*t)) t++;
        l=strtol(t,&serr,10);
        if ((l!=ADDR_NAT && l!=ADDR_INT) || (serr && *serr))
-               error("!Type parse error in: %s",s);
+               error(_("!Type parse error in: %s"),s);
        if (l==ADDR_NAT || s[1]=='+') s++;
        else *s='+';
        *e='\0';
-       if (verbose>=2) error("\nDecoded SMSC address: %s",s);
+       if (verbose>=2) error(_("\nDecoded SMSC address: %s"),s);
        if (!NEED_PDUSMSC()) return;
        chk(finalsmsc=strdup(s));
        bin[0]=1+(prepaddr(bin,finalsmsc)+1)/2;
@@ -1094,7 +1099,7 @@ static inline unsigned char charconv(char c,size_t offs)
                }
 #if 0
        if ((c>='A' && c<='Z') || (c>='a' && c<='z') || (c>='0' && c<='9')) return(c);
-       error("Can't convert character '%c' (0x%02X) at offs %d (0-based), substituted '?'",
+       error(_("Can't convert character '%c' (0x%02X) at offs %d (0-based), substituted '?'"),
                c,(unsigned char)c,offs);
        return('?');
 #endif
@@ -1121,7 +1126,7 @@ struct hexdata *hd;
        hd->next=NULL;
        hexdatatail=&hd->next;
        textconv(hd->data,bin,w);
-       if (verbose>=2) error("\nWill send hexdata: %s",hd->data);
+       if (verbose>=2) error(_("\nWill send hexdata: %s"),hd->data);
 }
 
 static inline void logoread(void)
@@ -1143,48 +1148,48 @@ int sizex,sizey,bit;
 #define WORD(n) (((unsigned char)buf[(n)])|(((unsigned char)buf[(n)+1])<<8))
 
        if (!(f=fopen(logoname,"rb")))
-               error("^!Cannot open logo file \"%s\" for r/o",logoname);
+               error(_("^!Cannot open logo file \"%s\" for r/o"),logoname);
        got=fread(buf,1,sizeof(buf),f);
        chkfclose(f,logoname);
             if (got>=20 && !memcmp(buf,"NOL",4)) {
                VARPRINTF2(gsmnetf,"%03.3u%02.2u",WORD(6),WORD(8));
                assert(strlen(gsmnetf)==5);
                r=10;
-               if (verbose>=1) error(".Reading NOL file \"%s\", GSMnet \"%s\", word@4=%d..",
+               if (verbose>=1) error(_(".Reading NOL file \"%s\", GSMnet \"%s\", word@4=%d.."),
                        logoname,gsmnetf,WORD(4));
                }
        else if (got>=16 && !memcmp(buf,"NGG",4)) {
                r=6;
-               if (verbose>=1) error(".Reading NGG file \"%s\", word@4=%d..",
+               if (verbose>=1) error(_(".Reading NGG file \"%s\", word@4=%d.."),
                        logoname,WORD(4));
                }
-       else error("!Unknown file format of logo file \"%s\"",logoname);
+       else error(_("!Unknown file format of logo file \"%s\""),logoname);
        if (gsmnet && !strtrycasecmp(gsmnet,WORD_NET)) {
-               if (!*gsmnetf) error("!NOL network code detection requested but NOL file not loaded, please specify network code");
+               if (!*gsmnetf) error(_("!NOL network code detection requested but NOL file not loaded, please specify network code"));
                gsmnet=gsmnetf;
                }
        if (!gsmnet || !strtrycasecmp(gsmnet,WORD_GROUP) || !*gsmnet) {
-               error("\nSending logo as: group graphics");
+               error(_("\nSending logo as: group graphics"));
                gsmnet=NULL;
                }
        else {
-               error("\nSending logo as: operator logo for \"%s\"",gsmnet);
+               error(_("\nSending logo as: operator logo for \"%s\""),gsmnet);
                bin[4]=0x82; /* dest port 0x1582 */
                }
        
        sizex=WORD(r); sizey=WORD(r+2);
-       if (verbose>=2) error(".Magic words: @+4=%d, @+6=%d, @+8=%d",
+       if (verbose>=2) error(_(".Magic words: @+4=%d, @+6=%d, @+8=%d"),
                        WORD(r+4),WORD(r+6),WORD(r+8));
        r+=10;
        if (sizex<1 || sizex>255
-        || sizey<1 || sizey>255) error("!Invalid size: %dx%d",sizex,sizey);
+        || sizey<1 || sizey>255) error(_("!Invalid size: %dx%d"),sizex,sizey);
        chars=((bits=sizex*sizey)+7)/8;
-       if (r+bits>got) error("!Logo file \"%s\" too short - actual=%d, need(%dx%d)=%d",
+       if (r+bits>got) error(_("!Logo file \"%s\" too short - actual=%d, need(%dx%d)=%d"),
                logoname,got,sizex,sizey,r+chars);
        else if (r+bits<got)
-               if (verbose>=1) error("Ignoring trailing garbage in \"%s\", used only %d bytes",logoname,r+bits);
+               if (verbose>=1) error(_("Ignoring trailing garbage in \"%s\", used only %d bytes"),logoname,r+bits);
        if ((got=(7+(gsmnet?3:0)+4+chars))>140)
-               error("!SMS size would be %d bytes but 140 is maximum",got);
+               error(_("!SMS size would be %d bytes but 140 is maximum"),got);
        w=7;
        if (gsmnet) {
                bin[w++]=((gsmnet[1]&0x0F)<<4)|(gsmnet[0]&0x0F);
@@ -1198,7 +1203,7 @@ int sizex,sizey,bit;
                bin[w]=0;
                for (bit=0x80;(bits>0) && (bit>0);bits--,bit>>=1) {
                        if (buf[r]!='0' && buf[r]!='1')
-                               error("!Invalid character (neither '0' nor '1')in logo file \"%s\" at offset 0x%X",
+                               error(_("!Invalid character (neither '0' nor '1') in logo file \"%s\" at offset 0x%X"),
                                        logoname,r);
                        if (buf[r++]=='1') bin[w]|=bit;
                        }
@@ -1239,39 +1244,39 @@ long size;
 #define WORD(n) (((unsigned char)buf[(n)])|(((unsigned char)buf[(n)+1])<<8))
 
        if (!(f=fopen(logoname,"rb")))
-               error("^!Cannot open logo file \"%s\" for r/o",logoname);
+               error(_("^!Cannot open ring file \"%s\" for r/o"),logoname);
        if ((size=getfilesize(f,logoname))==-1)
-               error("!File size is essential to continue operation");
+               error(_("!File size determination is essential to continue operation"));
        if (size<0x103)
-               error("!File \"%s\" size %ld too small (must >=0x103)! Is it .000 file?",
+               error(_("!File \"%s\" size %ld too small (must >=0x103)! Is it .000 file?"),
                        logoname,size);
        if (fseek(f,0x100,SEEK_SET))
-               error("^Seeking error on \"%s\", ignoring",logoname);
+               error(_("^Seeking error on \"%s\", ignoring"),logoname);
        size-=0x100;
        if (size<=BIN1_PAYLOAD) {
                if ((got=fread(bin1+7,1,size,f))!=size)
-                       error("^Read error on \"%s\", wanted %ld, got %d",logoname,size,got);
-               error("\nSending ring tone \"%s\" as single SMS (size %ld, max %d)",
+                       error(_("^Read error on \"%s\", wanted %ld, got %d"),logoname,size,got);
+               error(_("\nSending ring tone \"%s\" as single SMS (size %ld, max %d)"),
                        ringname,size,BIN1_PAYLOAD);
                nokiaprep(bin1,7+size);
                }
        else {
                totn=(size+BINN_PAYLOAD-1)/BINN_PAYLOAD;
                if (totn>0xFF)
-                       error("!File size %ld too large for multi-SMS ring upload (max=%d)",
+                       error(_("!File size %ld too large even for multi-SMS ring upload (max=%d)"),
                                size,BINN_PAYLOAD*0xFF);
                binn[10]=totn;
                if (verbose>=1)
-                       error("\nSending ring tone \"%s\" as %d multi-SMSes (size %ld, max %d, frag %d)",
+                       error(_("\nSending ring tone \"%s\" as %d multi-SMSes (size %ld, max %d, frag %d)"),
                                ringname,totn,size,BIN1_PAYLOAD,BINN_PAYLOAD);
                binn[9]=time(NULL)&0x100; /* rand() would be better but it is a compatibility pain */
                if (verbose>=1)
-                       error("\nUsing unique multi-SMS ID 0x%02X",(unsigned)binn[9]);
+                       error(_("\nUsing unique multi-SMS ID 0x%02X"),(unsigned)binn[9]);
                for (fragn=1;fragn<=totn;fragn++) {
                        binn[11]=fragn;
                        want=MIN(size,BINN_PAYLOAD);
                        if ((got=fread(binn+12,1,want,f))!=want)
-                               error("^Read error on \"%s\", wanted %d, got %d",logoname,want,got);
+                               error(_("^Read error on \"%s\", wanted %d, got %d"),logoname,want,got);
                        nokiaprep(binn,12+want);
                        size-=want;
                        }
@@ -1297,7 +1302,7 @@ size_t offs=0;
        *d++=PDU_DCS;
        *d++=PDU_VP;
        if (bodylen>MAXBODYLEN) {
-               error("Body too large (%d>%d), cut",bodylen,MAXBODYLEN);
+               error(_("Body too large (%d>%d), cut"),bodylen,MAXBODYLEN);
                body[(bodylen=MAXBODYLEN)]='\0';
                }
        bodyr=body;
@@ -1344,16 +1349,16 @@ char *finame;
        readbody=0;
        if (!finame) {
                if (verbose>=1)
-                       error("\nPlease enter the SMS text body, end with EOF (ctrl-D):");
+                       error(_("\nPlease enter the SMS text body, end with EOF (ctrl-D):"));
                }
        else {
                if (!(fin=fopen(finame,"rt")))
-                       error("^!Can't open data file \"%s\" for r/o",finame);
+                       error(_("^!Can't open data file \"%s\" for r/o"),finame);
                }
        chk(body=malloc(BODYLOAD));
        bodylen=fread(body,1,BODYLOAD,fin);
        if (bodylen==-1)
-               error("^!Error reading stream \"%s\"",(finame?finame:"<stdin>"));
+               error(_("^!Error reading stream \"%s\""),(finame?finame:_("<stdin>")));
        if (finame) {
                chkfclose(fin,finame);
                free(finame);
@@ -1381,7 +1386,7 @@ retry:
 #else /* HAVE_POLL */
 #ifdef HAVE_FD_SETSIZE
        if (devfd>=FD_SETSIZE)
-               error("!Device file descriptor %d can't fit in select() FD_SETSIZE (%d)",
+               error(_("!Device file descriptor %d can't fit in select() FD_SETSIZE (%d)"),
                        devfd,FD_SETSIZE);
 #endif /* HAVE_FD_SETSIZE */
        FD_ZERO(&rfds); FD_SET(devfd,&rfds);
@@ -1390,14 +1395,14 @@ retry:
 #endif /* HAVE_POLL */
        if (immed && i==0) return(0);
        if (i!=1)
-               error("^Failed (retval %d) while waiting for data, ignoring",i);
+               error(_("^Failed (retval %d) while waiting for data, ignoring"),i);
 
 #ifdef HAVE_POLL
        if (ufd.revents&(POLLERR|POLLHUP))
 #else /* HAVE_POLL */
        if (FD_ISSET(devfd,&xfds))
 #endif /* HAVE_POLL */
-               error("^Error while waiting for data, ignoring");
+               error(_("^Error while waiting for data, ignoring"));
 
 #ifdef HAVE_POLL
        if (!(ufd.revents&POLLIN))
@@ -1405,7 +1410,7 @@ retry:
        if (!(FD_ISSET(devfd,&rfds)))
 #endif /* HAVE_POLL */
                {
-               error("^No data input after waited for data, retrying");
+               error(_("^No data input after waited for data, retrying"));
                goto retry;
                }
        return(1);
@@ -1424,28 +1429,28 @@ const char *sf,*ss;
                                break;
                        case '9':
                                if (isdigit(cs)) break;
-                               subp="digit";
+                               subp=_("digit");
                                break;
                        case '+':
                                if (cs=='+' || cs=='-') break;
-                               subp="+/- sign";
+                               subp=_("+/- sign");
                                break;
                        default:
                                if (cf==cs) break;
                                VARPRINTF(sub,"'%c'",cf); subp=sub;
                        }
                if (!subp) continue;
-               VARPRINTF5(err,"Expected %s, found '%c' at pos %d of string [%s], formatstring [%s]",
+               VARPRINTF5(err,_("Expected %s, found '%c' at pos %d of string [%s], formatstring [%s]"),
                        subp,cs,ss-string,string,fmt);
                return(err);
                }
        if (*sf) {
-               VARPRINTF2(err,"String too short for format, string [%s], formatstring [%s]",
+               VARPRINTF2(err,_("String too short for format, string [%s], formatstring [%s]"),
                        string,fmt);
                return(err);
                }
        if (*ss) {
-               VARPRINTF2(err,"Trailing garbage in string [%s], formatstring [%s]",
+               VARPRINTF2(err,_("Trailing garbage in string [%s], formatstring [%s]"),
                        string,fmt);
                return(err);
                }
@@ -1467,12 +1472,12 @@ static const struct {
        const char *name;
        } timeparse[]={
 #define TP_ENT(a,b,c,d,e) { a,offsetof(struct tm,b),c,d,e }
-               TP_ENT( 3,tm_year,0,99,"year"),
-               TP_ENT( 6,tm_mon ,1,12,"month"),
-               TP_ENT( 9,tm_mday,1,31,"day of month"),
-               TP_ENT(12,tm_hour,0,23,"hour"),
-               TP_ENT(15,tm_min ,0,59,"minute"),
-               TP_ENT(18,tm_sec ,0,59,"second"),
+               TP_ENT( 3,tm_year,0,99,N_("year")),
+               TP_ENT( 6,tm_mon ,1,12,N_("month")),
+               TP_ENT( 9,tm_mday,1,31,N_("day of month")),
+               TP_ENT(12,tm_hour,0,23,N_("hour")),
+               TP_ENT(15,tm_min ,0,59,N_("minute")),
+               TP_ENT(18,tm_sec ,0,59,N_("second")),
                /* Time zone ignored */
                };
 int i,val;
@@ -1481,12 +1486,12 @@ int i,val;
 
        for (s=buf;*s==' ';s++);
        if (*s++!='"') {
-               error("Cannot find initial '\"' in CMT header: %s",buf);
+               error(_("Cannot find initial '\"' in CMT header: %s"),buf);
                return(0);
                }
        for (s1=s;*s && *s!='"';s++);
        if (!*s) {
-               error("Only one '\"' found in CMT header: %s",buf);
+               error(_("Only one '\"' found in CMT header: %s"),buf);
                return(0);
                }
        free(receive_number);
@@ -1495,15 +1500,15 @@ int i,val;
        s++;
        if ((err=check_phone(receive_number)) ||
            (err=check_format(",,\"99/99/99,99:99:99+99\"",s))) {
-               error("%s in CMT header: %s",err,buf);
+               error(_("%s in CMT header: %s"),err,buf);
                return(0);
                }
        memset(&tm,0,sizeof(tm)); /* may be redundant */
        for (i=0;i<NELEM(timeparse);i++) {
                val=DIGIT2(s+timeparse[i].strpos);
                if (val<timeparse[i].min || val>timeparse[i].max) {
-                       error("Weird value of %s, is %d but expected %d..%d, setting to %d",
-                               timeparse[i].name,val,timeparse[i].min,timeparse[i].max,timeparse[i].min);
+                       error(_("Weird value of %s, is %d but expected %d..%d, setting to %d"),
+                               _(timeparse[i].name),val,timeparse[i].min,timeparse[i].max,timeparse[i].min);
                        val=timeparse[i].min;
                        }
                *(int *)(((char *)&tm)+timeparse[i].tmpos)=val;
@@ -1513,7 +1518,7 @@ int i,val;
        d7("mktime(y%dm%dd%dh%dm%ds%d)\n",
                tm.tm_year,tm.tm_mon,tm.tm_mday,tm.tm_hour,tm.tm_min,tm.tm_sec);
        if ((receive_time=mktime(&tm))==-1) {
-               error("^mktime(3) failed for %s",s+2);
+               error(_("^mktime(3) failed for %s"),s+2);
                return(0);
                }
        return(1);
@@ -1536,7 +1541,7 @@ FILE *f;
 #endif
        if (pid>0) return; /* parent context */
        if (pid==-1) {
-               error("Can't fork(2), process spawning may block receive");
+               error(_("Can't fork(2), process spawning may block receive"));
                }
        else { /* child process */
                dis_cleanup=1;
@@ -1564,7 +1569,7 @@ FILE *f;
                                break;
                        case 't':
                                if (!(s2=ctime(&receive_time))) {
-                                       error("Failing ctime(3), ignoring substitution");
+                                       error(_("Failing ctime(3), ignoring substitution"));
                                        break;
                                        }
                                if ((s3=strchr(s2,'\n'))) *s3='\0';
@@ -1575,13 +1580,13 @@ FILE *f;
                }
        buf=glueargstack(NULL,NULL); assert(buf);
        if (!(f=popen(buf,"w"))) {
-               error("^Failing spawn of receive command: %s",buf);
+               error(_("^Failing spawn of receive command: %s"),buf);
                goto err;
                }
        if (fputs(bodyline,f)<0 || putc('\n',f)!='\n')
-               error("^Failing write to child receive command: %s",buf);
+               error(_("^Failing write to child receive command: %s"),buf);
        if ((i=pclose(f)))
-               error("^Spawned receive command failure (code %d): %s",i,buf);
+               error(_("^Spawned receive command failure (code %d): %s"),i,buf);
 err:
        free(buf);
        if (pid==-1) return;
@@ -1609,10 +1614,19 @@ speed_t portbaud=0 /* GCC happiness */;
 enum modenum argsmode;
 
        if ((s=strrchr((pname=*argv),'/'))) pname=s+1;
+
+#ifdef ENABLE_NLS
+       /* Initialize the i18n stuff */
+       bindtextdomain(PACKAGE,LOCALEDIR);
+       if (!setlocale(LC_ALL,""))
+               error("Locale not supported by C library");
+       textdomain(PACKAGE);
+#endif
+
 #ifdef HAVE_ATEXIT
        atexit(cleanup);
 #else
-       error("atexit(3) not available at compilation time, device cleanup may be missed");
+       error(_("atexit(3) not available at compilation time, device cleanup may be missed"));
 #endif
        signal(SIGTERM,(RETSIGTYPE (*)(int))cleanup);
        signal(SIGQUIT,(RETSIGTYPE (*)(int))cleanup);
@@ -1630,7 +1644,7 @@ enum modenum argsmode;
                break;
                }
        argsmode=mode;
-       processargs(argc,argv,"<command-line>");
+       processargs(argc,argv,_("<command-line>"));
        if ((s=getenv("HOME"))) {
 size_t l=strlen(s);
 char *buf=malloc(l+50);
@@ -1643,14 +1657,14 @@ char *buf=malloc(l+50);
        readfile(CONFIG_MAIN,1);
        if (verbose>=1) {
                if (argsmode)
-                       error(".Detected mode \"%s\" from my program name \"%s\"",MODE_NAME(argsmode),pname);
+                       error(_(".Detected mode \"%s\" from my program name \"%s\""),MODE_NAME(argsmode),pname);
                else
-                       error(".Automatic mode detection unsuccessul for my progam name \"%s\"",pname);
+                       error(_(".Automatic mode detection unsuccessul for my progam name \"%s\""),pname);
                }
 
        if (!mode)
-               error("!Operation mode unset, use --send or similiar command, see help (-h)");
-       error(".Running program in mode \"%s\"",MODE_NAME(mode));
+               error(_("!Operation mode unset, use --send or similiar command, see help (-h)"));
+       error(_(".Running program in mode \"%s\""),MODE_NAME(mode));
        switch (mode) {
 
                case MODE_SEND:           /* FALLTHRU */
@@ -1666,10 +1680,10 @@ const struct nullcheck *n=nullcheck+i;
 
                if (*n->var) continue;
                if (n->reqd && !(MODE_BIT(mode)&n->reqd)) continue;
-               error("Missing parameter \"%s\"",n->name);
+               error(_("Missing parameter \"%s\""),_(n->name));
                fatal++;
                }
-       if (fatal) error("!Previous error%s considered unrecoverable",(fatal==1?"":"s"));
+       if (fatal) error(_("!Previous %s considered unrecoverable"),(fatal==1?_("error"):_("errors")));
        emptyclean();
        if (!logname) logname=DEF_LOGNAME;
        if (!lockfile) lockfile=DEF_LOCKFILE;
@@ -1680,7 +1694,7 @@ char *serr;
                if (!*numarg[i].sp) continue;
                *numarg[i].ip=strtol(*numarg[i].sp,&serr,0);
                if (*numarg[i].ip<0 || *numarg[i].ip>=LONG_MAX || !serr || *serr)
-                       error("!Number parse error for parameter \"%s\" of \"%s\" at: %s",
+                       error(_("!Number parse error for parameter \"%s\" of \"%s\" at: %s"),
                                numarg[i].msg,*numarg[i].sp,serr);
                }
        if (readtimen==-1)
@@ -1701,16 +1715,16 @@ size_t l=strlen(device);
                s++;
                if (*s=='%') continue;
                if (*s=='s') {
-                       if (i) error("!Only one \"%%s\" permitted in lockfile format-string");
+                       if (i) error(_("!Only one \"%%s\" permitted in lockfile format-string"));
                        i=1; continue;
                        }
-               error("!Invalid format-character '%c' in lockfile format-string, only \"%%s\" allowed",*s);
+               error(_("!Invalid format-character '%c' in lockfile format-string, only \"%%s\" allowed"),*s);
                }
        
        if (*logname) {
                if (!(logf=fopen(logname,"a")))
-                       error("^!Error opening log \"%s\" for append",logname);
-               logmsg("Starting up: " PACKAGE " " VERSION);
+                       error(_("^!Error opening log \"%s\" for append"),logname);
+               logmsg(_("Starting up: %s"),PACKAGE " " VERSION);
                }
 
        switch (mode) {
@@ -1729,7 +1743,7 @@ size_t l=strlen(device);
                default: assert(0);
                }
        if (readbody)
-               error("Warning: -f / --file is forbidden with mode \"%s\"",MODE_NAME(mode));
+               error(_("Warning: -f / --file is forbidden with mode \"%s\""),MODE_NAME(mode));
 
        switch (baudn) {
                case  2400: portbaud= B2400; break;
@@ -1739,25 +1753,25 @@ size_t l=strlen(device);
                case 38400: portbaud=B38400; break;
                case 57600: portbaud=B57600; break;
                default:
-                       error("!Specified baudrate %ld is not supported",baudn);
+                       error(_("!Specified baudrate %ld is not supported"),baudn);
                }
-       if (verbose>=2) error(".Will use baudrate %ld with hexval 0x%X",baudn,portbaud);
+       if (verbose>=2) error(_(".Will use baudrate %ld with hexval 0x%X"),baudn,portbaud);
                
        if (lockfile && *lockfile && VARPRINTF(lockreal,lockfile,devicename)>0) {
 time_t start,end;
-               if (verbose>=1) error(".Locking device \"%s\" by \"%s\"..",device,lockreal);
+               if (verbose>=1) error(_(".Locking device \"%s\" by \"%s\".."),device,lockreal);
                time(&start);
                lockdevice(0);
                time(&end);
                if ((end-=start)>LOCKREPORT)
-                       logmsg("Device lock succeeded after %ld seconds",(long)end);
+                       logmsg(_("Device lock succeeded after %ld seconds"),(long)end);
                }
-       if (verbose>=1) error(".Opening device \"%s\"..",device);
+       if (verbose>=1) error(_(".Opening device \"%s\".."),device);
        if ((devfd=open(device,O_RDWR|O_NDELAY))<0)
-               error("^!Cannot open device \"%s\" for r/w access",device);
+               error(_("^!Cannot open device \"%s\" for r/w access"),device);
        
        if (tcgetattr(devfd,&restios))
-               error("^Unable to get termios settings");
+               error(_("^Unable to get termios settings"));
        else {
                restios.c_cflag=(restios.c_cflag&~(CBAUD|CBAUDEX))|B0|HUPCL;
                restios_yes=1;
@@ -1771,11 +1785,11 @@ time_t start,end;
        tios.c_cc[VMIN ]=1;
            cfsetispeed(&tios,portbaud);
        if (cfsetospeed(&tios,portbaud)|cfsetispeed(&tios,portbaud))
-               error("^Error setting termios baudrate on device");
+               error(_("^Error setting termios baudrate on device"));
        if (tcflush(devfd,TCIOFLUSH))
-               error("^Error flushing termios (TCIOFLUSH) on device");
+               error(_("^Error flushing termios (TCIOFLUSH) on device"));
        if (tcsetattr(devfd,TCSANOW,&tios))
-               error("^!Unable to set initial termios device settings");
+               error(_("^!Unable to set initial termios device settings"));
 
        setalarm();
 
@@ -1820,7 +1834,7 @@ struct hexdata *hd;
                                unlockdevice(0);
                                /* Never bail-out when we got up to this point */
                                if (maxretryn!=-1 && verbose>=1)
-                                       error(".Initialization successful, infinite retry count set");
+                                       error(_(".Initialization successful, infinite retry count set"));
                                maxretryn=-1;
 #if RECEIVE_TEST
                receive_headerparse(" \"+420602123456\",,\"99/10/25,03:21:03-00\"");
@@ -1830,7 +1844,7 @@ struct hexdata *hd;
                                datawait(0);
                                if (!lockdevice(1)) {
                                        if (verbose>=1)
-                                               error(".Dialout detected, waiting for lock..");
+                                               error(_(".Dialout detected, waiting for lock.."));
                                        lockdevice(0);
                                        goto retryall;
                                        }
@@ -1840,7 +1854,7 @@ struct hexdata *hd;
                                        if (!(s=devcmd("\r","@+CMT:"," ")))
                                                goto retryall;
                                        if (!(i=receive_headerparse(s)))
-                                               error("Receive-header parsing failed on: %s",s);
+                                               error(_("Receive-header parsing failed on: %s"),s);
                                        if (!(s=devcmd("\r","@\n"," ")))
                                                goto retryall;
                                        if (i) receive_accept(s);
@@ -1854,9 +1868,9 @@ struct hexdata *hd;
                if (!s) { retrying(); goto retryall; }
 
        while (isspace(*s)) s++;
-       if (verbose>=1) error("\nMessage successfuly sent with MR: %s",s);
+       if (verbose>=1) error(_("\nMessage successfuly sent with MR (Message Reference): %s"),s);
        devcmd(NULL,NULL,"\r\nAT");
 
-       logmsg("SMS sent (after %d retries), message reference: %s",retrycnt,s);
+       logmsg(_("SMS sent (after %d retries), message reference: %s"),retrycnt,s);
        return(EXIT_SUCCESS);
 }
diff --git a/po/POTFILES.in b/po/POTFILES.in
new file mode 100644 (file)
index 0000000..dd3fe9d
--- /dev/null
@@ -0,0 +1,4 @@
+# $Id$
+#
+# List of source files containing translatable strings.
+mdsms.c
diff --git a/po/cs.po b/po/cs.po
new file mode 100644 (file)
index 0000000..af7c200
--- /dev/null
+++ b/po/cs.po
@@ -0,0 +1,950 @@
+# $Id$
+msgid ""
+msgstr ""
+"Project-Id-Version: mdsms 1.5.0\n"
+"POT-Creation-Date: 1999-11-03 13:45+0100\n"
+"PO-Revision-Date: 1999-11-03 13:45+0100\n"
+"Last-Translator: Jan Kratochvil <short@ucw.cz>\n"
+"Language-Team: Czech <cs@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-2\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: mdsms.c:147
+msgid "<ERROR>"
+msgstr "<CHYBA>"
+
+#: mdsms.c:194
+msgid "!Virtual memory exhausted"
+msgstr "!Dostupná pamìt vyèerpána"
+
+#: mdsms.c:206
+#, c-format
+msgid "^Error removing my device lockfile \"%s\""
+msgstr "^Nemohu odstranit zámek zaøízení pojmenovaný \"%s\""
+
+#: mdsms.c:223
+msgid "^Error restoring termios for device"
+msgstr "^Nemohu obnovit nastavení terminálu (termios) zaøízení"
+
+#: mdsms.c:233
+msgid ""
+"\n"
+"%s\n"
+"Usage: %s [-c|--config <cfgfile>] [-d|--device <device>]\n"
+"             {--send | --send-mobildock | --receive | --logo-send}\n"
+"             [-L|--log <file>] [-b|--baud <rate>]\n"
+"             [-l|--lockfile <lock>] [-s|--smsc <smsc #>] [-m|--maxretry "
+"<#>]\n"
+"             [-r|--readtime <sec>] [-t|--chartime <msec>] [-T|--cmdtime "
+"<msec>]\n"
+"             [-v|--verbose] [-h|--help] [-V|--version]\n"
+"  --send / --send-mobildock:\n"
+"             [-f|--file] <dest. phone> <msg text|msg filename>\n"
+"  --receive:\n"
+"             <command name>\n"
+"  --logo-send:\n"
+"             <dest. phone> <logo filename> [<GSMnet id>]\n"
+"  --ring-send:\n"
+"             <dest. phone> <ring filename>\n"
+"\n"
+" -c, --config\tRead this additional config file\n"
+"\t\t(def. \"%s\" and \"$HOME%s\")\n"
+" -d, --device\tMobile on this serial device (def. \"%s\")\n"
+" -L, --log\tLog all important messages to this file (def. \"%s\")\n"
+" -b, --baud\tSet baudrate, 2400-57600 supported (def. %d)\n"
+" -l, --lockfile\tLock serial port by this file, \"%%s\" is basename of "
+"device\n"
+"\t\t(def. \"%s\")\n"
+" -s, --smsc\tUse this SMS Center number (def. query from mobile)\n"
+" -m, --maxretry\tMaximum retries of any command before giving up (def. %d)\n"
+" -r, --readtime\tSeconds for maximum wait time for response\n"
+"\t\t(def. %ds standard, %ds for MobilDock modes,\n"
+"\t\t multiplied %dx for long cmds)\n"
+" -t, --chartime\tMilliseconds between each char (def. %dms)\n"
+" -T, --cmdtime\tMilliseconds before each whole AT command (def. %dms)\n"
+" -v, --verbose\tIncrease verbosity level, more \"-v\"s give more messages\n"
+" -h, --help\tPrint a summary of the options\n"
+" -V, --version\tPrint the version number\n"
+"\n"
+"--send / --send-mobildock:\n"
+" -f, --file\tRead contents of message from file instead\n"
+"--receive:\n"
+" <command name>\tProgram to run on receive, message will be on stdin\n"
+"\t\tFollowing substitutes are recognized:\n"
+"\t\t%%p - source phone number\n"
+"\t\t%%T - timestamp from SMSC as number of seconds from 1970\n"
+"\t\t%%t - ctime(3) style timestamp (e.g. \"Wed Jun 30 21:49:08 1993\")\n"
+"--logo-send:\n"
+" <GSMnet id>\t* Oper. logo: Enter custom network code MccMnc, e.g. 23002\n"
+"\t\t* Oper. logo: Specify \"%s\" to read network code from NOL file\n"
+"\t\t* Group gfx : Specify \"%s\" to send logo as group graphics\n"
+"\n"
+"You may need to use the following line to catch all of this help text:\n"
+"./mdsms 2>&1|more\n"
+"\n"
+msgstr ""
+"\n"
+"%s\n"
+"U¾ití: %s [-c|--config <konf. soubor>] [-d|--device <zaøízení>]\n"
+"             {--send | --send-mobildock | --receive | --logo-send}\n"
+"             [-L|--log <log. soubor>] [-b|--baud <rychlost>]\n"
+"             [-l|--lockfile <zámek>] [-s|--smsc <è. smsc>] [-m|--maxretry "
+"<#>]\n"
+"             [-r|--readtime <sek>] [-t|--chartime <msek>] [-T|--cmdtime "
+"<msek>]\n"
+"             [-v|--verbose] [-h|--help] [-V|--version]\n"
+"  --send / --send-mobildock: (poslat / poslat pøes MobilDock)\n"
+"             [-f|--file] <cílový telefon> <text zprávy|soubor zprávy>\n"
+"  --receive: (pøijímat)\n"
+"             <pøíkaz s parametry>\n"
+"  --logo-send: (odeslat Nokia logo)\n"
+"             <cílový telefon> <soubor s logem> [<èíslo GSM sítì>]\n"
+"  --ring-send: (odeslat Nokia zvonìní)\n"
+"             <cílový telefon> <soubor se zvonìním>\n"
+"\n"
+" -c, --config\tPøeèti také argumenty z tohoto konfiguraèního souboru\n"
+"\t\t(standardnì \"%s\" a \"$HOME%s\")\n"
+" -d, --device\tMobil je pøipojen na tomto zaøízení (std. \"%s\")\n"
+" -L, --log\tLogovací soubor pro dùle¾ité zprávy (std. \"%s\")\n"
+" -b, --baud\tNastavení baudové rychlosti, podporováno 2400-57600 (std. %d)\n"
+" -l, --lockfile\tSoubor pro uzamknutí zaøízení, \"%%s\" je basename "
+"zaøízení\n"
+"\t\t(std. \"%s\")\n"
+" -s, --smsc\tPou¾ij toto èíslo SMS centra (std. zjistit z mobilu)\n"
+" -m, --maxretry\tMaximální poèet opakování pøíkazu (std. %d)\n"
+" -r, --readtime\tMaximální doba èekání na odpovìd, v sekundách\n"
+"\t\t(std. %ds normálnì, %ds pro re¾im(y) pro MobilDock,\n"
+"\t\t vynásobeno %dx pro dlouhotrvající pøíkazy)\n"
+" -t, --chartime\tPoèet milisekund mezi ka¾dým znakem (std. %dms)\n"
+" -T, --cmdtime\ttPoèet milisekund pøed AT pøíkazem (std. %dms)\n"
+" -v, --verbose\tZvý¹ení úrovnì informativních výpisù, více \"-v\" pro více "
+"zpráv\n"
+" -h, --help\tTento seznam mo¾ných argumentù\n"
+" -V, --version\tVytisknout èíslo verze\n"
+"\n"
+"--send / --send-mobildock: (poslat / poslat pøes MobilDock)\n"
+" -f, --file\tText zprávy se má èíst ze souboru se zadaným jménem\n"
+"--receive: (pøijímat)\n"
+" <pøíkaz s parametry>\tProgram pro spu¹tìní, zpráva bude na standardním "
+"vstupu\n"
+"\t\tNaslédující substituce jsou na pøíkazu provedeny:\n"
+"\t\t%%p - telefonní èíslo odesilatele zprávy\n"
+"\t\t%%T - èas odeslání (ze SMSC) jako poèet sekund od roku 1970\n"
+"\t\t%%t - èas odeslání ve stylu ctime(3) (napø. \"Wed Jun 30 21:49:08 "
+"1993\")\n"
+"--logo-send: odeslat Nokia logo\n"
+" <èíslo GSM sítì>\t* Logo oper.: Zadejte èíslo sítì ve tvaru MccMnc, napø. "
+"23002\n"
+"\t\t* Logo oper.: Zadejte \"%s\" pro naètení èísla sítì z NOL souboru\n"
+"\t\t* Logo skupiny: Zadejte \"%s\" pro poslání souboru èehokoliv jako loga "
+"skupiny\n"
+"\n"
+"Mo¾ná bude tøeba pou¾ít následující pøíkaz, abyste zachytili nápovìdu "
+"celou:\n"
+"./mdsms 2>&1|more\n"
+"\n"
+
+#: mdsms.c:327
+#, c-format
+msgid "^Error closing \"%s\""
+msgstr "^Chyba pøi uzavírání \"%s\""
+
+#: mdsms.c:335
+#, c-format
+msgid "^Error seeking to end of \"%s\""
+msgstr "^Nemohu nastavit ukazatel (seek) na konec \"%s\""
+
+#: mdsms.c:337
+#, c-format
+msgid "^Error measuring length of \"%s\""
+msgstr "^Nemohu zjistit délku \"%s\""
+
+#: mdsms.c:353
+#, c-format
+msgid "Too many config files to read, max is %d, break-out"
+msgstr ""
+"Pøíli¹ konfiguraèních souborù pro naèítání, maximum je %d, konèím s jejich "
+"ètením"
+
+#: mdsms.c:357
+#, c-format
+msgid "^Can't open config file \"%s\" for r/o"
+msgstr "^Nemohu otevøít konfiguraèní soubor \"%s\" pro ètení"
+
+#: mdsms.c:361
+#, c-format
+msgid ".Reading config file \"%s\""
+msgstr ".Naèítám konfiguraèní soubor \"%s\""
+
+#: mdsms.c:364
+#, c-format
+msgid "File \"%s\" is too long, read only %d bytes"
+msgstr "Soubor \"%s\" je pøíli¹ dlouhy, naèetl jsem pouze %d bajtù"
+
+#: mdsms.c:368
+#, c-format
+msgid "File \"%s\" read error, got only %u bytes of %ld"
+msgstr ""
+"Chyba pøi ètení \"%s\", naèetl jsem pouze %u bajtù z celkem %ld po¾adovaných"
+
+#: mdsms.c:379
+#, c-format
+msgid ""
+"\n"
+"Config \"%s\": arg#%d: %s"
+msgstr ""
+"\n"
+"Konf. soubor \"%s\": argument #%d: %s"
+
+#: mdsms.c:385
+#, c-format
+msgid "Too many arguments in \"%s\", from offset %d ignored"
+msgstr "Pøíli¹ argumentù v \"%s\", od pozice %d ignorovány"
+
+#: mdsms.c:535
+#, c-format
+msgid "Looping (%d) during attempt to read config file \"%s\", break-out"
+msgstr ""
+"Pokus o zacyklení (%d) pøi ètení konfiguraèního souboru \"%s\", konèím "
+"naèítání"
+
+#: mdsms.c:574
+#, c-format
+msgid ""
+"\n"
+"Last getopt(3) error occured during parsing option %d from \"%s\"! Follows "
+"help:"
+msgstr ""
+"\n"
+"Poslední zobrazená chyba getopt(3)-u nastala pøi zpracování argumentu %d ze "
+"\"%s\"! Následuje nápovìda:"
+
+#: mdsms.c:595
+msgid "destination phone number"
+msgstr "cílový telefon"
+
+#: mdsms.c:596
+msgid "logo filename"
+msgstr "soubor s logem"
+
+#: mdsms.c:597
+msgid "ring filename"
+msgstr "soubor se zvonìním"
+
+#: mdsms.c:598
+msgid "body text"
+msgstr "text zprávy"
+
+#: mdsms.c:600
+msgid "GSM operator network code"
+msgstr "kód GSM sítì operátora"
+
+#: mdsms.c:601
+msgid "device for communication"
+msgstr "zaøízení pro komunikaci"
+
+#: mdsms.c:621
+#, c-format
+msgid ""
+"\n"
+"Excessive option %d from \"%s\" ignored: %s"
+msgstr ""
+"\n"
+"Pøebyteèný argument %d ze \"%s\" zignorován: %s"
+
+#: mdsms.c:635
+#, c-format
+msgid "Invalid digit '%c' in phone number - at offset %d"
+msgstr "Chybný znak '%c' v telefonním èísle na pozici %d"
+
+#: mdsms.c:640
+#, c-format
+msgid "Phone number too long (%d), max. %d digits allowed"
+msgstr "Telefonní èíslo je pøíli¹ dlouhé (%d), povoleno max. %d èíslic"
+
+#: mdsms.c:651
+#, c-format
+msgid "!%s in option %d from \"%s\": %s"
+msgstr "!%s v argumentu %d ze \"%s\": %s"
+
+#: mdsms.c:666
+msgid "Unknown formatsymbol '%c' (use \"%%%%%c\" to fix it) at pos %d in: %s"
+msgstr ""
+"Neznámý formátovací znak '%c' (pou¾ijte \"%%%%%c\" pro opravu) na pozici %d "
+"ve: %s"
+
+#: mdsms.c:693
+#, c-format
+msgid ""
+"\n"
+"Invalid characted '%c' in GSMnet at offs %d: %s"
+msgstr ""
+"\n"
+"Chybný znak '%c' v kódu GSM sítì na pozici %d: %s"
+
+#: mdsms.c:699
+#, c-format
+msgid ""
+"\n"
+"GSMnet is required to have exactly 5 digits or to be\n"
+"either \"%s\" or \"%s\", but found length %d: %s"
+msgstr ""
+"\n"
+"Kód GSM sítì musí mít pøesnì 5 cifer nebo musí být buï\n"
+"\"%s\" èi \"%s\", ale jeho `nalezená délka je %d: %s"
+
+#: mdsms.c:706
+#, c-format
+msgid ""
+"\n"
+"GSMnet option %d from \"%s\" rejected due to previous errors: %s"
+msgstr ""
+"\n"
+"Kód GSM sítì, argument %d ze \"%s\" zahozen pro pøedchozí chyby: %s"
+
+#: mdsms.c:724
+#, c-format
+msgid "Error closing lockfile \"%s\""
+msgstr "^Nemohu uzavøít uzamykací soubor \"%s\""
+
+#: mdsms.c:743
+#, c-format
+msgid ".Checking the lockfile \"%s\".."
+msgstr ".Kontroluji uzamykací soubor \"%s\".."
+
+#: mdsms.c:748
+#, c-format
+msgid ".Lockfile \"%s\" is still not valid, removing it"
+msgstr ".Uzamykací soubor \"%s\" je¹tì stále není korektní, odstraòuji jej"
+
+#: mdsms.c:760
+#, c-format
+msgid "^Error during checking consciousness of PID %d"
+msgstr "^Chyba pøi kontrole ¾ivotaschopnosti procesu s PID %d"
+
+#: mdsms.c:765
+#, c-format
+msgid ".Lockfile \"%s\" is stale (PID %d), removing it"
+msgstr ".Uzamykací soubor \"%s\" je ji¾ neplatný (PID %d), odstraòuji jej"
+
+#: mdsms.c:769
+#, c-format
+msgid "^Error removing foreign lockfile \"%s\""
+msgstr "^Nemohu odstranit cizí uzamykací soubor \"%s\""
+
+#: mdsms.c:775
+#, c-format
+msgid "^!Error creating lockfile \"%s\""
+msgstr "^Nemohu vytvoøit uzamykací soubor \"%s\""
+
+#: mdsms.c:780
+#, c-format
+msgid "^!Error writing data to lockfile \"%s\""
+msgstr "^Nemohu zapisovat do uzamykacího souboru \"%s\""
+
+#: mdsms.c:800
+msgid "Timed out"
+msgstr "Maximální doba vypr¹ela"
+
+#: mdsms.c:808
+#, c-format
+msgid "^!fcntl() on device for %s mode"
+msgstr "^!Volání fcntl() na zaøizení pro získáni %s re¾imu"
+
+#: mdsms.c:808
+msgid "blocking"
+msgstr "blokujícího"
+
+#: mdsms.c:808
+msgid "non-blocking"
+msgstr "neblokujícího"
+
+#: mdsms.c:840
+#, c-format
+msgid "!Maximum command retry count (%ld) exceeded"
+msgstr "!Maximální poèet opakování pøíkazu (%ld) pøekroèen"
+
+#: mdsms.c:841
+#, c-format
+msgid ".Retrying phase, %d out of %ld.."
+msgstr ".Fáze opakování, poøadí %d z celkem %ld.."
+
+#: mdsms.c:854
+msgid "<unset>"
+msgstr "<nenastaveno>"
+
+#: mdsms.c:918
+#, c-format
+msgid "!Command too big (%d>%d)"
+msgstr "!Pøíkaz je pøíli¹ velký (%d>%d)"
+
+#: mdsms.c:919
+#, c-format
+msgid ".devcmd(send=%s,term=%s,catch=%s,timeout=%ld)"
+msgstr ".devcmd(poslat=%s,skonèit=%s,zachytit=%s,max. doba=%ld)"
+
+#: mdsms.c:926
+msgid "^Error flushing I/O queue of device"
+msgstr "^Nemohu vyprázdnit I/O frontu zaøízení"
+
+#: mdsms.c:930
+#, c-format
+msgid "^Error forcing output of char at pos %d of cmd %s"
+msgstr "^Nemohu zajistit výstup znaku na pozici %d pøíkazu %s"
+
+#: mdsms.c:934
+#, c-format
+msgid "^Wrote only %d of %d bytes of command"
+msgstr "^Zapsáno pouze %d z celkem %d bajtù pøíkazu"
+
+#: mdsms.c:968
+#, c-format
+msgid "Maximum response timeout (%lds) exceeded"
+msgstr "Maximální doba odezvy (%lds) pøekroèena"
+
+#: mdsms.c:969
+#, c-format
+msgid "^Couldn't read device data (ret=%d)"
+msgstr "^Nemohu èíst data zaøízení (návratový kód=%d)"
+
+#: mdsms.c:978
+#, c-format
+msgid ""
+"\n"
+"Got chunk of data from device: %s"
+msgstr ""
+"\n"
+"Data ze zaøízení: %s"
+
+#: mdsms.c:990
+#, c-format
+msgid "Found ERROR response on command %s"
+msgstr "Nalezl jsem ERROR v odpovìdi na pøíkaz %s"
+
+#: mdsms.c:1008
+#, c-format
+msgid "Data requested on command %s but no found after term %s"
+msgstr ""
+"U pøíkazu %s bylo po¾adováno vrácení dat, ale ¾ádná nebyla pøed naètením "
+"ukonèovaèe %s nalezena"
+
+#: mdsms.c:1014
+#, c-format
+msgid ".Returning data %s for cmd %s"
+msgstr ".Vracím data %s pro pøíkaz %s"
+
+#: mdsms.c:1028
+#, c-format
+msgid "!Error during conversion of number at: %s"
+msgstr "!Chyba pøi konverzi èísla od pozice: %s"
+
+#: mdsms.c:1068
+msgid "!No SMSC set in mobile station found, please use option \"-s\""
+msgstr ""
+"!V mobilním zaøízení nebylo nalezeno èíslo SMSC, prosím pou¾ijte argument "
+"\"-s\""
+
+#: mdsms.c:1069
+#, c-format
+msgid ""
+"\n"
+"Found default SMSC in mobile: %s"
+msgstr ""
+"\n"
+"Nalezl jsem SMSC v mobilu: %s"
+
+#: mdsms.c:1070
+#, c-format
+msgid "!No left-quote found in: %s"
+msgstr "!Chybí levé uvozovky: %s"
+
+#: mdsms.c:1071
+#, c-format
+msgid "!No right-quote found in: %s"
+msgstr "!Chybí pravé uvozovky: %s"
+
+#: mdsms.c:1073
+msgid "!No SMS set in mobile station found, please use option \"-s\""
+msgstr ""
+"!V mobilním zaøízení nebylo nalezeno èíslo SMSC, prosím pou¾ijte argument "
+"\"-s\""
+
+#: mdsms.c:1076
+#, c-format
+msgid "!No comma found after quotes in: %s"
+msgstr "!Nenalezl jsem po uvozovkách èárku ve: %s"
+
+#: mdsms.c:1080
+#, c-format
+msgid "!Type parse error in: %s"
+msgstr "!Chyba pøi dekódování typu ve: %s`"
+
+#: mdsms.c:1084
+#, c-format
+msgid ""
+"\n"
+"Decoded SMSC address: %s"
+msgstr ""
+"\n"
+"Zji¹tìné èíslo SMSC: %s"
+
+#: mdsms.c:1102
+#, c-format
+msgid ""
+"Can't convert character '%c' (0x%02X) at offs %d (0-based), substituted '?'"
+msgstr ""
+"Nemohu zkonvertovat znak '%c' (0x%02X) na pozici %d (od 0-ly), substituji '?'"
+
+#: mdsms.c:1129
+#, c-format
+msgid ""
+"\n"
+"Will send hexdata: %s"
+msgstr ""
+"\n"
+"Pøipravil jsem hexdata: %s"
+
+#: mdsms.c:1151
+#, c-format
+msgid "^!Cannot open logo file \"%s\" for r/o"
+msgstr "^!Nemohu otevøít soubor s logem \"%s\" pro ètení"
+
+#: mdsms.c:1158
+#, c-format
+msgid ".Reading NOL file \"%s\", GSMnet \"%s\", word@4=%d.."
+msgstr ".Naèítám NOL soubor \"%s\", èíslo GSM sítì \"%s\", hodnota@4=%d.."
+
+#: mdsms.c:1163
+#, c-format
+msgid ".Reading NGG file \"%s\", word@4=%d.."
+msgstr ".Naèítám NGG soubor \"%s\", hodnota@4=%d.."
+
+#: mdsms.c:1166
+#, c-format
+msgid "!Unknown file format of logo file \"%s\""
+msgstr "!Neznámý formát souboru s logem \"%s\""
+
+#: mdsms.c:1168
+msgid ""
+"!NOL network code detection requested but NOL file not loaded, please "
+"specify network code"
+msgstr ""
+"!Byla po¾adována detekce èíslá GSM sítì z NOL, ale NOL soubor není k "
+"dispozici, specifikujte prosím èíslo GSM sítì"
+
+#: mdsms.c:1172
+msgid ""
+"\n"
+"Sending logo as: group graphics"
+msgstr ""
+"\n"
+"Posílám logo jako: symbol skupiny"
+
+#: mdsms.c:1176
+#, c-format
+msgid ""
+"\n"
+"Sending logo as: operator logo for \"%s\""
+msgstr ""
+"\n"
+"Posílám logo jako: logo operátora \"%s\""
+
+#: mdsms.c:1181
+#, c-format
+msgid ".Magic words: @+4=%d, @+6=%d, @+8=%d"
+msgstr ".Magické hodnoty: @+4=%d, @+6=%d, @+8=%d"
+
+#: mdsms.c:1185
+#, c-format
+msgid "!Invalid size: %dx%d"
+msgstr "!Nesprávná velikost: %dx%d"
+
+#: mdsms.c:1187
+#, c-format
+msgid "!Logo file \"%s\" too short - actual=%d, need(%dx%d)=%d"
+msgstr "!Soubor loga \"%s\" je pøíli¹ krátký - velikost=%d, potøebná(%dx%d)=%d"
+
+#: mdsms.c:1190
+#, c-format
+msgid "Ignoring trailing garbage in \"%s\", used only %d bytes"
+msgstr "Ignoruji pøebyteèná data v \"%s\", pou¾il jsem pouze %d bajtù"
+
+#: mdsms.c:1192
+#, c-format
+msgid "!SMS size would be %d bytes but 140 is maximum"
+msgstr "!Velikost SMS zprávy by byla %d bajtù, ale 140 je maximum"
+
+#: mdsms.c:1206
+#, c-format
+msgid ""
+"!Invalid character (neither '0' nor '1') in logo file \"%s\" at offset 0x%X"
+msgstr ""
+"!Nekorektní znak (ani '0', ani '1') v souboru s logem \"%s\" na pozici 0x%X"
+
+#: mdsms.c:1247
+#, c-format
+msgid "^!Cannot open ring file \"%s\" for r/o"
+msgstr "^!Nemohu otevøít soubor se zvonìním \"%s\" pro ètení"
+
+#: mdsms.c:1249
+msgid "!File size determination is essential to continue operation"
+msgstr "!Zji¹tìní velikosti souboru je nutné pro pokraèování"
+
+#: mdsms.c:1251
+#, c-format
+msgid "!File \"%s\" size %ld too small (must >=0x103)! Is it .000 file?"
+msgstr ""
+"!Velikost souboru \"%s\" %ld je pøíli¹ malá (musí být >=0x103)! Je to vùbec "
+".000 soubor?"
+
+#: mdsms.c:1254
+#, c-format
+msgid "^Seeking error on \"%s\", ignoring"
+msgstr "^Chyba pøi nastavování ukazatele (seek) ve \"%s\", ignoruji"
+
+#: mdsms.c:1258
+#, c-format
+msgid "^Read error on \"%s\", wanted %ld, got %d"
+msgstr "^Chyba pøi ètení \"%s\", vy¾aduji %ld, získal jsem %d"
+
+#: mdsms.c:1259
+#, c-format
+msgid ""
+"\n"
+"Sending ring tone \"%s\" as single SMS (size %ld, max %d)"
+msgstr ""
+"\n"
+"Posílám zvonìní \"%s\" jako jedinou SMS zprávu (velikost %ld, maximum je %d)"
+
+#: mdsms.c:1266
+#, c-format
+msgid "!File size %ld too large even for multi-SMS ring upload (max=%d)"
+msgstr ""
+"!Velikost souboru %ld je pøíli¹ velká i pro víceèás»ové SMS (maximum=%d)"
+
+#: mdsms.c:1270
+#, c-format
+msgid ""
+"\n"
+"Sending ring tone \"%s\" as %d multi-SMSes (size %ld, max %d, frag %d)"
+msgstr ""
+"\n"
+"Posílám zvonìní \"%s\" jako %d zpráv(y) (velikost %ld, maximum je %d, "
+"fragment %d)"
+
+#: mdsms.c:1274
+#, c-format
+msgid ""
+"\n"
+"Using unique multi-SMS ID 0x%02X"
+msgstr ""
+"\n"
+"Pou¾ívám unikátní èíslo víceèás»ové SMS 0x%02X"
+
+#: mdsms.c:1279
+#, c-format
+msgid "^Read error on \"%s\", wanted %d, got %d"
+msgstr "^Chyba pøi ètení \"%s\", vy¾aduji %d, získal jsem %d"
+
+#: mdsms.c:1305
+#, c-format
+msgid "Body too large (%d>%d), cut"
+msgstr "Velikost SMS textu pøíli¹ velká (%d>%d), zkrátil jsem jej"
+
+#: mdsms.c:1352
+msgid ""
+"\n"
+"Please enter the SMS text body, end with EOF (ctrl-D):"
+msgstr ""
+"\n"
+"Prosím zadejte text SMS zprávy, ukonèení pøes EOF (ctrl-D):"
+
+#: mdsms.c:1356
+#, c-format
+msgid "^!Can't open data file \"%s\" for r/o"
+msgstr "^!Nemohu otevøít datový soubor \"%s\" pro ètení"
+
+#: mdsms.c:1361
+#, c-format
+msgid "^!Error reading stream \"%s\""
+msgstr "^!Nemohu èíst soubor \"%s\""
+
+#: mdsms.c:1361
+msgid "<stdin>"
+msgstr "<stdin/standardní vstup>"
+
+#: mdsms.c:1389
+#, c-format
+msgid "!Device file descriptor %d can't fit in select() FD_SETSIZE (%d)"
+msgstr "!Deskriptor zaøízení %d se nevejde do FD_SETSIZE (%d) funkce select()"
+
+#: mdsms.c:1398
+#, c-format
+msgid "^Failed (retval %d) while waiting for data, ignoring"
+msgstr "^Selhání (retval %d) pøí èekání na data, ignoruji"
+
+#: mdsms.c:1405
+msgid "^Error while waiting for data, ignoring"
+msgstr "^Chyba pøi èekání na data, ignoruji"
+
+#: mdsms.c:1413
+msgid "^No data input after waited for data, retrying"
+msgstr "^Po èekání na data jsem ¾ádná nezískal, zkou¹ím znovu"
+
+#: mdsms.c:1432
+msgid "digit"
+msgstr "èíslici"
+
+#: mdsms.c:1436
+msgid "+/- sign"
+msgstr "znaménko + èi -"
+
+#: mdsms.c:1443
+#, c-format
+msgid "Expected %s, found '%c' at pos %d of string [%s], formatstring [%s]"
+msgstr ""
+"Oèekávám %s, nalezl jsem '%c' na pozici %d øetìzce [%s], formátovací øetìzec "
+"je [%s]"
+
+#: mdsms.c:1448
+#, c-format
+msgid "String too short for format, string [%s], formatstring [%s]"
+msgstr ""
+"Øetìzec je pro daný formát pøíli¹ krátký, øetìzec [%s], formátovací øetìzec "
+"je [%s]"
+
+#: mdsms.c:1453
+#, c-format
+msgid "Trailing garbage in string [%s], formatstring [%s]"
+msgstr "Koncová pøebyteèná data v øetìzci [%s], formátovací øetìzec je [%s]"
+
+#: mdsms.c:1475
+msgid "year"
+msgstr "roku"
+
+#: mdsms.c:1476
+msgid "month"
+msgstr "mìsíce"
+
+#: mdsms.c:1477
+msgid "day of month"
+msgstr "dne v mìsíci"
+
+#: mdsms.c:1478
+msgid "hour"
+msgstr "hodiny"
+
+#: mdsms.c:1479
+msgid "minute"
+msgstr "minuty"
+
+#: mdsms.c:1480
+msgid "second"
+msgstr "sekundy"
+
+#: mdsms.c:1489
+#, c-format
+msgid "Cannot find initial '\"' in CMT header: %s"
+msgstr "Nemohu nalézt poèáteèní '\"' v CMT hlavièce: %s"
+
+#: mdsms.c:1494
+#, c-format
+msgid "Only one '\"' found in CMT header: %s"
+msgstr "Nalezl jsem pouze jednu '\"' v CMT hlavièce: %s"
+
+#: mdsms.c:1503
+#, c-format
+msgid "%s in CMT header: %s"
+msgstr "%s v CMT hlavièce: %s"
+
+#: mdsms.c:1510
+#, c-format
+msgid "Weird value of %s, is %d but expected %d..%d, setting to %d"
+msgstr "Divná hodnota %s, je %d, ale oèekávám %d..%d, nastavuji na %d"
+
+#: mdsms.c:1521
+#, c-format
+msgid "^mktime(3) failed for %s"
+msgstr "^mktime(3) selhal pro %s"
+
+#: mdsms.c:1544
+msgid "Can't fork(2), process spawning may block receive"
+msgstr "Nemohu provést fork(2), spou¹tìní procesu mù¾e zablokovat ètení zpráv"
+
+#: mdsms.c:1572
+msgid "Failing ctime(3), ignoring substitution"
+msgstr "ctime(3) sehlal, ignoruji substituci"
+
+#: mdsms.c:1583
+#, c-format
+msgid "^Failing spawn of receive command: %s"
+msgstr "^Selhalo spu¹tìní pøíjímacího pøíkazu: %s"
+
+#: mdsms.c:1587
+#, c-format
+msgid "^Failing write to child receive command: %s"
+msgstr "^Selhal zápis na vstup pøijímacího pøíkazu: %s"
+
+#: mdsms.c:1589
+#, c-format
+msgid "^Spawned receive command failure (code %d): %s"
+msgstr "^Selhání pøijímacího pøíkazu (kód %d): %s"
+
+#: mdsms.c:1629
+msgid ""
+"atexit(3) not available at compilation time, device cleanup may be missed"
+msgstr ""
+"atexit(3) nebyla pøi kompilaci k dispozici, úklid stavu zaøízení nemusí být "
+"vykonán"
+
+#: mdsms.c:1647
+msgid "<command-line>"
+msgstr "<pøíkazová øádka>"
+
+#: mdsms.c:1660
+#, c-format
+msgid ".Detected mode \"%s\" from my program name \"%s\""
+msgstr ".Zdetekován re¾im \"%s\" z mého jména programu \"%\""
+
+#: mdsms.c:1662
+#, c-format
+msgid ".Automatic mode detection unsuccessul for my progam name \"%s\""
+msgstr ""
+".Automatická detekce re¾imu byla pro mé jméno programu \"%s\" neúspì¹ná"
+
+#: mdsms.c:1666
+msgid "!Operation mode unset, use --send or similiar command, see help (-h)"
+msgstr ""
+"!Re¾im operace není nastaven, pou¾ijte --send èi jiný podobný argument, více "
+"viz nápovìda (-h)"
+
+#: mdsms.c:1667
+#, c-format
+msgid ".Running program in mode \"%s\""
+msgstr ".Program byl spu¹tìn v re¾imu \"%s\""
+
+#: mdsms.c:1683
+#, c-format
+msgid "Missing parameter \"%s\""
+msgstr "Chybí argument \"%s\""
+
+#: mdsms.c:1686
+#, c-format
+msgid "!Previous %s considered unrecoverable"
+msgstr "!Pøedchozí %s pova¾uji za fatální"
+
+#: mdsms.c:1686
+msgid "error"
+msgstr "chybu"
+
+#: mdsms.c:1686
+msgid "errors"
+msgstr "chyby"
+
+#: mdsms.c:1697
+#, c-format
+msgid "!Number parse error for parameter \"%s\" of \"%s\" at: %s"
+msgstr ""
+"!Chyba pøi dekódování èísla pro argument \"%s\" ze \"%s\" na pozici: %s"
+
+#: mdsms.c:1718
+msgid "!Only one \"%%s\" permitted in lockfile format-string"
+msgstr ""
+"!Ve formátovacím øetìzci uzamykacího soubor je \"%%s\" povoleno jen jedno"
+
+#: mdsms.c:1721
+msgid ""
+"!Invalid format-character '%c' in lockfile format-string, only \"%%s\" "
+"allowed"
+msgstr ""
+"!Neznámý formátovací znak '%c' ve formátovacím øetìzci uzamykacího souboru, "
+"pouze \"%%s\" je povoleno"
+
+#: mdsms.c:1726
+#, c-format
+msgid "^!Error opening log \"%s\" for append"
+msgstr "^!Chyba pøi otevírání logovacího souboru \"%s\" pro pøidávání (append)"
+
+#: mdsms.c:1727
+#, c-format
+msgid "Starting up: %s"
+msgstr "Program spu¹tìn: %s"
+
+#: mdsms.c:1746
+#, c-format
+msgid "Warning: -f / --file is forbidden with mode \"%s\""
+msgstr "Varování: -f / --file jsou povoleny jen v re¾imu \"%s\""
+
+#: mdsms.c:1756
+#, c-format
+msgid "!Specified baudrate %ld is not supported"
+msgstr "!Specifikovaná baudová rychlost %ld není podporována"
+
+#: mdsms.c:1758
+#, c-format
+msgid ".Will use baudrate %ld with hexval 0x%X"
+msgstr ".Pou¾iji baudovou rychlost %ld, hex hodnota 0x%X"
+
+#: mdsms.c:1762
+#, c-format
+msgid ".Locking device \"%s\" by \"%s\".."
+msgstr ".Uzamykám zaøízení \"%s\" souborem \"%s\".."
+
+#: mdsms.c:1767
+#, c-format
+msgid "Device lock succeeded after %ld seconds"
+msgstr "Uzamknutí zaøízení uspìlo po %ld sekundách"
+
+#: mdsms.c:1769
+#, c-format
+msgid ".Opening device \"%s\".."
+msgstr ".Otevírám zaøízení \"%s\".."
+
+#: mdsms.c:1771
+#, c-format
+msgid "^!Cannot open device \"%s\" for r/w access"
+msgstr "^!Nemohu otevøít zaøízení \"%s\" pro ètení i zápis"
+
+#: mdsms.c:1774
+msgid "^Unable to get termios settings"
+msgstr "^Nemohu získat terminálová nastavení (termios)"
+
+#: mdsms.c:1788
+msgid "^Error setting termios baudrate on device"
+msgstr "^Nemohu nastavit vlastnosti terminálu (termios) zaøízení"
+
+#: mdsms.c:1790
+msgid "^Error flushing termios (TCIOFLUSH) on device"
+msgstr "^Nemohu vyprázdnit vstupnì-výstupní fronty (TCIOFLUSH) zaøízení"
+
+#: mdsms.c:1792
+msgid "^!Unable to set initial termios device settings"
+msgstr "^!Nemohu nastavit poèáteèní vlastnosti terminálu (termios)"
+
+#: mdsms.c:1837
+msgid ".Initialization successful, infinite retry count set"
+msgstr ".Inicializace úspì¹ná, nastavil jsem nekoneèné opakování"
+
+#: mdsms.c:1847
+msgid ".Dialout detected, waiting for lock.."
+msgstr ".Detekováno odchozí voláni, èekám na uzamknutí.."
+
+#: mdsms.c:1857
+#, c-format
+msgid "Receive-header parsing failed on: %s"
+msgstr "Selhalo dekódování pøijímací hlavièky na: %s"
+
+#: mdsms.c:1871
+#, c-format
+msgid ""
+"\n"
+"Message successfuly sent with MR (Message Reference): %s"
+msgstr ""
+"\n"
+"Zpráva úspì¹nì odeslána s MR (referenèní èíslo zprávy): %s"
+
+#: mdsms.c:1874
+#, c-format
+msgid "SMS sent (after %d retries), message reference: %s"
+msgstr "SMS odeslána (po %d opakováních), referenèní èíslo zprávy: %s"