]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
textual: gettextize several overlooked messages
authorBenno Schulenberg <bensberg@justemail.net>
Mon, 6 Feb 2012 15:11:27 +0000 (16:11 +0100)
committerKarel Zak <kzak@redhat.com>
Fri, 25 Jan 2013 10:47:29 +0000 (11:47 +0100)
Also improve the clarity of some of them.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
disk-utils/mkswap.c
misc-utils/rename.c
schedutils/chrt.c
schedutils/ionice.c
schedutils/taskset.c
sys-utils/hwclock.c
term-utils/agetty.c

index 415a9859ba822ce3c34181d2690e3e977693fe98..4f59a63c7256a6de2ccda8b945d10eef234a06ba 100644 (file)
@@ -434,7 +434,7 @@ wipe_device(int fd, const char *devname, int force)
                        fprintf(stderr, _("        (%s partition table detected). "), type);
                else
                        fprintf(stderr, _("        (compiled without libblkid). "));
-               fprintf(stderr, "Use -f to force.\n");
+               fprintf(stderr, _("Use -f to force.\n"));
        }
 #ifdef HAVE_LIBBLKID
        blkid_free_probe(pr);
@@ -485,13 +485,13 @@ main(int argc, char **argv) {
                        force=1;
                        break;
                case 'p':
-                       user_pagesize = strtou32_or_err(optarg, _("parse page size failed"));
+                       user_pagesize = strtou32_or_err(optarg, _("parsing page size failed"));
                        break;
                case 'L':
                        opt_label = optarg;
                        break;
                case 'v':
-                       version = strtos32_or_err(optarg, _("parse version number failed"));
+                       version = strtos32_or_err(optarg, _("parsing version number failed"));
                        break;
                case 'U':
 #ifdef HAVE_LIBUUID
@@ -515,7 +515,7 @@ main(int argc, char **argv) {
        if (optind < argc)
                block_count = argv[optind++];
        if (optind != argc) {
-               warnx(("only one device as argument is currently supported."));
+               warnx(_("only one device argument is currently supported"));
                usage(stderr);
        }
 
@@ -526,7 +526,7 @@ main(int argc, char **argv) {
 #ifdef HAVE_LIBUUID
        if(opt_uuid) {
                if (uuid_parse(opt_uuid, uuid_dat) != 0)
-                       errx(EXIT_FAILURE, _("error: UUID parsing failed"));
+                       errx(EXIT_FAILURE, _("error: parsing UUID failed"));
        } else
                uuid_generate(uuid_dat);
        uuid = uuid_dat;
index 21bd522206924dae5f8463c293c85190c43e1020..71da2eba22f3facea1fd60bd479ae09e03b70e2a 100644 (file)
@@ -88,7 +88,6 @@ static int do_rename(char *from, char *to, char *s, int verbose, int symtarget)
                        printf("`%s' -> `%s'\n", s, newname);
        }
 
-
        free(newname);
        return 1;
 }
@@ -148,7 +147,7 @@ int main(int argc, char **argv)
        argv += optind;
 
        if (argc < 3) {
-               warnx("not enough arguments");
+               warnx(_("not enough arguments"));
                usage(stderr);
        }
 
index be10076b1255fe4348d48484bfce9a07d0afc322..034791448e0b813d260541185675872ed65182a5 100644 (file)
@@ -263,8 +263,8 @@ int main(int argc, char **argv)
                        verbose = 1;
                        break;
                case 'V':
-                       printf("%s from %s\n", program_invocation_short_name,
-                                              PACKAGE_STRING);
+                       printf(_("%s from %s\n"), program_invocation_short_name,
+                              PACKAGE_STRING);
                        return EXIT_SUCCESS;
                case 'h':
                        ret = EXIT_SUCCESS;
index e25428d94a098cb3469f94b96750bf1ef26df766..f74e3c4ad615122afd16d41d71e0b74e69707882 100644 (file)
@@ -82,8 +82,8 @@ static void ioprio_print(int pid)
                        name = to_prio[ioclass];
 
                if (ioclass != IOPRIO_CLASS_IDLE)
-                       printf("%s: prio %lu\n", name,
-                                       IOPRIO_PRIO_DATA(ioprio));
+                       printf(_("%s: priority %lu\n"), name,
+                              IOPRIO_PRIO_DATA(ioprio));
                else
                        printf("%s\n", name);
        }
index 05f294c0c200f81d64a70a390cdaf439cd7ba893..903959848f9af1abd30e217f50153b79fb372dc4 100644 (file)
@@ -163,7 +163,7 @@ int main(int argc, char **argv)
                        ts.use_list = 1;
                        break;
                case 'V':
