-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Package: util-linux
Version: 2.14~rc2-0
Severity: minor
Tags: patch l10n
While translating util-linux, i've found several strings without gettext
calls, in the login-utils module
Patch included. Forwarded to upstream.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkjZZbkACgkQQ1WdpTsIkf7o9ACcDCmMV4k2SDpYTRLO8F2/R3I4
eT0AnivmO6UFsq1aZbFYdRWHAiXAhrN0
=GrVA
-----END PGP SIGNATURE-----
diff --git a/disk-utils/elvtune.c b/disk-utils/elvtune.c
index fc7550b..8d18003 100644
--- a/disk-utils/elvtune.c
+++ b/disk-utils/elvtune.c
@@ -50,7 +50,7 @@ usage(void) {
" /dev/blkdev1 [/dev/blkdev2...]\n");
fprintf(stderr, "\telvtune -h\n");
fprintf(stderr, "\telvtune -v\n");
- fprintf(stderr, "\tNOTE: elvtune only works with 2.4 kernels\n");
+ fprintf(stderr, _("\tNOTE: elvtune only works with 2.4 kernels\n"));
/* (ioctls exist in 2.2.16 - 2.5.57) */
}
@@ -97,13 +97,13 @@ main(int argc, char * argv[]) {
case '?':
default:
case ':':
- fprintf(stderr, "parse error\n");
+ fprintf(stderr, _("parse error\n"));
exit(1);
}
}
if (optind >= argc)
- fprintf(stderr, "missing blockdevice, use -h for help\n"), exit(1);
+ fprintf(stderr, _("missing blockdevice, use -h for help\n")), exit(1);
while (optind < argc) {
devname = argv[optind++];
@@ -124,9 +124,9 @@ main(int argc, char * argv[]) {
if ((errsv == EINVAL || errsv == ENOTTY) &&
get_linux_version() >= KERNEL_VERSION(2,5,58)) {
fprintf(stderr,
- "\nelvtune is only useful on older "
+ _("\nelvtune is only useful on older "
"kernels;\nfor 2.6 use IO scheduler "
- "sysfs tunables instead..\n");
+ "sysfs tunables instead..\n"));
}
break;
}
diff --git a/disk-utils/fsck.cramfs.c b/disk-utils/fsck.cramfs.c
index aeb766f..6154729 100644
--- a/disk-utils/fsck.cramfs.c
+++ b/disk-utils/fsck.cramfs.c
@@ -144,16 +144,16 @@ static void test_super(int *start, size_t *length) {
/* find the physical size of the file or block device */
if (stat(filename, &st) < 0) {
- die(FSCK_ERROR, 1, "stat failed: %s", filename);
+ die(FSCK_ERROR, 1, _("stat failed: %s"), filename);
}
fd = open(filename, O_RDONLY);
if (fd < 0) {
- die(FSCK_ERROR, 1, "open failed: %s", filename);
+ die(FSCK_ERROR, 1, _("open failed: %s"), filename);
}
if (S_ISBLK(st.st_mode)) {
unsigned long long bytes;
if (blkdev_get_size(fd, &bytes)) {
- die(FSCK_ERROR, 1, "ioctl failed: unable to determine device size: %s", filename);
+ die(FSCK_ERROR, 1, _("ioctl failed: unable to determine device size: %s"), filename);
}
*length = bytes;
}
@@ -161,16 +161,16 @@ static void test_super(int *start, size_t *length) {
*length = st.st_size;
}
else {
- die(FSCK_ERROR, 0, "not a block device or file: %s", filename);
+ die(FSCK_ERROR, 0, _("not a block device or file: %s"), filename);
}
if (*length < sizeof(struct cramfs_super)) {
- die(FSCK_UNCORRECTED, 0, "file length too short");
+ die(FSCK_UNCORRECTED, 0, _("file length too short"));
}
/* find superblock */
if (read(fd, &super, sizeof(super)) != sizeof(super)) {
- die(FSCK_ERROR, 1, "read failed: %s", filename);
+ die(FSCK_ERROR, 1, _("read failed: %s"), filename);
}
if (super.magic == CRAMFS_MAGIC) {
*start = 0;
@@ -178,7 +178,7 @@ static void test_super(int *start, size_t *length) {
else if (*length >= (PAD_SIZE + sizeof(super))) {
lseek(fd, PAD_SIZE, SEEK_SET);
if (read(fd, &super, sizeof(super)) != sizeof(super)) {
- die(FSCK_ERROR, 1, "read failed: %s", filename);
+ die(FSCK_ERROR, 1, _("read failed: %s"), filename);
}
if (super.magic == CRAMFS_MAGIC) {
*start = PAD_SIZE;
@@ -187,27 +187,27 @@ static void test_super(int *start, size_t *length) {
/* superblock tests */
if (super.magic != CRAMFS_MAGIC) {
- die(FSCK_UNCORRECTED, 0, "superblock magic not found");
+ die(FSCK_UNCORRECTED, 0, _("superblock magic not found"));
}
if (super.flags & ~CRAMFS_SUPPORTED_FLAGS) {
- die(FSCK_ERROR, 0, "unsupported filesystem features");
+ die(FSCK_ERROR, 0, _("unsupported filesystem features"));
}
if (super.size < page_size) {
- die(FSCK_UNCORRECTED, 0, "superblock size (%d) too small", super.size);
+ die(FSCK_UNCORRECTED, 0, _("superblock size (%d) too small"), super.size);
}
if (super.flags & CRAMFS_FLAG_FSID_VERSION_2) {
if (super.fsid.files == 0) {
- die(FSCK_UNCORRECTED, 0, "zero file count");
+ die(FSCK_UNCORRECTED, 0, _("zero file count"));
}
if (*length < super.size) {
- die(FSCK_UNCORRECTED, 0, "file length too short");
+ die(FSCK_UNCORRECTED, 0, _("file length too short"));
}
else if (*length > super.size) {
- fprintf(stderr, "warning: file extends past end of filesystem\n");
+ fprintf(stderr, _("warning: file extends past end of filesystem\n"));
}
}
else {
- fprintf(stderr, "warning: old cramfs format\n");
+ fprintf(stderr, _("warning: old cramfs format\n"));
}
}
@@ -220,7 +220,7 @@ static void test_crc(int start)
#ifdef INCLUDE_FS_TESTS
return;
#else /* not INCLUDE_FS_TESTS */
- die(FSCK_USAGE, 0, "unable to test CRC: old cramfs format");
+ die(FSCK_USAGE, 0, _("unable to test CRC: old cramfs format"));
#endif /* not INCLUDE_FS_TESTS */
}
@@ -232,7 +232,7 @@ static void test_crc(int start)
if (buf != MAP_FAILED) {
lseek(fd, 0, SEEK_SET);
if (read(fd, buf, super.size) < 0)
- die(FSCK_ERROR, 1, "read failed: %s", filename);
+ die(FSCK_ERROR, 1, _("read failed: %s"), filename);
}
}
if (buf != MAP_FAILED) {
@@ -246,13 +246,13 @@ static void test_crc(int start)
buf = malloc(4096);
if (!buf) {
- die(FSCK_ERROR, 1, "malloc failed");
+ die(FSCK_ERROR, 1, _("malloc failed"));
}
lseek(fd, start, SEEK_SET);
for (;;) {
retval = read(fd, buf, 4096);
if (retval < 0) {
- die(FSCK_ERROR, 1, "read failed: %s", filename);
+ die(FSCK_ERROR, 1, _("read failed: %s"), filename);
}
else if (retval == 0) {
break;
@@ -271,7 +271,7 @@ static void test_crc(int start)
}
if (crc != super.fsid.crc) {
- die(FSCK_UNCORRECTED, 0, "crc error");
+ die(FSCK_UNCORRECTED, 0, _("crc error"));
}
}
@@ -312,7 +312,7 @@ static struct cramfs_inode *cramfs_iget(struct cramfs_inode * i)
struct cramfs_inode *inode = malloc(sizeof(struct cramfs_inode));
if (!inode) {
- die(FSCK_ERROR, 1, "malloc failed");
+ die(FSCK_ERROR, 1, _("malloc failed"));
}
*inode = *i;
return inode;
@@ -336,12 +336,12 @@ static struct cramfs_inode *read_super(void)
unsigned long offset = super.root.offset << 2;
if (!S_ISDIR(super.root.mode))
- die(FSCK_UNCORRECTED, 0, "root inode is not directory");
+ die(FSCK_UNCORRECTED, 0, _("root inode is not directory"));
if (!(super.flags & CRAMFS_FLAG_SHIFTED_ROOT_OFFSET) &&
((offset != sizeof(struct cramfs_super)) &&
(offset != PAD_SIZE + sizeof(struct cramfs_super))))
{
- die(FSCK_UNCORRECTED, 0, "bad root offset (%lu)", offset);
+ die(FSCK_UNCORRECTED, 0, _("bad root offset (%lu)"), offset);
}
return cramfs_iget(&super.root);
}
@@ -359,11 +359,11 @@ static int uncompress_block(void *src, int len)
inflateReset(&stream);
if (len > page_size*2) {
- die(FSCK_UNCORRECTED, 0, "data block too large");
+ die(FSCK_UNCORRECTED, 0, _("data block too large"));
}
err = inflate(&stream, Z_FINISH);
if (err != Z_STREAM_END) {
- die(FSCK_UNCORRECTED, 0, "decompression error %p(%d): %s",
+ die(FSCK_UNCORRECTED, 0, _("decompression error %p(%d): %s"),
zError(err), src, len);
}
return stream.total_out;
@@ -387,7 +387,7 @@ static void do_uncompress(char *path, int fd, unsigned long offset, unsigned lon
offset += 4;
if (curr == next) {
if (opt_verbose > 1) {
- printf(" hole at %ld (%d)\n", curr, page_size);
+ printf(_(" hole at %ld (%d)\n"), curr, page_size);
}
if (size < page_size)
out = size;
@@ -395,23 +395,23 @@ static void do_uncompress(char *path, int fd, unsigned long offset, unsigned lon
}
else {
if (opt_verbose > 1) {
- printf(" uncompressing block at %ld to %ld (%ld)\n", curr, next, next - curr);
+ printf(_(" uncompressing block at %ld to %ld (%ld)\n"), curr, next, next - curr);
}
out = uncompress_block(romfs_read(curr), next - curr);
}
if (size >= page_size) {
if (out != page_size) {
- die(FSCK_UNCORRECTED, 0, "non-block (%ld) bytes", out);
+ die(FSCK_UNCORRECTED, 0, _("non-block (%ld) bytes"), out);
}
} else {
if (out != size) {
- die(FSCK_UNCORRECTED, 0, "non-size (%ld vs %ld) bytes", out, size);
+ die(FSCK_UNCORRECTED, 0, _("non-size (%ld vs %ld) bytes"), out, size);
}
}
size -= out;
if (opt_extract) {
if (write(fd, outbuffer, out) < 0) {
- die(FSCK_ERROR, 1, "write failed: %s", path);
+ die(FSCK_ERROR, 1, _("write failed: %s"), path);
}
}
curr = next;
@@ -424,20 +424,20 @@ static void change_file_status(char *path, struct cramfs_inode *i)
if (euid == 0) {
if (lchown(path, i->uid, i->gid) < 0) {
- die(FSCK_ERROR, 1, "lchown failed: %s", path);
+ die(FSCK_ERROR, 1, _("lchown failed: %s"), path);
}
if (S_ISLNK(i->mode))
return;
if ((S_ISUID | S_ISGID) & i->mode) {
if (chmod(path, i->mode) < 0) {
- die(FSCK_ERROR, 1, "chown failed: %s", path);
+ die(FSCK_ERROR, 1, _("chown failed: %s"), path);
}
}
}
if (S_ISLNK(i->mode))
return;
if (utime(path, &epoch) < 0) {
- die(FSCK_ERROR, 1, "utime failed: %s", path);
+ die(FSCK_ERROR, 1, _("utime failed: %s"), path);
}
}
@@ -449,10 +449,10 @@ static void do_directory(char *path, struct cramfs_inode *i)
char *newpath = malloc(pathlen + 256);
if (!newpath) {
- die(FSCK_ERROR, 1, "malloc failed");
+ die(FSCK_ERROR, 1, _("malloc failed"));
}
if (offset == 0 && count != 0) {
- die(FSCK_UNCORRECTED, 0, "directory inode has zero offset and non-zero size: %s", path);
+ die(FSCK_UNCORRECTED, 0, _("directory inode has zero offset and non-zero size: %s"), path);
}
if (offset != 0 && offset < start_dir) {
start_dir = offset;
@@ -466,7 +466,7 @@ static void do_directory(char *path, struct cramfs_inode *i)
}
if (opt_extract) {
if (mkdir(path, i->mode) < 0) {
- die(FSCK_ERROR, 1, "mkdir failed: %s", path);
+ die(FSCK_ERROR, 1, _("mkdir failed: %s"), path);
}
change_file_status(path, i);
}
@@ -483,17 +483,17 @@ static void do_directory(char *path, struct cramfs_inode *i)
memcpy(newpath + pathlen, romfs_read(offset), newlen);
newpath[pathlen + newlen] = 0;
if (newlen == 0) {
- die(FSCK_UNCORRECTED, 0, "filename length is zero");
+ die(FSCK_UNCORRECTED, 0, _("filename length is zero"));
}
if ((pathlen + newlen) - strlen(newpath) > 3) {
- die(FSCK_UNCORRECTED, 0, "bad filename length");
+ die(FSCK_UNCORRECTED, 0, _("bad filename length"));
}
expand_fs(newpath, child);
offset += newlen;
if (offset <= start_dir) {
- die(FSCK_UNCORRECTED, 0, "bad inode offset");
+ die(FSCK_UNCORRECTED, 0, _("bad inode offset"));
}
if (offset > end_dir) {
end_dir = offset;
@@ -509,10 +509,10 @@ static void do_file(char *path, struct cramfs_inode *i)
int fd = 0;
if (offset == 0 && i->size != 0) {
- die(FSCK_UNCORRECTED, 0, "file inode has zero offset and non-zero size");
+ die(FSCK_UNCORRECTED, 0, _("file inode has zero offset and non-zero size"));
}
if (i->size == 0 && offset != 0) {
- die(FSCK_UNCORRECTED, 0, "file inode has zero size and non-zero offset");
+ die(FSCK_UNCORRECTED, 0, _("file inode has zero size and non-zero offset"));
}
if (offset != 0 && offset < start_data) {
start_data = offset;
@@ -523,7 +523,7 @@ static void do_file(char *path, struct cramfs_inode *i)
if (opt_extract) {
fd = open(path, O_WRONLY | O_CREAT | O_TRUNC, i->mode);
if (fd < 0) {
- die(FSCK_ERROR, 1, "open failed: %s", path);
+ die(FSCK_ERROR, 1, _("open failed: %s"), path);
}
}
if (i->size) {
@@ -543,10 +543,10 @@ static void do_symlink(char *path, struct cramfs_inode *i)
unsigned long size;
if (offset == 0) {
- die(FSCK_UNCORRECTED, 0, "symbolic link has zero offset");
+ die(FSCK_UNCORRECTED, 0, _("symbolic link has zero offset"));
}
if (i->size == 0) {
- die(FSCK_UNCORRECTED, 0, "symbolic link has zero size");
+ die(FSCK_UNCORRECTED, 0, _("symbolic link has zero size"));
}
if (offset < start_data) {
@@ -558,7 +558,7 @@ static void do_symlink(char *path, struct cramfs_inode *i)
size = uncompress_block(romfs_read(curr), next - curr);
if (size != i->size) {
- die(FSCK_UNCORRECTED, 0, "size error in symlink: %s", path);
+ die(FSCK_UNCORRECTED, 0, _("size error in symlink: %s"), path);
}
outbuffer[size] = 0;
if (opt_verbose) {
@@ -567,13 +567,13 @@ static void do_symlink(char *path, struct cramfs_inode *i)
asprintf(&str, "%s -> %s", path, outbuffer);
print_node('l', i, str);
if (opt_verbose > 1) {
- printf(" uncompressing block at %ld to %ld (%ld)\n", curr, next, next - curr);
+ printf(_(" uncompressing block at %ld to %ld (%ld)\n"), curr, next, next - curr);
}
free(str);
}
if (opt_extract) {
if (symlink(outbuffer, path) < 0) {
- die(FSCK_ERROR, 1, "symlink failed: %s", path);
+ die(FSCK_ERROR, 1, _("symlink failed: %s"), path);
}
change_file_status(path, i);
}
@@ -585,7 +585,7 @@ static void do_special_inode(char *path, struct cramfs_inode *i)
char type;
if (i->offset) { /* no need to shift offset */
- die(FSCK_UNCORRECTED, 0, "special file has non-zero offset: %s", path);
+ die(FSCK_UNCORRECTED, 0, _("special file has non-zero offset: %s"), path);
}
if (S_ISCHR(i->mode)) {
devtype = i->size;
@@ -597,18 +597,18 @@ static void do_special_inode(char *path, struct cramfs_inode *i)
}
else if (S_ISFIFO(i->mode)) {
if (i->size != 0) {
- die(FSCK_UNCORRECTED, 0, "fifo has non-zero size: %s", path);
+ die(FSCK_UNCORRECTED, 0, _("fifo has non-zero size: %s"), path);
}
type = 'p';
}
else if (S_ISSOCK(i->mode)) {
if (i->size != 0) {
- die(FSCK_UNCORRECTED, 0, "socket has non-zero size: %s", path);
+ die(FSCK_UNCORRECTED, 0, _("socket has non-zero size: %s"), path);
}
type = 's';
}
else {
- die(FSCK_UNCORRECTED, 0, "bogus mode: %s (%o)", path, i->mode);
+ die(FSCK_UNCORRECTED, 0, _("bogus mode: %s (%o)"), path, i->mode);
return; /* not reached */
}
@@ -618,7 +618,7 @@ static void do_special_inode(char *path, struct cramfs_inode *i)
if (opt_extract) {
if (mknod(path, i->mode, devtype) < 0) {
- die(FSCK_ERROR, 1, "mknod failed: %s", path);
+ die(FSCK_ERROR, 1, _("mknod failed: %s"), path);
}
change_file_status(path, i);
}
@@ -654,15 +654,15 @@ static void test_fs(int start)
inflateEnd(&stream);
if (start_data != ~0UL) {
if (start_data < (sizeof(struct cramfs_super) + start)) {
- die(FSCK_UNCORRECTED, 0, "directory data start (%ld) < sizeof(struct cramfs_super) + start (%ld)", start_data, sizeof(struct cramfs_super) + start);
+ die(FSCK_UNCORRECTED, 0, _("directory data start (%ld) < sizeof(struct cramfs_super) + start (%ld)"), start_data, sizeof(struct cramfs_super) + start);
}
if (end_dir != start_data) {
- die(FSCK_UNCORRECTED, 0, "directory data end (%ld) != file data start (%ld)", end_dir, start_data);
+ die(FSCK_UNCORRECTED, 0, _("directory data end (%ld) != file data start (%ld)"), end_dir, start_data);
}
}
if (super.flags & CRAMFS_FLAG_FSID_VERSION_2) {
if (end_data > super.size) {
- die(FSCK_UNCORRECTED, 0, "invalid file data offset");
+ die(FSCK_UNCORRECTED, 0, _("invalid file data offset"));
}
}
iput(root); /* free(root) */
@@ -682,7 +682,7 @@ int main(int argc, char **argv)
outbuffer = malloc(page_size * 2);
if (!outbuffer)
- die(FSCK_ERROR, 1, "failed to allocate outbuffer");
+ die(FSCK_ERROR, 1, _("failed to allocate outbuffer"));
/* command line options */
while ((c = getopt(argc, argv, "hx:v")) != EOF) {
@@ -695,7 +695,7 @@ int main(int argc, char **argv)
extract_dir = optarg;
break;
#else /* not INCLUDE_FS_TESTS */
- die(FSCK_USAGE, 0, "compiled without -x support");
+ die(FSCK_USAGE, 0, _("compiled without -x support"));
#endif /* not INCLUDE_FS_TESTS */
case 'v':
opt_verbose++;
diff --git a/disk-utils/mkfs.cramfs.c b/disk-utils/mkfs.cramfs.c
index 7882e33..1138bfd 100644
--- a/disk-utils/mkfs.cramfs.c
+++ b/disk-utils/mkfs.cramfs.c
@@ -853,7 +853,7 @@ int main(int argc, char **argv)
-1, 0);
if (-1 == (int) (long) rom_image) {
- perror("ROM image map");
+ perror(_("ROM image map"));
exit(8);
}
@@ -906,7 +906,7 @@ int main(int argc, char **argv)
written = write(fd, rom_image, offset);
if (written < 0) {
- perror("ROM image");
+ perror(_("ROM image"));
exit(8);
}
if (offset != written) {
diff --git a/disk-utils/raw.c b/disk-utils/raw.c
index 9423f9e..63bb4d9 100644
--- a/disk-utils/raw.c
+++ b/disk-utils/raw.c
@@ -21,6 +21,7 @@
#include <sys/sysmacros.h>
#include <linux/raw.h>
#include <linux/major.h>
+#include "nls.h"
#ifdef OLD_RAW_DEVS
#define RAWCTLDEV "/dev/raw"
@@ -48,11 +49,11 @@ int bind (int minor, int block_major, int block_minor);
static void usage(int err)
{
fprintf(stderr,
- "Usage:\n"
+ _("Usage:\n"
" %s " RAWDEVDIR "rawN <major> <minor>\n"
" %s " RAWDEVDIR "rawN /dev/<blockdev>\n"
" %s -q " RAWDEVDIR "rawN\n"
- " %s -qa\n",
+ " %s -qa\n"),
progname, progname, progname, progname);
exit(err);
}
@@ -116,26 +117,26 @@ int main(int argc, char *argv[])
rc = sscanf(raw_name, RAWDEVDIR "raw%d", &raw_minor);
if (rc == 1 && raw_minor == 0) {
fprintf (stderr,
- "Device '%s' is control raw dev "
- "(use raw<N> where <N> is greater than zero)\n",
+ _("Device '%s' is control raw dev "
+ "(use raw<N> where <N> is greater than zero)\n"),
raw_name);
exit(2);
}
err = stat(raw_name, &statbuf);
if (err) {
- fprintf (stderr, "Cannot locate raw device '%s' (%s)\n",
+ fprintf (stderr, _("Cannot locate raw device '%s' (%s)\n"),
raw_name, strerror(errno));
exit(2);
}
if (!S_ISCHR(statbuf.st_mode)) {
- fprintf (stderr, "Raw device '%s' is not a character dev\n",
+ fprintf (stderr, _("Raw device '%s' is not a character dev\n"),
raw_name);
exit(2);
}
if (major(statbuf.st_rdev) != RAW_MAJOR) {
- fprintf (stderr, "Device '%s' is not a raw dev\n",
+ fprintf (stderr, _("Device '%s' is not a raw dev\n"),
raw_name);
exit(2);
}
@@ -156,13 +157,13 @@ int main(int argc, char *argv[])
err = stat(block_name, &statbuf);
if (err) {
fprintf (stderr,
- "Cannot locate block device '%s' (%s)\n",
+ _("Cannot locate block device '%s' (%s)\n"),
block_name, strerror(errno));
exit(2);
}
if (!S_ISBLK(statbuf.st_mode)) {
- fprintf (stderr, "Device '%s' is not a block dev\n",
+ fprintf (stderr, _("Device '%s' is not a block dev\n"),
block_name);
exit(2);
}
@@ -197,9 +198,9 @@ void open_raw_ctl(void)
master_fd = open(DEVFS_RAWCTLDEV, O_RDWR, 0);
if (master_fd < 0) {
fprintf (stderr,
- "Cannot open master raw device '"
+ _("Cannot open master raw device '"
RAWCTLDEV
- "' (%s)\n", strerror(errsv));
+ "' (%s)\n"), strerror(errsv));
exit(2);
}
}
@@ -219,7 +220,7 @@ int query(int minor, int quiet)
if (has_worked && errno == EINVAL)
return 0;
fprintf (stderr,
- "Error querying raw device (%s)\n",
+ _("Error querying raw device (%s)\n"),
strerror(errno));
exit(3);
}
@@ -229,7 +230,7 @@ int query(int minor, int quiet)
has_worked = 1;
if (quiet && !rq.block_major && !rq.block_minor)
return 0;
- printf (RAWDEVDIR "raw%d: bound to major %d, minor %d\n",
+ printf (_("" RAWDEVDIR "raw%d: bound to major %d, minor %d\n"),
minor, (int) rq.block_major, (int) rq.block_minor);
return 0;
}
@@ -245,11 +246,11 @@ int bind(int minor, int block_major, int block_minor)
err = ioctl(master_fd, RAW_SETBIND, &rq);
if (err < 0) {
fprintf (stderr,
- "Error setting raw device (%s)\n",
+ _("Error setting raw device (%s)\n"),
strerror(errno));
exit(3);
}
- printf (RAWDEVDIR "raw%d: bound to major %d, minor %d\n",
+ printf (_("" RAWDEVDIR "raw%d: bound to major %d, minor %d\n"),
raw_minor, (int) rq.block_major, (int) rq.block_minor);
return 0;
}
diff --git a/fdisk/fdisk.c b/fdisk/fdisk.c
index 2651932..add1a08 100644
--- a/fdisk/fdisk.c
+++ b/fdisk/fdisk.c
@@ -775,7 +775,7 @@ read_extended(int ext) {
if (!get_nr_sects(pe->part_table) &&
(partitions > 5 || ptes[4].part_table->sys_ind)) {
- printf("omitting empty partition (%d)\n", i+1);
+ printf(_("omitting empty partition (%d)\n"), i+1);
delete_partition(i);
goto remove; /* numbering changed */
}
@@ -1779,7 +1779,7 @@ fix_partition_table_order(void) {
if (i)
fix_chain_of_logicals();
- printf("Done.\n");
+ printf(_("Done.\n"));
}
diff --git a/fdisk/fdisksgilabel.c b/fdisk/fdisksgilabel.c
index 9f87751..6dd2e1e 100644
--- a/fdisk/fdisksgilabel.c
+++ b/fdisk/fdisksgilabel.c
@@ -465,7 +465,7 @@ verify_sgi(int verbose)
if (verbose)
printf(_("One Partition (#11) should cover the entire disk.\n"));
if (debug>2)
- printf("sysid=%d\tpartition=%d\n",
+ printf(_("sysid=%d\tpartition=%d\n"),
sgi_get_sysid(Index[0]), Index[0]+1);
}
for (i=1, start=0; i<sortcount; i++) {
diff --git a/fdisk/fdisksunlabel.c b/fdisk/fdisksunlabel.c
index e6f1725..935c92a 100644
--- a/fdisk/fdisksunlabel.c
+++ b/fdisk/fdisksunlabel.c
@@ -446,9 +446,9 @@ void add_sun_partition(int n, int sys)
first += cs - x;
}
if (n == 2 && first != 0)
- printf ("\
+ printf (_("\
It is highly recommended that the third partition covers the whole disk\n\
-and is of type `Whole disk'\n");
+and is of type `Whole disk'\n"));
/* ewt asks to add: "don't start a partition at cyl 0"
However, [EMAIL PROTECTED] writes:
"In addition to having a Sun partition table, to be able to
diff --git a/fdisk/sfdisk.c b/fdisk/sfdisk.c
index 483ef8e..e52e328 100644
--- a/fdisk/sfdisk.c
+++ b/fdisk/sfdisk.c
@@ -930,7 +930,7 @@ static void
out_partition_header(char *dev, int format, struct geometry G) {
if (dump) {
printf(_("# partition table of %s\n"), dev);
- printf("unit: sectors\n\n");
+ printf(_("unit: sectors\n\n"));
return;
}
@@ -1058,12 +1058,12 @@ out_partition(char *dev, int format, struct part_desc *p,
size = p->size;
if (dump) {
- printf(" start=%9lu", start);
- printf(", size=%9lu", size);
+ printf(_(" start=%9lu"), start);
+ printf(_(", size=%9lu"), size);
if (p->ptype == DOS_TYPE) {
printf(", Id=%2x", p->p.sys_type);
if (p->p.bootable == 0x80)
- printf(", bootable");
+ printf(_(", bootable"));
}
printf("\n");
return;
diff --git a/hwclock/cmos.c b/hwclock/cmos.c
index ca3ca61..c45a504 100644
--- a/hwclock/cmos.c
+++ b/hwclock/cmos.c
@@ -291,10 +291,10 @@ unsigned long cmos_read(unsigned long reg)
unsigned char v = reg | 0x80;
lseek(dev_port_fd, clock_ctl_addr, 0);
if (write(dev_port_fd, &v, 1) == -1 && debug)
- printf("cmos_read(): write to control address %X failed: %s\n", clock_ctl_addr, strerror(errno));
+ printf(_("cmos_read(): write to control address %X failed: %s\n"), clock_ctl_addr, strerror(errno));
lseek(dev_port_fd, clock_data_addr, 0);
if (read(dev_port_fd, &v, 1) == -1 && debug)
- printf("cmos_read(): read data address %X failed: %s\n", clock_data_addr, strerror(errno));
+ printf(_("cmos_read(): read data address %X failed: %s\n"), clock_data_addr, strerror(errno));
return v;
} else {
/* We only want to read CMOS data, but unfortunately
@@ -325,11 +325,11 @@ unsigned long cmos_write(unsigned long reg, unsigned long val)
unsigned char v = reg | 0x80;
lseek(dev_port_fd, clock_ctl_addr, 0);
if (write(dev_port_fd, &v, 1) == -1 && debug)
- printf("cmos_write(): write to control address %X failed: %s\n", clock_ctl_addr, strerror(errno));
+ printf(_("cmos_write(): write to control address %X failed: %s\n"), clock_ctl_addr, strerror(errno));
v = (val & 0xff);
lseek(dev_port_fd, clock_data_addr, 0);
if (write(dev_port_fd, &v, 1) == -1 && debug)
- printf("cmos_write(): write to data address %X failed: %s\n", clock_data_addr, strerror(errno));
+ printf(_("cmos_write(): write to data address %X failed: %s\n"), clock_data_addr, strerror(errno));
} else {
outb (reg, clock_ctl_addr);
outb (val, clock_data_addr);
diff --git a/hwclock/hwclock.c b/hwclock/hwclock.c
index 48b47ad..6218c7a 100644
--- a/hwclock/hwclock.c
+++ b/hwclock/hwclock.c
@@ -922,18 +922,18 @@ save_adjtime(const struct adjtime adjtime, const bool testing) {
adjfile = fopen(adj_file_name, "w");
if (adjfile == NULL) {
- outsyserr("Could not open file with the clock adjustment parameters "
- "in it (%s) for writing", adj_file_name);
+ outsyserr(_("Could not open file with the clock adjustment parameters "
+ "in it (%s) for writing"), adj_file_name);
err = 1;
} else {
if (fputs(newfile, adjfile) < 0) {
- outsyserr("Could not update file with the clock adjustment "
- "parameters (%s) in it", adj_file_name);
+ outsyserr(_("Could not update file with the clock adjustment "
+ "parameters (%s) in it"), adj_file_name);
err = 1;
}
if (fclose(adjfile) < 0) {
- outsyserr("Could not update file with the clock adjustment "
- "parameters (%s) in it", adj_file_name);
+ outsyserr(_("Could not update file with the clock adjustment "
+ "parameters (%s) in it"), adj_file_name);
err = 1;
}
}
@@ -987,8 +987,8 @@ do_adjustment(struct adjtime *adjtime_p,
adjtime_p->dirty = TRUE;
} else if (adjtime_p->last_adj_time == 0) {
if (debug)
- printf("Not setting clock because last adjustment time is zero, "
- "so history is bad.");
+ printf(_("Not setting clock because last adjustment time is zero, "
+ "so history is bad."));
} else {
int adjustment;
/* Number of seconds we must insert in the Hardware Clock */
@@ -1592,7 +1592,7 @@ hwaudit_exit(int status)
{
if (hwaudit_on) {
audit_log_user_message(hwaudit_fd, AUDIT_USYS_CONFIG,
- "changing system time", NULL, NULL, NULL, status ? 0 : 1);
+ _("changing system time"), NULL, NULL, NULL, status ? 0 : 1);
close(hwaudit_fd);
}
exit(status);
diff --git a/login-utils/agetty.c b/login-utils/agetty.c
index 02de349..9144a7b 100644
--- a/login-utils/agetty.c
+++ b/login-utils/agetty.c
@@ -891,11 +891,13 @@ do_prompt(op, tp)
case 'd':
case 't':
{
- char *weekday[] = { "Sun", "Mon", "Tue", "Wed", "Thu",
- "Fri", "Sat" };
- char *month[] = { "Jan", "Feb", "Mar", "Apr", "May",
- "Jun", "Jul", "Aug", "Sep", "Oct",
- "Nov", "Dec" };
+ char *weekday[] = { N_("Sun"), N_("Mon"), N_("Tue"),
+ N_("Wed"), N_("Thu"), N_("Fri"),
+ N_("Sat") };
+ char *month[] = { N_("Jan"), N_("Feb"), N_("Mar"),
+ N_("Apr"), N_("May"), N_("Jun"),
+ N_("Jul"), N_("Aug"), N_("Sep"),
+ N_("Oct"), N_("Nov"), N_("Dec") };
time_t now;
struct tm *tm;
diff --git a/login-utils/checktty.c b/login-utils/checktty.c
index c28ee83..42fa821 100644
--- a/login-utils/checktty.c
+++ b/login-utils/checktty.c
@@ -316,7 +316,7 @@ main(int argc, char **argv)
for (item = alist; item->range; item++) {
- printf("hnmatch() on %-30s <-- %-15s: ", item->range, item->ip);
+ printf(_("hnmatch() on %-30s <-- %-15s: "), item->range, item->ip);
if (getaddrinfo(item->ip, NULL, &hints, &info)==0 && info) {
if (info->ai_family == AF_INET) {
@@ -334,17 +334,18 @@ main(int argc, char **argv)
hostfamily = info->ai_family;
freeaddrinfo(info);
printf("%s\n", hnmatch("dummy", item->range) ?
- "match" : "mismatch");
+ _("match") : _("mismatch"));
}
else
- printf("getaddrinfo() failed\n");
+ printf(_("getaddrinfo() failed\n"));
}
return 0;
}
#endif /* MAIN_TEST_CHECKTTY */
-static char *wdays[] = { "sun", "mon", "tue", "wed", "thu", "fri", "sat" };
+static char *wdays[] = { N_("sun"), N_("mon"), N_("tue"), N_("wed"),
+ N_("thu"), N_("fri"), N_("sat") };
/* example timespecs:
diff --git a/login-utils/chfn.c b/login-utils/chfn.c
index 3ca190f..bab3939 100644
--- a/login-utils/chfn.c
+++ b/login-utils/chfn.c
@@ -374,10 +374,10 @@ static void ask_info (oldfp, newfp)
struct finfo *oldfp;
struct finfo *newfp;
{
- newfp->full_name = prompt ("Name", oldfp->full_name);
- newfp->office = prompt ("Office", oldfp->office);
- newfp->office_phone = prompt ("Office Phone", oldfp->office_phone);
- newfp->home_phone = prompt ("Home Phone", oldfp->home_phone);
+ newfp->full_name = prompt (_("Name"), oldfp->full_name);
+ newfp->office = prompt (_("Office"), oldfp->office);
+ newfp->office_phone = prompt (_("Office Phone"), oldfp->office_phone);
+ newfp->home_phone = prompt (_("Home Phone"), oldfp->home_phone);
printf ("\n");
}
diff --git a/login-utils/simpleinit.c b/login-utils/simpleinit.c
index 739306c..1e7ba28 100644
--- a/login-utils/simpleinit.c
+++ b/login-utils/simpleinit.c
@@ -337,12 +337,12 @@ static int check_single_ok (void)
for (i = 0; i < MAXTRIES; i++)
{
- pass = getpass (_ ("Password: ") );
+ pass = getpass (_("Password: ") );
if (pass == NULL) continue;
if ( !strcmp (crypt (pass, rootpass), rootpass) ) return 1;
- puts (_ ("\nWrong password.\n") );
+ puts (_("\nWrong password.\n") );
}
return 0;
}
@@ -944,7 +944,7 @@ static void process_command (const struct command_struct *command)
while (waitpid (pid, &ival, 0) != pid) /* Nothing */;
if ( WIFEXITED (ival) && (WEXITSTATUS (ival) == 0) )
{
- sprintf (txt, "Stopped service: %s\n",
+ sprintf (txt, _("Stopped service: %s\n"),
victim->first_service->name);
remove_entry (&available_list, victim);
free (victim);