summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1995-11-29 19:24:52 +0000
committerJim Meyering <jim@meyering.net>1995-11-29 19:24:52 +0000
commit073c4cb543f90ff6f36c8027fc2a03825d7377f9 (patch)
tree1edeaa6ec9a66df8f3664327ce8822490871613e /src
parent8bacb0720ca64a221c039aa7966d54f6989589d4 (diff)
downloadcoreutils-073c4cb543f90ff6f36c8027fc2a03825d7377f9.tar.xz
Mark all translatable strings using po-mode.el.
Diffstat (limited to 'src')
-rw-r--r--src/chmod.c24
-rw-r--r--src/chown.c18
-rw-r--r--src/cp.c58
-rw-r--r--src/dd.c34
-rw-r--r--src/df.c14
-rw-r--r--src/du.c24
-rw-r--r--src/install.c32
-rw-r--r--src/ln.c36
-rw-r--r--src/ls.c32
-rw-r--r--src/mkdir.c16
-rw-r--r--src/mkfifo.c18
-rw-r--r--src/mknod.c44
-rw-r--r--src/mv.c36
-rw-r--r--src/rm.c36
-rw-r--r--src/rmdir.c10
-rw-r--r--src/sync.c10
-rw-r--r--src/touch.c18
17 files changed, 231 insertions, 229 deletions
diff --git a/src/chmod.c b/src/chmod.c
index cae5d7e65..b508b45ed 100644
--- a/src/chmod.c
+++ b/src/chmod.c
@@ -86,10 +86,10 @@ describe_change (char *file, short unsigned int mode, int changed)
mode_string (mode, perms);
perms[10] = '\0'; /* `mode_string' does not null terminate. */
if (changed)
- printf ("mode of %s changed to %04o (%s)\n",
+ printf (_("mode of %s changed to %04o (%s)\n"),
file, mode & 07777, &perms[1]);
else
- printf ("mode of %s retained as %04o (%s)\n",
+ printf (_("mode of %s retained as %04o (%s)\n"),
file, mode & 07777, &perms[1]);
}
@@ -173,7 +173,7 @@ change_dir_mode (char *dir, struct mode_change *changes, struct stat *statp)
return 1;
}
else
- error (1, 0, "virtual memory exhausted");
+ error (1, 0, _("virtual memory exhausted"));
}
dirlength = strlen (dir) + 1; /* + 1 is for the trailing '/'. */
@@ -203,16 +203,16 @@ static void
usage (int status)
{
if (status != 0)
- fprintf (stderr, "Try `%s --help' for more information.\n",
+ fprintf (stderr, _("Try `%s --help' for more information.\n"),
program_name);
else
{
- printf ("\
+ printf (_("\
Usage: %s [OPTION]... MODE[,MODE]... FILE...\n\
or: %s [OPTION]... OCTAL_MODE FILE...\n\
-",
+"),
program_name, program_name);
- printf ("\
+ printf (_("\
\n\
-c, --changes like verbose but report only when a change is made\n\
-f, --silent, --quiet suppress most error messages\n\
@@ -222,7 +222,7 @@ Usage: %s [OPTION]... MODE[,MODE]... FILE...\n\
--version output version information and exit\n\
\n\
Each MODE is one or more of the letters ugoa, one of the symbols +-= and\n\
-one or more of the letters rwxXstugo.\n");
+one or more of the letters rwxXstugo.\n"));
}
exit (status);
}
@@ -270,7 +270,7 @@ main (int argc, char **argv)
case '-':
case '=':
if (modeind != 0 && modeind != thisind)
- error (1, 0, "invalid mode");
+ error (1, 0, _("invalid mode"));
modeind = thisind;
break;
case 'R':
@@ -305,16 +305,16 @@ main (int argc, char **argv)
if (optind >= argc)
{
- error (0, 0, "too few arguments");
+ error (0, 0, _("too few arguments"));
usage (1);
}
changes = mode_compile (argv[modeind],
MODE_MASK_EQUALS | MODE_MASK_PLUS | MODE_MASK_MINUS);
if (changes == MODE_INVALID)
- error (1, 0, "invalid mode");
+ error (1, 0, _("invalid mode"));
else if (changes == MODE_MEMORY_EXHAUSTED)
- error (1, 0, "virtual memory exhausted");
+ error (1, 0, _("virtual memory exhausted"));
for (; optind < argc; ++optind)
{
diff --git a/src/chown.c b/src/chown.c
index f3bbf45b7..111185a6c 100644
--- a/src/chown.c
+++ b/src/chown.c
@@ -104,9 +104,9 @@ static void
describe_change (char *file, int changed)
{
if (changed)
- printf ("owner of %s changed to ", file);
+ printf (_("owner of %s changed to "), file);
else
- printf ("owner of %s retained as ", file);
+ printf (_("owner of %s retained as "), file);
if (groupname)
printf ("%s.%s\n", username, groupname);
else
@@ -179,7 +179,7 @@ change_dir_owner (char *dir, uid_t user, gid_t group, struct stat *statp)
return 1;
}
else
- error (1, 0, "virtual memory exhausted");
+ error (1, 0, _("virtual memory exhausted"));
}
dirlength = strlen (dir) + 1; /* + 1 is for the trailing '/'. */
@@ -209,16 +209,16 @@ static void
usage (int status)
{
if (status != 0)
- fprintf (stderr, "Try `%s --help' for more information.\n",
+ fprintf (stderr, _("Try `%s --help' for more information.\n"),
program_name);
else
{
- printf ("\
+ printf (_("\
Usage: %s [OPTION]... OWNER[.[GROUP]] FILE...\n\
or: %s [OPTION]... .[GROUP] FILE...\n\
-",
+"),
program_name, program_name);
- printf ("\
+ printf (_("\
Change the owner and/or group of each FILE to OWNER and/or GROUP.\n\
\n\
-c, --changes be verbose whenever change occurs\n\
@@ -229,7 +229,7 @@ Change the owner and/or group of each FILE to OWNER and/or GROUP.\n\
--version output version information and exit\n\
\n\
Owner is unchanged if missing. Group is unchanged if missing, but changed\n\
-to login group if implied by a period. A colon may replace the period.\n");
+to login group if implied by a period. A colon may replace the period.\n"));
}
exit (status);
}
@@ -282,7 +282,7 @@ main (int argc, char **argv)
if (optind >= argc - 1)
{
- error (0, 0, "too few arguments");
+ error (0, 0, _("too few arguments"));
usage (1);
}
diff --git a/src/cp.c b/src/cp.c
index 4607d9a92..553e93bf8 100644
--- a/src/cp.c
+++ b/src/cp.c
@@ -240,7 +240,7 @@ main (int argc, char **argv)
#ifdef S_ISLNK
flag_symbolic_link = 1;
#else
- error (1, 0, "symbolic links are not supported on this system");
+ error (1, 0, _("symbolic links are not supported on this system"));
#endif
break;
@@ -279,7 +279,7 @@ main (int argc, char **argv)
usage (0, NULL);
if (flag_hard_link && flag_symbolic_link)
- usage (2, "cannot make both hard and symbolic links");
+ usage (2, _("cannot make both hard and symbolic links"));
if (make_backups)
backup_type = get_version (version);
@@ -316,9 +316,9 @@ do_copy (int argc, char **argv)
int ret = 0;
if (optind >= argc)
- usage (2, "missing file arguments");
+ usage (2, _("missing file arguments"));
if (optind >= argc - 1)
- usage (2, "missing file argument");
+ usage (2, _("missing file argument"));
dest = argv[argc - 1];
@@ -422,7 +422,7 @@ do_copy (int argc, char **argv)
struct stat source_stats;
if (flag_path)
- usage (2, "when preserving paths, last argument must be a directory");
+ usage (2, _("when preserving paths, last argument must be a directory"));
source = argv[optind];
@@ -455,7 +455,7 @@ do_copy (int argc, char **argv)
}
else
usage (2,
- "when copying multiple files, last argument must be a directory");
+ _("when copying multiple files, last argument must be a directory"));
}
/* Copy the file SRC_PATH to the file DST_PATH. The files may be of
@@ -505,7 +505,7 @@ copy (char *src_path, char *dst_path, int new_dst, dev_t device,
if (S_ISDIR (src_type) && !flag_recursive)
{
- error (0, 0, "%s: omitting directory", src_path);
+ error (0, 0, _("%s: omitting directory"), src_path);
return 1;
}
@@ -530,7 +530,7 @@ copy (char *src_path, char *dst_path, int new_dst, dev_t device,
if (flag_hard_link)
return 0;
- error (0, 0, "`%s' and `%s' are the same file",
+ error (0, 0, _("`%s' and `%s' are the same file"),
src_path, dst_path);
return 1;
}
@@ -540,7 +540,7 @@ copy (char *src_path, char *dst_path, int new_dst, dev_t device,
if (S_ISDIR (dst_sb.st_mode))
{
error (0, 0,
- "%s: cannot overwrite directory with non-directory",
+ _("%s: cannot overwrite directory with non-directory"),
dst_path);
return 1;
}
@@ -555,11 +555,11 @@ copy (char *src_path, char *dst_path, int new_dst, dev_t device,
{
if (euidaccess (dst_path, W_OK) != 0)
fprintf (stderr,
- "%s: overwrite `%s', overriding mode %04o? ",
+ _("%s: overwrite `%s', overriding mode %04o? "),
program_name, dst_path,
(unsigned int) (dst_sb.st_mode & 07777));
else
- fprintf (stderr, "%s: overwrite `%s'? ",
+ fprintf (stderr, _("%s: overwrite `%s'? "),
program_name, dst_path);
if (!yesno ())
return 0;
@@ -570,7 +570,7 @@ copy (char *src_path, char *dst_path, int new_dst, dev_t device,
{
char *tmp_backup = find_backup_file_name (dst_path);
if (tmp_backup == NULL)
- error (1, 0, "virtual memory exhausted");
+ error (1, 0, _("virtual memory exhausted"));
dst_backup = (char *) alloca (strlen (tmp_backup) + 1);
strcpy (dst_backup, tmp_backup);
free (tmp_backup);
@@ -578,7 +578,7 @@ copy (char *src_path, char *dst_path, int new_dst, dev_t device,
{
if (errno != ENOENT)
{
- error (0, errno, "cannot backup `%s'", dst_path);
+ error (0, errno, _("cannot backup `%s'"), dst_path);
return 1;
}
else
@@ -606,7 +606,7 @@ copy (char *src_path, char *dst_path, int new_dst, dev_t device,
{
if (unlink (dst_path) && errno != ENOENT)
{
- error (0, errno, "cannot remove old link to `%s'",
+ error (0, errno, _("cannot remove old link to `%s'"),
dst_path);
return 1;
}
@@ -646,7 +646,7 @@ copy (char *src_path, char *dst_path, int new_dst, dev_t device,
if (is_ancestor (&src_sb, ancestors))
{
- error (0, 0, "%s: cannot copy cyclic symbolic link", src_path);
+ error (0, 0, _("%s: cannot copy cyclic symbolic link"), src_path);
goto un_backup;
}
@@ -664,7 +664,7 @@ copy (char *src_path, char *dst_path, int new_dst, dev_t device,
if (mkdir (dst_path, (src_mode & umask_kill) | 0700))
{
- error (0, errno, "cannot create directory `%s'", dst_path);
+ error (0, errno, _("cannot create directory `%s'"), dst_path);
goto un_backup;
}
@@ -701,7 +701,7 @@ copy (char *src_path, char *dst_path, int new_dst, dev_t device,
else
{
error (0, 0,
- "%s: can only make relative symbolic links in current directory", dst_path);
+ _("%s: can only make relative symbolic links in current directory"), dst_path);
goto un_backup;
}
}
@@ -710,7 +710,7 @@ copy (char *src_path, char *dst_path, int new_dst, dev_t device,
{
if (link (src_path, dst_path))
{
- error (0, errno, "cannot create link `%s'", dst_path);
+ error (0, errno, _("cannot create link `%s'"), dst_path);
goto un_backup;
}
return 0;
@@ -731,7 +731,7 @@ copy (char *src_path, char *dst_path, int new_dst, dev_t device,
{
if (mkfifo (dst_path, src_mode & umask_kill))
{
- error (0, errno, "cannot create fifo `%s'", dst_path);
+ error (0, errno, _("cannot create fifo `%s'"), dst_path);
goto un_backup;
}
}
@@ -745,7 +745,7 @@ copy (char *src_path, char *dst_path, int new_dst, dev_t device,
{
if (mknod (dst_path, src_mode & umask_kill, src_sb.st_rdev))
{
- error (0, errno, "cannot create special file `%s'", dst_path);
+ error (0, errno, _("cannot create special file `%s'"), dst_path);
goto un_backup;
}
}
@@ -760,14 +760,14 @@ copy (char *src_path, char *dst_path, int new_dst, dev_t device,
link_size = readlink (src_path, link_val, PATH_MAX + 1);
if (link_size < 0)
{
- error (0, errno, "cannot read symbolic link `%s'", src_path);
+ error (0, errno, _("cannot read symbolic link `%s'"), src_path);
goto un_backup;
}
link_val[link_size] = '\0';
if (symlink (link_val, dst_path))
{
- error (0, errno, "cannot create symbolic link `%s'", dst_path);
+ error (0, errno, _("cannot create symbolic link `%s'"), dst_path);
goto un_backup;
}
return 0;
@@ -775,7 +775,7 @@ copy (char *src_path, char *dst_path, int new_dst, dev_t device,
else
#endif
{
- error (0, 0, "%s: unknown file type", src_path);
+ error (0, 0, _("%s: unknown file type"), src_path);
goto un_backup;
}
@@ -833,7 +833,7 @@ un_backup:
if (dst_backup)
{
if (rename (dst_backup, dst_path))
- error (0, errno, "cannot un-backup `%s'", dst_path);
+ error (0, errno, _("cannot un-backup `%s'"), dst_path);
}
return 1;
}
@@ -910,7 +910,7 @@ make_path_private (char *const_dirpath, int src_offset, int mode,
new->is_new_dir = 1;
if (mkdir (dirpath, mode))
{
- error (0, errno, "cannot make directory `%s'", dirpath);
+ error (0, errno, _("cannot make directory `%s'"), dirpath);
return 1;
}
else
@@ -921,7 +921,7 @@ make_path_private (char *const_dirpath, int src_offset, int mode,
}
else if (!S_ISDIR (stats.st_mode))
{
- error (0, 0, "`%s' exists but is not a directory", dirpath);
+ error (0, 0, _("`%s' exists but is not a directory"), dirpath);
return 1;
}
else
@@ -942,7 +942,7 @@ make_path_private (char *const_dirpath, int src_offset, int mode,
else if (!S_ISDIR (stats.st_mode))
{
- error (0, 0, "`%s' exists but is not a directory", dst_dirname);
+ error (0, 0, _("`%s' exists but is not a directory"), dst_dirname);
return 1;
}
else
@@ -1062,7 +1062,7 @@ copy_dir (char *src_path_in, char *dst_path_in, int new_dst,
return -1;
}
else
- error (1, 0, "virtual memory exhausted");
+ error (1, 0, _("virtual memory exhausted"));
}
namep = name_space;
@@ -1125,7 +1125,7 @@ copy_reg (char *src_path, char *dst_path)
dest_desc = open (dst_path, O_WRONLY | O_CREAT | O_TRUNC, 0600);
if (dest_desc < 0)
{
- error (0, errno, "cannot create regular file `%s'", dst_path);
+ error (0, errno, _("cannot create regular file `%s'"), dst_path);
return_val = -1;
goto ret2;
}
diff --git a/src/dd.c b/src/dd.c
index 09f66aba2..ac43697f2 100644
--- a/src/dd.c
+++ b/src/dd.c
@@ -353,10 +353,12 @@ main (int argc, char **argv)
error (1, errno, "%s", input_file);
}
else
- input_file = "standard input";
+ input_file = _("standard input");
if (input_fd == output_fd)
- error (1, 0, "standard %s is closed", input_fd == 0 ? "input" : "output");
+ error (1, 0, _("%s is closed"), (input_fd == 0
+ ? _("standard input")
+ : _("standard output")));
if (output_file != NULL)
{
@@ -376,7 +378,7 @@ main (int argc, char **argv)
#endif
}
else
- output_file = "standard output";
+ output_file = _("standard output");
#ifdef _POSIX_VERSION
sigaction (SIGINT, NULL, &sigact);
@@ -826,7 +828,7 @@ scanargs (int argc, char **argv)
val = strchr (name, '=');
if (val == NULL)
{
- error (0, 0, "unrecognized option `%s'", name);
+ error (0, 0, _("unrecognized option `%s'"), name);
usage (1);
}
*val++ = '\0';
@@ -841,7 +843,7 @@ scanargs (int argc, char **argv)
{
n = parse_integer (val);
if (n < 0)
- error (1, 0, "invalid number `%s'", val);
+ error (1, 0, _("invalid number `%s'"), val);
if (equal (name, "ibs"))
{
@@ -865,7 +867,7 @@ scanargs (int argc, char **argv)
max_records = n;
else
{
- error (0, 0, "unrecognized option `%s=%s'", name, val);
+ error (0, 0, _("unrecognized option `%s=%s'"), name, val);
usage (1);
}
}
@@ -951,7 +953,7 @@ parse_conversion (char *str)
}
if (conversions[i].convname == NULL)
{
- error (0, 0, "%s: invalid conversion", str);
+ error (0, 0, _("%s: invalid conversion"), str);
usage (1);
}
str = new;
@@ -971,8 +973,8 @@ apply_translations (void)
|| (MX (C_LCASE | C_UCASE) > 1)
|| (MX (C_UNBLOCK | C_SYNC) > 1))
{
- error (1, 0, "\
-only one conv in {ascii,ebcdic,ibm}, {lcase,ucase}, {block,unblock}, {unblock,sync}");
+ error (1, 0, _("\
+only one conv in {ascii,ebcdic,ibm}, {lcase,ucase}, {block,unblock}, {unblock,sync}"));
}
#undef MX
@@ -1033,10 +1035,10 @@ bit_count (register unsigned int i)
static void
print_stats (void)
{
- fprintf (stderr, "%u+%u records in\n", r_full, r_partial);
- fprintf (stderr, "%u+%u records out\n", w_full, w_partial);
+ fprintf (stderr, _("%u+%u records in\n"), r_full, r_partial);
+ fprintf (stderr, _("%u+%u records out\n"), w_full, w_partial);
if (r_truncate > 0)
- fprintf (stderr, "%u truncated record%s\n", r_truncate,
+ fprintf (stderr, _("%u truncated record%s\n"), r_truncate,
r_truncate == 1 ? "" : "s");
}
@@ -1062,12 +1064,12 @@ static void
usage (int status)
{
if (status != 0)
- fprintf (stderr, "Try `%s --help' for more information.\n",
+ fprintf (stderr, _("Try `%s --help' for more information.\n"),
program_name);
else
{
- printf ("Usage: %s [OPTION]...\n", program_name);
- printf ("\
+ printf (_("Usage: %s [OPTION]...\n"), program_name);
+ printf (_("\
Copy a file, converting and formatting according to the options.\n\
\n\
bs=BYTES force ibs=BYTES and obs=BYTES\n\
@@ -1095,7 +1097,7 @@ by w for x2, by b for x512, by k for x1024. Each KEYWORD may be:\n\
ucase change lower case to upper case\n\
swab swap every pair of input bytes\n\
noerror continue after read errors\n\
- sync pad every input block with NULs to ibs-size\n");
+ sync pad every input block with NULs to ibs-size\n"));
}
exit (status);
}
diff --git a/src/df.c b/src/df.c
index a8400ecdd..799ba2c75 100644
--- a/src/df.c
+++ b/src/df.c
@@ -223,7 +223,7 @@ main (int argc, char **argv)
if (strcmp (i->fs_name, j->fs_name) == 0)
{
error (0, 0,
- "file system type `%s' both selected and excluded",
+ _("file system type `%s' both selected and excluded"),
i->fs_name);
match = 1;
break;
@@ -261,7 +261,7 @@ main (int argc, char **argv)
show_all_fs);
if (mount_list == NULL)
- error (1, errno, "cannot read table of mounted filesystems");
+ error (1, errno, _("cannot read table of mounted filesystems"));
print_header ();
if (require_sync)
@@ -377,7 +377,7 @@ show_point (char *point, struct stat *statp)
return;
}
}
- error (0, 0, "cannot find mount point for %s", point);
+ error (0, 0, _("cannot find mount point for %s"), point);
exit_status = 1;
}
@@ -525,12 +525,12 @@ static void
usage (int status)
{
if (status != 0)
- fprintf (stderr, "Try `%s --help' for more information.\n",
+ fprintf (stderr, _("Try `%s --help' for more information.\n"),
program_name);
else
{
- printf ("Usage: %s [OPTION]... [FILE]...\n", program_name);
- printf ("\
+ printf (_("Usage: %s [OPTION]... [FILE]...\n"), program_name);
+ printf (_("\
Show information about the filesystem on which each FILE resides,\n\
or all filesystems by default.\n\
\n\
@@ -545,7 +545,7 @@ or all filesystems by default.\n\
-P, --portability use the POSIX output format\n\
-T, --print-type print filesystem type\n\
--help display this help and exit\n\
- --version output version information and exit\n");
+ --version output version information and exit\n"));
}
exit (status);
}
diff --git a/src/du.c b/src/du.c
index 0041232fa..b7c522912 100644
--- a/src/du.c
+++ b/src/du.c
@@ -193,12 +193,12 @@ usage (int status, char *reason)
program_name, reason);
if (status != 0)
- fprintf (stderr, "Try `%s --help' for more information.\n",
+ fprintf (stderr, _("Try `%s --help' for more information.\n"),
program_name);
else
{
- printf ("Usage: %s [OPTION]... [FILE]...\n", program_name);
- printf ("\
+ printf (_("Usage: %s [OPTION]... [FILE]...\n"), program_name);
+ printf (_("\
Summarize disk usage of each FILE, recursively for directories.\n\
\n\
-a, --all write counts for all files, not just directories\n\
@@ -212,7 +212,7 @@ Summarize disk usage of each FILE, recursively for directories.\n\
-L, --dereference dereference all symbolic links\n\
-S, --separate-dirs do not include size of subdirectories\n\
--help display this help and exit\n\
- --version output version information and exit\n");
+ --version output version information and exit\n"));
}
exit (status);
}
@@ -293,7 +293,7 @@ main (int argc, char **argv)
usage (0, NULL);
if (opt_all && opt_summarize_only)
- usage (2, "cannot both summarize and show all entries");
+ usage (2, _("cannot both summarize and show all entries"));
/* Initialize the hash structure for inode numbers. */
hash_init (INITIAL_HASH_MODULE, INITIAL_ENTRY_TAB_SIZE);
@@ -321,7 +321,7 @@ du_files (char **files)
/* Remember the inode and device number of the current directory. */
if (stat (".", &stat_buf))
- error (1, errno, "current directory");
+ error (1, errno, _("current directory"));
initial_ino = stat_buf.st_ino;
initial_dev = stat_buf.st_dev;
@@ -356,14 +356,14 @@ du_files (char **files)
error (1, errno, ".");
if (stat_buf.st_ino != initial_ino || stat_buf.st_dev != initial_dev)
{
- if (restore_cwd (&cwd, "starting directory", NULL))
+ if (restore_cwd (&cwd, _("starting directory"), NULL))
exit (1);
}
}
if (opt_combined_arguments)
{
- printf ("%ld\ttotal\n", output_size == size_bytes ? tot_size
+ printf (_("%ld\ttotal\n"), output_size == size_bytes ? tot_size
: convert_blocks (tot_size, output_size == size_kilobytes));
fflush (stdout);
}
@@ -432,7 +432,7 @@ count_entry (char *ent, int top, dev_t last_dev)
if (chdir (ent) < 0)
{
- error (0, errno, "cannot change to directory %s", path->text);
+ error (0, errno, _("cannot change to directory %s"), path->text);
exit_status = 1;
return 0;
}
@@ -451,13 +451,13 @@ count_entry (char *ent, int top, dev_t last_dev)
free_cwd (&cwd);
}
else if (chdir ("..") < 0)
- error (1, errno, "cannot change to `..' from directory %s",
+ error (1, errno, _("cannot change to `..' from directory %s"),
path->text);
exit_status = 1;
return 0;
}
else
- error (1, 0, "virtual memory exhausted");
+ error (1, 0, _("virtual memory exhausted"));
}
/* Remember the current path. */
@@ -483,7 +483,7 @@ count_entry (char *ent, int top, dev_t last_dev)
}
else if (chdir ("..") < 0)
error (1, errno,
- "cannot change to `..' from directory %s", path->text);
+ _("cannot change to `..' from directory %s"), path->text);
str_trunc (path, pathlen - 1); /* Remove the "/" we added. */
if (!opt_summarize_only || top)
diff --git a/src/install.c b/src/install.c
index dea82831f..1e32ef4cd 100644
--- a/src/install.c
+++ b/src/install.c
@@ -208,11 +208,11 @@ main (int argc, char **argv)
/* Check for invalid combinations of arguments. */
if (dir_arg && strip_files)
error (1, 0,
- "the strip option may not be used when installing a directory");
+ _("the strip option may not be used when installing a directory"));
if (optind == argc || (optind == argc - 1 && !dir_arg))
{
- error (0, 0, "too few arguments");
+ error (0, 0, _("too few arguments"));
usage (1);
}
@@ -220,9 +220,9 @@ main (int argc, char **argv)
{
struct mode_change *change = mode_compile (symbolic_mode, 0);
if (change == MODE_INVALID)
- error (1, 0, "invalid mode `%s'", symbolic_mode);
+ error (1, 0, _("invalid mode `%s'"), symbolic_mode);
else if (change == MODE_MEMORY_EXHAUSTED)
- error (1, 0, "virtual memory exhausted");
+ error (1, 0, _("virtual memory exhausted"));
mode = mode_adjust (0, change);
}
@@ -323,20 +323,20 @@ copy_file (char *from, char *to, int *to_created)
}
if (!S_ISREG (from_stats.st_mode))
{
- error (0, 0, "`%s' is not a regular file", from);
+ error (0, 0, _("`%s' is not a regular file"), from);
return 1;
}
if (stat (to, &to_stats) == 0)
{
if (!S_ISREG (to_stats.st_mode))
{
- error (0, 0, "`%s' is not a regular file", to);
+ error (0, 0, _("`%s' is not a regular file"), to);
return 1;
}
if (from_stats.st_dev == to_stats.st_dev
&& from_stats.st_ino == to_stats.st_ino)
{
- error (0, 0, "`%s' and `%s' are the same file", from, to);
+ error (0, 0, _("`%s' and `%s' are the same file"), from, to);
return 1;
}
/* If unlink fails, try to proceed anyway. */
@@ -449,11 +449,11 @@ strip (char *path)
switch (pid)
{
case -1:
- error (1, errno, "cannot fork");
+ error (1, errno, _("cannot fork"));
break;
case 0: /* Child. */
execlp ("strip", "strip", path, (char *) NULL);
- error (1, errno, "cannot run strip");
+ error (1, errno, _("cannot run strip"));
break;
default: /* Parent. */
/* Parent process. */
@@ -491,7 +491,7 @@ get_ids (void)
if (pw == NULL)
{
if (!is_number (owner_name))
- error (1, 0, "invalid user `%s'", owner_name);
+ error (1, 0, _("invalid user `%s'"), owner_name);
/* FIXME: atoi won't warn about overflow. Use xstrtoul. */
/* FIXME: eliminate is_number altogether! */
owner_id = atoi (owner_name);
@@ -509,7 +509,7 @@ get_ids (void)
if (gr == NULL)
{
if (!is_number (group_name))
- error (1, 0, "invalid group `%s'", group_name);
+ error (1, 0, _("invalid group `%s'"), group_name);
/* FIXME: atoi won't warn about overflow. Use xstrtoul. */
group_id = atoi (group_name);
}
@@ -525,17 +525,17 @@ static void
usage (int status)
{
if (status != 0)
- fprintf (stderr, "Try `%s --help' for more information.\n",
+ fprintf (stderr, _("Try `%s --help' for more information.\n"),
program_name);
else
{
- printf ("\
+ printf (_("\
Usage: %s [OPTION]... SOURCE DEST (1st format)\n\
or: %s [OPTION]... SOURCE... DIRECTORY (2nd format)\n\
or: %s -d [OPTION]... DIRECTORY... (3nd format)\n\
-",
+"),
program_name, program_name, program_name);
- printf ("\
+ printf (_("\
In first two formats, copy SOURCE to DEST or multiple SOURCE(s) to\n\
DIRECTORY, while setting permission modes and owner/group. In third\n\
format, make all components of the given DIRECTORY(ies).\n\
@@ -547,7 +547,7 @@ format, make all components of the given DIRECTORY(ies).\n\
-o, --owner=OWNER set ownership (super-user only)\n\
-s, --strip strip symbol tables, only for 1st and 2nd formats\n\
--help display this help and exit\n\
- --version output version information and exit\n");
+ --version output version information and exit\n"));
}
exit (status);
}
diff --git a/src/ln.c b/src/ln.c
index d4e644a5c..b23914c84 100644
--- a/src/ln.c
+++ b/src/ln.c
@@ -141,7 +141,7 @@ do_link (char *source, char *dest)
}
if (!hard_dir_link && S_ISDIR (source_stats.st_mode))
{
- error (0, 0, "%s: hard link not allowed for directory", source);
+ error (0, 0, _("%s: hard link not allowed for directory"), source);
return 1;
}
}
@@ -186,18 +186,18 @@ do_link (char *source, char *dest)
{
if (S_ISDIR (dest_stats.st_mode))
{
- error (0, 0, "%s: cannot overwrite directory", dest);
+ error (0, 0, _("%s: cannot overwrite directory"), dest);
return 1;
}
if (interactive)
{
- fprintf (stderr, "%s: replace `%s'? ", program_name, dest);
+ fprintf (stderr, _("%s: replace `%s'? "), program_name, dest);
if (!yesno ())
return 0;
}
else if (!remove_existing_files)
{
- error (0, 0, "%s: File exists", dest);
+ error (0, 0, _("%s: File exists"), dest);
return 1;
}
@@ -205,7 +205,7 @@ do_link (char *source, char *dest)
{
char *tmp_backup = find_backup_file_name (dest);
if (tmp_backup == NULL)
- error (1, 0, "virtual memory exhausted");
+ error (1, 0, _("virtual memory exhausted"));
dest_backup = (char *) alloca (strlen (tmp_backup) + 1);
strcpy (dest_backup, tmp_backup);
free (tmp_backup);
@@ -213,7 +213,7 @@ do_link (char *source, char *dest)
{
if (errno != ENOENT)
{
- error (0, errno, "cannot backup `%s'", dest);
+ error (0, errno, _("cannot backup `%s'"), dest);
return 1;
}
else
@@ -222,7 +222,7 @@ do_link (char *source, char *dest)
}
else if (unlink (dest) && errno != ENOENT)
{
- error (0, errno, "cannot remove `%s'", dest);
+ error (0, errno, _("cannot remove `%s'"), dest);
return 1;
}
}
@@ -240,9 +240,9 @@ do_link (char *source, char *dest)
return 0;
}
- error (0, errno, "cannot %slink `%s' to `%s'",
+ error (0, errno, _("cannot %slink `%s' to `%s'"),
#ifdef S_ISLNK
- symbolic_link ? "symbolic " : "",
+ symbolic_link ? _("symbolic ") : "",
#else
"",
#endif
@@ -251,7 +251,7 @@ do_link (char *source, char *dest)
if (dest_backup)
{
if (rename (dest_backup, dest))
- error (0, errno, "cannot un-backup `%s'", dest);
+ error (0, errno, _("cannot un-backup `%s'"), dest);
}
return 1;
}
@@ -260,16 +260,16 @@ static void
usage (int status)
{
if (status != 0)
- fprintf (stderr, "Try `%s --help' for more information.\n",
+ fprintf (stderr, _("Try `%s --help' for more information.\n"),
program_name);
else
{
- printf ("\
+ printf (_("\
Usage: %s [OPTION]... SOURCE [DEST]\n\
or: %s [OPTION]... SOURCE... DIRECTORY\n\
-",
+"),
program_name, program_name);
- printf ("\
+ printf (_("\
Link SOURCE to DEST (. by default), or multiple SOURCE(s) to DIRECTORY.\n\
Makes hard links by default, symbolic links with -s.\n\
\n\
@@ -291,7 +291,7 @@ version control may be set with VERSION_CONTROL, values are:\n\
\n\
t, numbered make numbered backups\n\
nil, existing numbered if numbered backups exist, simple otherwise\n\
- never, simple always make simple backups\n");
+ never, simple always make simple backups\n"));
}
exit (status);
}
@@ -344,7 +344,7 @@ main (int argc, char **argv)
#ifdef S_ISLNK
symbolic_link = 1;
#else
- error (1, 0, "symbolic links are not supported on this system");
+ error (1, 0, _("symbolic links are not supported on this system"));
#endif
break;
case 'v':
@@ -373,7 +373,7 @@ main (int argc, char **argv)
if (optind == argc)
{
- error (0, 0, "missing file argument");
+ error (0, 0, _("missing file argument"));
usage (1);
}
@@ -420,7 +420,7 @@ main (int argc, char **argv)
to = argv[argc - 1];
if (!isdir (to))
- error (1, 0, "when making multiple links, last argument must be a directory");
+ error (1, 0, _("when making multiple links, last argument must be a directory"));
for (; optind < argc - 1; ++optind)
errors += do_link (argv[optind], to);
}
diff --git a/src/ls.c b/src/ls.c
index 8d234877d..e1efb9cd7 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -796,7 +796,7 @@ decode_switches (int argc, char **argv)
if (tabsize < 1)
{
error (0, 0,
- "ignoring invalid tab size in enironment variable TABSIZE: %s",
+ _("ignoring invalid tab size in enironment variable TABSIZE: %s"),
optarg);
tabsize = 8;
}
@@ -870,7 +870,7 @@ decode_switches (int argc, char **argv)
i = argmatch (optarg, color_args);
if (i < 0)
{
- invalid_arg ("colorization criterion", optarg, i);
+ invalid_arg (_("colorization criterion"), optarg, i);
usage (1);
}
i = color_types[i];
@@ -920,7 +920,7 @@ decode_switches (int argc, char **argv)
case 'w':
line_length = atoi (optarg);
if (line_length < 1)
- error (1, 0, "invalid line width: %s", optarg);
+ error (1, 0, _("invalid line width: %s"), optarg);
break;
case 'x':
@@ -982,7 +982,7 @@ decode_switches (int argc, char **argv)
case 'T':
tabsize = atoi (optarg);
if (tabsize < 1)
- error (1, 0, "invalid tab size: %s", optarg);
+ error (1, 0, _("invalid tab size: %s"), optarg);
break;
case 'U':
@@ -1009,7 +1009,7 @@ decode_switches (int argc, char **argv)
i = argmatch (optarg, sort_args);
if (i < 0)
{
- invalid_arg ("sort type", optarg, i);
+ invalid_arg (_("sort type"), optarg, i);
usage (1);
}
sort_type = sort_types[i];
@@ -1019,7 +1019,7 @@ decode_switches (int argc, char **argv)
i = argmatch (optarg, time_args);
if (i < 0)
{
- invalid_arg ("time type", optarg, i);
+ invalid_arg (_("time type"), optarg, i);
usage (1);
}
time_type = time_types[i];
@@ -1029,7 +1029,7 @@ decode_switches (int argc, char **argv)
i = argmatch (optarg, format_args);
if (i < 0)
{
- invalid_arg ("format type", optarg, i);
+ invalid_arg (_("format type"), optarg, i);
usage (1);
}
format = formats[i];
@@ -1288,7 +1288,7 @@ parse_ls_color (void)
if (state < 0)
{
- error (0, 0, "bad %s variable\n", whichvar);
+ error (0, 0, _("bad %s variable\n"), whichvar);
print_with_color = 0;
}
}
@@ -2530,12 +2530,12 @@ static void
usage (int status)
{
if (status != 0)
- fprintf (stderr, "Try `%s --help' for more information.\n",
+ fprintf (stderr, _("Try `%s --help' for more information.\n"),
program_name);
else
{
- printf ("Usage: %s [OPTION]... [FILE]...\n", program_name);
- printf ("\
+ printf (_("Usage: %s [OPTION]... [FILE]...\n"), program_name);
+ printf (_("\
List information about the FILEs (the current directory by default).\n\
Sort entries alphabetically if none of -cftuSUX nor --sort.\n\
\n\
@@ -2551,9 +2551,9 @@ Sort entries alphabetically if none of -cftuSUX nor --sort.\n\
-f do not sort, enable -aU, disable -lst\n\
--format=WORD across -x, commas -m, horizontal -x, long -l,\n\
single-column -1, verbose -l, vertical -C\n\
- --full-time list both full date and full time\n");
+ --full-time list both full date and full time\n"));
- printf ("\
+ printf (_("\
-G, --no-group inhibit display of group information\n\
-g (ignored)\n\
-I, --ignore=PATTERN do not list implied entries matching shell PATTERN\n\
@@ -2571,9 +2571,9 @@ Sort entries alphabetically if none of -cftuSUX nor --sort.\n\
-q, --hide-control-chars print ? instead of non graphic characters\n\
-R, --recursive list subdirectories recursively\n\
-r, --reverse reverse order while sorting\n\
- -S sort by file size\n");
+ -S sort by file size\n"));
- printf ("\
+ printf (_("\
-s, --size print block size of each file\n\
--sort=WORD ctime -c, extension -X, none -U, size -S,\n\
status -c, time -t\n\
@@ -2589,7 +2589,7 @@ Sort entries alphabetically if none of -cftuSUX nor --sort.\n\
-7, --7bit allow only 7-bit ASCII characters to be printed\n\
-8, --8bit allow 8-bit ISO 8859 characters to be printed\n\
--help display this help and exit\n\
- --version output version information and exit");
+ --version output version information and exit"));
}
exit (status);
}
diff --git a/src/mkdir.c b/src/mkdir.c
index 6b4aad8d3..3e52dd636 100644
--- a/src/mkdir.c
+++ b/src/mkdir.c
@@ -64,18 +64,18 @@ static void
usage (int status)
{
if (status != 0)
- fprintf (stderr, "Try `%s --help' for more information.\n",
+ fprintf (stderr, _("Try `%s --help' for more information.\n"),
program_name);
else
{
- printf ("Usage: %s [OPTION] DIRECTORY...\n", program_name);
- printf ("\
+ printf (_("Usage: %s [OPTION] DIRECTORY...\n"), program_name);
+ printf (_("\
Create the DIRECTORY(ies), if they do not already exist.\n\
\n\
-p, --parents no error if existing, make parent directories as needed\n\
-m, --mode=MODE set permission mode (as in chmod), not rwxrwxrwx - umask\n\
--help display this help and exit\n\
- --version output version information and exit\n");
+ --version output version information and exit\n"));
}
exit (status);
}
@@ -121,7 +121,7 @@ main (int argc, char **argv)
if (optind == argc)
{
- error (0, 0, "too few arguments");
+ error (0, 0, _("too few arguments"));
usage (1);
}
@@ -131,9 +131,9 @@ main (int argc, char **argv)
{
struct mode_change *change = mode_compile (symbolic_mode, 0);
if (change == MODE_INVALID)
- error (1, 0, "invalid mode `%s'", symbolic_mode);
+ error (1, 0, _("invalid mode `%s'"), symbolic_mode);
else if (change == MODE_MEMORY_EXHAUSTED)
- error (1, 0, "virtual memory exhausted");
+ error (1, 0, _("virtual memory exhausted"));
newmode = mode_adjust (newmode, change);
}
@@ -146,7 +146,7 @@ main (int argc, char **argv)
}
else if (mkdir (argv[optind], newmode))
{
- error (0, errno, "cannot make directory `%s'", argv[optind]);
+ error (0, errno, _("cannot make directory `%s'"), argv[optind]);
errors = 1;
}
}
diff --git a/src/mkfifo.c b/src/mkfifo.c
index ec33aef50..d76135553 100644
--- a/src/mkfifo.c
+++ b/src/mkfifo.c
@@ -54,17 +54,17 @@ static void
usage (int status)
{
if (status != 0)
- fprintf (stderr, "Try `%s --help' for more information.\n",
+ fprintf (stderr, _("Try `%s --help' for more information.\n"),
program_name);
else
{
- printf ("Usage: %s [OPTION] NAME...\n", program_name);
- printf ("\
+ printf (_("Usage: %s [OPTION] NAME...\n"), program_name);
+ printf (_("\
Create named pipes (FIFOs) with the given NAMEs.\n\
\n\
-m, --mode=MODE set permission mode (as in chmod), not 0666 - umask\n\
--help display this help and exit\n\
- --version output version information and exit\n");
+ --version output version information and exit\n"));
}
exit (status);
}
@@ -83,7 +83,7 @@ main (int argc, char **argv)
symbolic_mode = NULL;
#ifndef S_ISFIFO
- error (4, 0, "fifo files not supported");
+ error (4, 0, _("fifo files not supported"));
#else
while ((optc = getopt_long (argc, argv, "m:", longopts, (int *) 0)) != EOF)
{
@@ -110,7 +110,7 @@ main (int argc, char **argv)
if (optind == argc)
{
- error (0, 0, "too few arguments");
+ error (0, 0, _("too few arguments"));
usage (1);
}
@@ -119,9 +119,9 @@ main (int argc, char **argv)
{
change = mode_compile (symbolic_mode, 0);
if (change == MODE_INVALID)
- error (1, 0, "invalid mode");
+ error (1, 0, _("invalid mode"));
else if (change == MODE_MEMORY_EXHAUSTED)
- error (1, 0, "virtual memory exhausted");
+ error (1, 0, _("virtual memory exhausted"));
newmode = mode_adjust (newmode, change);
}
@@ -129,7 +129,7 @@ main (int argc, char **argv)
{
if (mkfifo (argv[optind], newmode))
{
- error (0, errno, "cannot make fifo `%s'", argv[optind]);
+ error (0, errno, _("cannot make fifo `%s'"), argv[optind]);
errors = 1;
}
}
diff --git a/src/mknod.c b/src/mknod.c
index 580ccae2e..5e00ea975 100644
--- a/src/mknod.c
+++ b/src/mknod.c
@@ -59,12 +59,12 @@ static void
usage (int status)
{
if (status != 0)
- fprintf (stderr, "Try `%s --help' for more information.\n",
+ fprintf (stderr, _("Try `%s --help' for more information.\n"),
program_name);
else
{
- printf ("Usage: %s [OPTION]... NAME TYPE [MAJOR MINOR]\n", program_name);
- printf ("\
+ printf (_("Usage: %s [OPTION]... NAME TYPE [MAJOR MINOR]\n"), program_name);
+ printf (_("\
Create the special file NAME of the given TYPE.\n\
\n\
-m, --mode=MODE set permission mode (as in chmod), not 0666 - umask\n\
@@ -75,7 +75,7 @@ MAJOR MINOR are forbidden for TYPE p, mandatory otherwise. TYPE may be:\n\
\n\
b create a block (buffered) special file\n\
c, u create a character (unbuffered) special file \n\
- p create a FIFO\n");
+ p create a FIFO\n"));
}
exit (status);
}
@@ -122,9 +122,9 @@ main (int argc, char **argv)
{
change = mode_compile (symbolic_mode, 0);
if (change == MODE_INVALID)
- error (1, 0, "invalid mode");
+ error (1, 0, _("invalid mode"));
else if (change == MODE_MEMORY_EXHAUSTED)
- error (1, 0, "virtual memory exhausted");
+ error (1, 0, _("virtual memory exhausted"));
newmode = mode_adjust (newmode, change);
}
@@ -132,11 +132,11 @@ main (int argc, char **argv)
{
const char *msg;
if (argc - optind < 2)
- msg = "too few arguments";
+ msg = _("too few arguments");
else if (argc - optind > 4)
- msg = "too many arguments";
+ msg = _("too many arguments");
else
- msg = "wrong number of arguments";
+ msg = _("wrong number of arguments");
error (0, 0, msg);
usage (1);
}
@@ -148,23 +148,23 @@ main (int argc, char **argv)
{
case 'b': /* `block' or `buffered' */
#ifndef S_IFBLK
- error (4, 0, "block special files not supported");
+ error (4, 0, _("block special files not supported"));
#else
if (argc - optind != 4)
{
- error (0, 0, "\
+ error (0, 0, _("\
when creating block special files, major and minor device\n\
-numbers must be specified");
+numbers must be specified"));
usage (1);
}
s = argv[optind + 2];
if (xstrtol (s, NULL, 0, &tmp_major, NULL) != LONGINT_OK)
- error (1, 0, "invalid major device number `%s'", s);
+ error (1, 0, _("invalid major device number `%s'"), s);
s = argv[optind + 3];
if (xstrtol (s, NULL, 0, &tmp_minor, NULL) != LONGINT_OK)
- error (1, 0, "invalid minor device number `%s'", s);
+ error (1, 0, _("invalid minor device number `%s'"), s);
i_major = (int) tmp_major;
i_minor = (int) tmp_minor;
@@ -177,23 +177,23 @@ numbers must be specified");
case 'c': /* `character' */
case 'u': /* `unbuffered' */
#ifndef S_IFCHR
- error (4, 0, "character special files not supported");
+ error (4, 0, _("character special files not supported"));
#else
if (argc - optind != 4)
{
- error (0, 0, "\
+ error (0, 0, _("\
when creating character special files, major and minor device\n\
-numbers must be specified");
+numbers must be specified"));
usage (1);
}
s = argv[optind + 2];
if (xstrtol (s, NULL, 0, &tmp_major, NULL) != LONGINT_OK)
- error (1, 0, "invalid major device number `%s'", s);
+ error (1, 0, _("invalid major device number `%s'"), s);
s = argv[optind + 3];
if (xstrtol (s, NULL, 0, &tmp_minor, NULL) != LONGINT_OK)
- error (1, 0, "invalid minor device number `%s'", s);
+ error (1, 0, _("invalid minor device number `%s'"), s);
i_major = (int) tmp_major;
i_minor = (int) tmp_minor;
@@ -205,12 +205,12 @@ numbers must be specified");
case 'p': /* `pipe' */
#ifndef S_ISFIFO
- error (4, 0, "fifo files not supported");
+ error (4, 0, _("fifo files not supported"));
#else
if (argc - optind != 2)
{
- error (0, 0, "\
-major and minor device numbers may not be specified for fifo files");
+ error (0, 0, _("\
+major and minor device numbers may not be specified for fifo files"));
usage (1);
}
if (mkfifo (argv[optind], newmode))
diff --git a/src/mv.c b/src/mv.c
index 089a261c3..c24cdcc4f 100644
--- a/src/mv.c
+++ b/src/mv.c
@@ -134,14 +134,14 @@ copy_reg (char *source, char *dest)
if (!S_ISREG (source_stats.st_mode))
{
- error (0, 0, "cannot move `%s' across filesystems: Not a regular file",
+ error (0, 0, _("cannot move `%s' across filesystems: Not a regular file"),
source);
return 1;
}
if (unlink (dest) && errno != ENOENT)
{
- error (0, errno, "cannot remove `%s'", dest);
+ error (0, errno, _("cannot remove `%s'"), dest);
return 1;
}
@@ -245,13 +245,13 @@ do_move (char *source, char *dest)
if (source_stats.st_dev == dest_stats.st_dev
&& source_stats.st_ino == dest_stats.st_ino)
{
- error (0, 0, "`%s' and `%s' are the same file", source, dest);
+ error (0, 0, _("`%s' and `%s' are the same file"), source, dest);
return 1;
}
if (S_ISDIR (dest_stats.st_mode))
{
- error (0, 0, "%s: cannot overwrite directory", dest);
+ error (0, 0, _("%s: cannot overwrite directory"), dest);
return 1;
}
@@ -262,7 +262,7 @@ do_move (char *source, char *dest)
if (!override_mode && (interactive || stdin_tty)
&& euidaccess (dest, W_OK))
{
- fprintf (stderr, "%s: replace `%s', overriding mode %04o? ",
+ fprintf (stderr, _("%s: replace `%s', overriding mode %04o? "),
program_name, dest,
(unsigned int) (dest_stats.st_mode & 07777));
if (!yesno ())
@@ -270,7 +270,7 @@ do_move (char *source, char *dest)
}
else if (interactive)
{
- fprintf (stderr, "%s: replace `%s'? ", program_name, dest);
+ fprintf (stderr, _("%s: replace `%s'? "), program_name, dest);
if (!yesno ())
return 0;
}
@@ -279,7 +279,7 @@ do_move (char *source, char *dest)
{
char *tmp_backup = find_backup_file_name (dest);
if (tmp_backup == NULL)
- error (1, 0, "virtual memory exhausted");
+ error (1, 0, _("virtual memory exhausted"));
dest_backup = (char *) alloca (strlen (tmp_backup) + 1);
strcpy (dest_backup, tmp_backup);
free (tmp_backup);
@@ -287,7 +287,7 @@ do_move (char *source, char *dest)
{
if (errno != ENOENT)
{
- error (0, errno, "cannot backup `%s'", dest);
+ error (0, errno, _("cannot backup `%s'"), dest);
return 1;
}
else
@@ -311,7 +311,7 @@ do_move (char *source, char *dest)
if (errno != EXDEV)
{
- error (0, errno, "cannot move `%s' to `%s'", source, dest);
+ error (0, errno, _("cannot move `%s' to `%s'"), source, dest);
goto un_backup;
}
@@ -322,7 +322,7 @@ do_move (char *source, char *dest)
if (unlink (source))
{
- error (0, errno, "cannot remove `%s'", source);
+ error (0, errno, _("cannot remove `%s'"), source);
return 1;
}
@@ -332,7 +332,7 @@ do_move (char *source, char *dest)
if (dest_backup)
{
if (rename (dest_backup, dest))
- error (0, errno, "cannot un-backup `%s'", dest);
+ error (0, errno, _("cannot un-backup `%s'"), dest);
}
return 1;
}
@@ -368,16 +368,16 @@ static void
usage (int status)
{
if (status != 0)
- fprintf (stderr, "Try `%s --help' for more information.\n",
+ fprintf (stderr, _("Try `%s --help' for more information.\n"),
program_name);
else
{
- printf ("\
+ printf (_("\
Usage: %s [OPTION]... SOURCE DEST\n\
or: %s [OPTION]... SOURCE... DIRECTORY\n\
-",
+"),
program_name, program_name);
- printf ("\
+ printf (_("\
Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY.\n\
\n\
-b, --backup make backup before removal\n\
@@ -395,7 +395,7 @@ version control may be set with VERSION_CONTROL, values are:\n\
\n\
t, numbered make numbered backups\n\
nil, existing numbered if numbered backups exist, simple otherwise\n\
- never, simple always make simple backups \n");
+ never, simple always make simple backups \n"));
}
exit (status);
}
@@ -463,7 +463,7 @@ main (int argc, char **argv)
if (argc < optind + 2)
{
- error (0, 0, "missing file argument%s", argc == optind ? "s" : "");
+ error (0, 0, _("missing file argument%s"), argc == optind ? "s" : "");
usage (1);
}
@@ -474,7 +474,7 @@ main (int argc, char **argv)
if (argc > optind + 2 && !isdir (argv[argc - 1]))
error (1, 0,
- "when moving multiple files, last argument must be a directory");
+ _("when moving multiple files, last argument must be a directory"));
/* Move each arg but the last onto the last. */
for (; optind < argc - 1; ++optind)
diff --git a/src/rm.c b/src/rm.c
index 26c528699..7a9503258 100644
--- a/src/rm.c
+++ b/src/rm.c
@@ -167,7 +167,7 @@ main (int argc, char **argv)
exit (0);
else
{
- error (0, 0, "too few arguments");
+ error (0, 0, _("too few arguments"));
usage (1);
}
}
@@ -207,7 +207,7 @@ rm (void)
if (base[0] == '.' && (base[1] == '\0'
|| (base[1] == '.' && base[2] == '\0')))
{
- error (0, 0, "cannot remove `.' or `..'");
+ error (0, 0, _("cannot remove `.' or `..'"));
return 1;
}
@@ -239,9 +239,9 @@ remove_file (struct stat *statp)
#endif
)
{
- fprintf (stderr, "%s: remove %s`%s', overriding mode %04o? ",
+ fprintf (stderr, _("%s: remove %s`%s', overriding mode %04o? "),
program_name,
- S_ISDIR (statp->st_mode) ? "directory " : "",
+ S_ISDIR (statp->st_mode) ? _("directory ") : "",
pathname,
(unsigned int) (statp->st_mode & 07777));
if (!yesno ())
@@ -249,8 +249,8 @@ remove_file (struct stat *statp)
}
else if (interactive)
{
- fprintf (stderr, "%s: remove %s`%s'? ", program_name,
- S_ISDIR (statp->st_mode) ? "directory " : "",
+ fprintf (stderr, _("%s: remove %s`%s'? "), program_name,
+ S_ISDIR (statp->st_mode) ? _("directory ") : "",
pathname);
if (!yesno ())
return 1;
@@ -279,7 +279,7 @@ remove_dir (struct stat *statp)
if (!recursive)
{
- error (0, 0, "%s: is a directory", pathname);
+ error (0, 0, _("%s: is a directory"), pathname);
return 1;
}
@@ -287,7 +287,7 @@ remove_dir (struct stat *statp)
&& euidaccess (pathname, W_OK))
{
fprintf (stderr,
- "%s: descend directory `%s', overriding mode %04o? ",
+ _("%s: descend directory `%s', overriding mode %04o? "),
program_name, pathname,
(unsigned int) (statp->st_mode & 07777));
if (!yesno ())
@@ -295,7 +295,7 @@ remove_dir (struct stat *statp)
}
else if (interactive)
{
- fprintf (stderr, "%s: descend directory `%s'? ",
+ fprintf (stderr, _("%s: descend directory `%s'? "),
program_name, pathname);
if (!yesno ())
return 1;
@@ -309,10 +309,10 @@ remove_dir (struct stat *statp)
if (interactive)
{
if (err)
- fprintf (stderr, "%s: remove directory `%s' (might be nonempty)? ",
+ fprintf (stderr, _("%s: remove directory `%s' (might be nonempty)? "),
program_name, pathname);
else
- fprintf (stderr, "%s: remove directory `%s'? ",
+ fprintf (stderr, _("%s: remove directory `%s'? "),
program_name, pathname);
if (!yesno ())
return 1;
@@ -487,19 +487,19 @@ duplicate_entry (struct pathstack *stack, ino_t inum)
{
if (p->inum == inum)
{
- fprintf (stderr, "\
+ fprintf (stderr, _("\
%s: WARNING: Circular directory structure.\n\
This almost certainly means that you have a corrupted file system.\n\
NOTIFY YOUR SYSTEM MANAGER.\n\
Cycle detected:\n\
%s\n\
-is the same file as\n", program_name, pathname);
+is the same file as\n"), program_name, pathname);
*p->pathp = '\0'; /* Truncate pathname. */
fprintf (stderr, "%s\n", pathname);
*p->pathp = '/'; /* Put it back. */
if (interactive)
{
- fprintf (stderr, "%s: continue? ", program_name);
+ fprintf (stderr, _("%s: continue? "), program_name);
if (!yesno ())
exit (1);
return 1;
@@ -516,12 +516,12 @@ static void
usage (int status)
{
if (status != 0)
- fprintf (stderr, "Try `%s --help' for more information.\n",
+ fprintf (stderr, _("Try `%s --help' for more information.\n"),
program_name);
else
{
- printf ("Usage: %s [OPTION]... FILE...\n", program_name);
- printf ("\
+ printf (_("Usage: %s [OPTION]... FILE...\n"), program_name);
+ printf (_("\
Remove (unlink) the FILE(s).\n\
\n\
-d, --directory unlink directory, even if non-empty (super-user only)\n\
@@ -530,7 +530,7 @@ Remove (unlink) the FILE(s).\n\
-v, --verbose explain what is being done\n\
-r, -R, --recursive remove the contents of directories recursively\n\
--help display this help and exit\n\
- --version output version information and exit\n");
+ --version output version information and exit\n"));
}
exit (status);
}
diff --git a/src/rmdir.c b/src/rmdir.c
index 13593fb0a..2902b2734 100644
--- a/src/rmdir.c
+++ b/src/rmdir.c
@@ -80,17 +80,17 @@ static void
usage (int status)
{
if (status != 0)
- fprintf (stderr, "Try `%s --help' for more information.\n",
+ fprintf (stderr, _("Try `%s --help' for more information.\n"),
program_name);
else
{
- printf ("Usage: %s [OPTION]... DIRECTORY...\n", program_name);
- printf ("\
+ printf (_("Usage: %s [OPTION]... DIRECTORY...\n"), program_name);
+ printf (_("\
Remove the DIRECTORY(ies), if they are empty.\n\
\n\
-p, --parents remove explicit parent directories if being emptied\n\
--help display this help and exit\n\
- --version output version information and exit\n");
+ --version output version information and exit\n"));
}
exit (status);
}
@@ -129,7 +129,7 @@ main (int argc, char **argv)
if (optind == argc)
{
- error (0, 0, "too few arguments");
+ error (0, 0, _("too few arguments"));
usage (1);
}
diff --git a/src/sync.c b/src/sync.c
index e7f4d44fb..be6632d45 100644
--- a/src/sync.c
+++ b/src/sync.c
@@ -33,17 +33,17 @@ static void
usage (int status)
{
if (status != 0)
- fprintf (stderr, "Try `%s --help' for more information.\n",
+ fprintf (stderr, _("Try `%s --help' for more information.\n"),
program_name);
else
{
- printf ("Usage: %s [OPTION]\n", program_name);
- printf ("\
+ printf (_("Usage: %s [OPTION]\n"), program_name);
+ printf (_("\
Force changed blocks to disk, update the super block.\n\
\n\
--help display this help and exit\n\
--version output version information and exit\n\
-");
+"));
}
exit (status);
}
@@ -56,7 +56,7 @@ main (int argc, char **argv)
parse_long_options (argc, argv, "sync", version_string, usage);
if (argc != 1)
- error (0, 0, "ignoring all arguments");
+ error (0, 0, _("ignoring all arguments"));
sync ();
exit (0);
diff --git a/src/touch.c b/src/touch.c
index c49ddb28c..961d365cd 100644
--- a/src/touch.c
+++ b/src/touch.c
@@ -242,12 +242,12 @@ static void
usage (int status)
{
if (status != 0)
- fprintf (stderr, "Try `%s --help' for more information.\n",
+ fprintf (stderr, _("Try `%s --help' for more information.\n"),
program_name);
else
{
- printf ("Usage: %s [OPTION]... FILE...\n", program_name);
- printf ("\
+ printf (_("Usage: %s [OPTION]... FILE...\n"), program_name);
+ printf (_("\
Update the access and modification times of each FILE to the current time.\n\
\n\
-a change only the access time\n\
@@ -261,7 +261,7 @@ Update the access and modification times of each FILE to the current time.\n\
--time=WORD access -a, atime -a, mtime -m, modify -m, use -a\n\
--version output version information and exit\n\
\n\
-STAMP may be used without -t if none of -drt, nor --, are used.\n");
+STAMP may be used without -t if none of -drt, nor --, are used.\n"));
}
exit (status);
}
@@ -297,7 +297,7 @@ main (int argc, char **argv)
flexible_date++;
newtime = get_date (optarg, NULL);
if (newtime == (time_t) -1)
- error (1, 0, "invalid date format `%s'", optarg);
+ error (1, 0, _("invalid date format `%s'"), optarg);
date_set++;
break;
@@ -317,7 +317,7 @@ main (int argc, char **argv)
posix_date++;
newtime = posixtime (optarg);
if (newtime == (time_t) -1)
- error (1, 0, "invalid date format `%s'", optarg);
+ error (1, 0, _("invalid date format `%s'"), optarg);
date_set++;
break;
@@ -325,7 +325,7 @@ main (int argc, char **argv)
i = argmatch (optarg, time_args);
if (i < 0)
{
- invalid_arg ("time selector", optarg, i);
+ invalid_arg (_("time selector"), optarg, i);
usage (1);
}
change_times |= time_masks[i];
@@ -351,7 +351,7 @@ main (int argc, char **argv)
if ((use_ref && (posix_date || flexible_date))
|| (posix_date && flexible_date))
{
- error (0, 0, "cannot specify times from more than one source");
+ error (0, 0, _("cannot specify times from more than one source"));
usage (1);
}
@@ -381,7 +381,7 @@ main (int argc, char **argv)
if (optind == argc)
{
- error (0, 0, "file arguments missing");
+ error (0, 0, _("file arguments missing"));
usage (1);
}