-                       printf("%s from %s\n", program_invocation_short_name,
+                       printf(_("%s from %s\n"), program_invocation_short_name,
                               PACKAGE_STRING);
                        return EXIT_SUCCESS;
                case 'h':
index 04aa650a0f6402efd0802a884204b830b9b8b6b3..5235fb85589b7b28149a318c6774dacebbb1c88a 100644 (file)
@@ -262,7 +262,7 @@ static int read_adjtime(struct adjtime *adjtime_p)
 
        adjfile = fopen(adj_file_name, "r");    /* open file for reading */
        if (adjfile == NULL) {
-               warn("cannot open %s", adj_file_name);
+               warn(_("cannot open %s"), adj_file_name);
                return EX_OSFILE;
        }
 
index ed97bc5607b919b7115c9811012569aa68c53d83..34b0afc2c0af0f959c659cab787544dbc39b557d 100644 (file)
@@ -353,7 +353,7 @@ int main(int argc, char **argv)
                if (options.autolog) {
                        /* Autologin prompt */
                        do_prompt(&options, &termios);
-                       printf("%s%s (automatic login)\n", LOGIN, options.autolog);
+                       printf(_("%s%s (automatic login)\n"), LOGIN, options.autolog);
                } else {
                        /* Read the login name. */
                        debug("reading login name\n");
@@ -901,7 +901,7 @@ static void open_tty(char *tty, struct termios *tp, struct options *op)
 
                if (((tid = tcgetsid(fd)) < 0) || (pid != tid)) {
                        if (ioctl(fd, TIOCSCTTY, 1) == -1)
-                               log_warn("/dev/%s: cannot get controlling tty: %m", tty);
+                               log_warn(_("/dev/%s: cannot get controlling tty: %m"), tty);
                }
 
                close(STDIN_FILENO);
@@ -923,7 +923,7 @@ static void open_tty(char *tty, struct termios *tp, struct options *op)
                        closed = 1;
 
                        if (vhangup())
-                               log_err("/dev/%s: vhangup() failed: %m", tty);
+                               log_err(_("/dev/%s: vhangup() failed: %m"), tty);
                } else
                        close(fd);
 
@@ -933,7 +933,7 @@ static void open_tty(char *tty, struct termios *tp, struct options *op)
 
                if (((tid = tcgetsid(STDIN_FILENO)) < 0) || (pid != tid)) {
                        if (ioctl(STDIN_FILENO, TIOCSCTTY, 1) == -1)
-                               log_warn("/dev/%s: cannot get controlling tty: %m", tty);
+                               log_warn(_("/dev/%s: cannot get controlling tty: %m"), tty);
                }
 
        } else {
@@ -949,7 +949,7 @@ static void open_tty(char *tty, struct termios *tp, struct options *op)
        }
 
        if (tcsetpgrp(STDIN_FILENO, pid))
-               log_warn("/dev/%s: cannot set process group: %m", tty);
+               log_warn(_("/dev/%s: cannot set process group: %m"), tty);
 
        /* Get rid of the present outputs. */
        if (!closed) {
@@ -980,7 +980,7 @@ static void open_tty(char *tty, struct termios *tp, struct options *op)
         */
        memset(tp, 0, sizeof(struct termios));
        if (tcgetattr(STDIN_FILENO, tp) < 0)
-               log_err("%s: tcgetattr: %m", tty);
+               log_err(_("%s: failed to get terminal attributes: %m"), tty);
 
        /*
         * Detect if this is a virtual console or serial/modem line.
@@ -1138,7 +1138,7 @@ static void reset_vc(const struct options *op, struct termios *tp)
        reset_virtual_console(tp, fl);
 
        if (tcsetattr(STDIN_FILENO, TCSADRAIN, tp))
-               log_warn("tcsetattr problem: %m");
+               log_warn(_("setting terminal attributes failed: %m"));
 }
 
 /* Extract baud rate from modem status message. */
@@ -1276,7 +1276,7 @@ static void do_prompt(struct options *op, struct termios *tp)
        }
 #endif /* ISSUE */
        if (op->flags & F_LOGINPAUSE) {
-               puts("[press ENTER to login]");
+               puts(_("[press ENTER to login]"));
                getc(stdin);
        }
 #ifdef KDGKBLED
@@ -1497,7 +1497,7 @@ static char *get_logname(struct options *op, struct termios *tp, struct chardata
 
                len = mbstowcs((wchar_t *)0, logname, 0);
                if (len < 0)
-                       log_err("%s: invalid character conversion for login name", op->tty);
+                       log_err(_("%s: invalid character conversion for login name"), op->tty);
 
                wcs = (wchar_t *) malloc((len + 1) * sizeof(wchar_t));
                if (!wcs)
@@ -1505,13 +1505,13 @@ static char *get_logname(struct options *op, struct termios *tp, struct chardata
 
                len = mbstowcs(wcs, logname, len + 1);
                if (len < 0)
-                       log_err("%s: invalid character conversion for login name", op->tty);
+                       log_err(_("%s: invalid character conversion for login name"), op->tty);
 
                wcp = wcs;
                while (*wcp) {
                        const wint_t wc = *wcp++;
                        if (!iswprint(wc))
-                               log_err("%s: invalid character 0x%x in login name", op->tty, wc);
+                               log_err(_("%s: invalid character 0x%x in login name"), op->tty, wc);
                }
                free(wcs);
        } else
@@ -1596,7 +1596,7 @@ static void termio_final(struct options *op, struct termios *tp, struct chardata
 
        /* Finally, make the new settings effective. */
        if (tcsetattr(STDIN_FILENO, TCSANOW, tp) < 0)
-               log_err("%s: tcsetattr: TCSANOW: %m", op->tty);
+               log_err(_("%s: failed to set terminal attributes: %m"), op->tty);
 }
 
 /*
@@ -2053,6 +2053,6 @@ static void check_username(const char* nm)
        return;
 err:
        errno = EPERM;
-       log_err("checkname: %m");
+       log_err(_("checkname failed: %m"));
 }