mirror of
git://git.sv.gnu.org/coreutils.git
synced 2026-07-28 11:29:09 +02:00
standardize some error messages
* maint.mk: (sc_error_message_warn_fatal, sc_error_message_uppercase): (sc_error_message_period): Add automatic checks for non-standard error messages. * .x-sc_error_message_uppercase: explicit exclusion for this check * src/cp.c: Standardize some error messages. * src/date.c: Likewise. * src/dircolors.c: Likewise. * src/du.c: Likewise. * src/expr.c: Likewise. * src/install.c: Likewise. * src/join.c: Likewise. * src/ln.c: Likewise. * src/mv.c: Likewise. * src/od.c: Likewise. * src/pr.c: Likewise. * src/split.c: Likewise. * src/truncate.c: Likewise. * src/wc.c: Likewise. * tests/du/files0-from: Expect new error message. * tests/misc/join: Likewise. * tests/misc/split-a: Likewise. * tests/misc/wc-files0-from: Likewise. * tests/misc/xstrtol: Likewise. * lib/xmemxfrm.c: Likewise.
This commit is contained in:
committed by
Jim Meyering
parent
68158e6b10
commit
6eec737ade
@@ -592,7 +592,7 @@ do_copy (int n_files, char **file, const char *target_directory,
|
||||
{
|
||||
if (target_directory)
|
||||
error (EXIT_FAILURE, 0,
|
||||
_("Cannot combine --target-directory (-t) "
|
||||
_("cannot combine --target-directory (-t) "
|
||||
"and --no-target-directory (-T)"));
|
||||
if (2 < n_files)
|
||||
{
|
||||
|
||||
+2
-2
@@ -441,8 +441,8 @@ main (int argc, char **argv)
|
||||
{
|
||||
error (0, 0,
|
||||
_("the argument %s lacks a leading `+';\n"
|
||||
"When using an option to specify date(s), any non-option\n"
|
||||
"argument must be a format string beginning with `+'."),
|
||||
"when using an option to specify date(s), any non-option\n"
|
||||
"argument must be a format string beginning with `+'"),
|
||||
quote (argv[optind]));
|
||||
usage (EXIT_FAILURE);
|
||||
}
|
||||
|
||||
+2
-2
@@ -448,8 +448,8 @@ to select a shell syntax are mutually exclusive"));
|
||||
error (0, 0, _("extra operand %s"), quote (argv[!print_database]));
|
||||
if (print_database)
|
||||
fprintf (stderr, "%s\n",
|
||||
_("File operands cannot be combined with "
|
||||
"--print-database (-p)."));
|
||||
_("file operands cannot be combined with "
|
||||
"--print-database (-p)"));
|
||||
usage (EXIT_FAILURE);
|
||||
}
|
||||
|
||||
|
||||
@@ -937,7 +937,7 @@ main (int argc, char **argv)
|
||||
{
|
||||
error (0, 0, _("extra operand %s"), quote (argv[optind]));
|
||||
fprintf (stderr, "%s\n",
|
||||
_("File operands cannot be combined with --files0-from."));
|
||||
_("file operands cannot be combined with --files0-from"));
|
||||
usage (EXIT_FAILURE);
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -777,9 +777,9 @@ eval2 (bool evaluate)
|
||||
if (errno)
|
||||
{
|
||||
error (0, errno, _("string comparison failed"));
|
||||
error (0, 0, _("Set LC_ALL='C' to work around the problem."));
|
||||
error (0, 0, _("set LC_ALL='C' to work around the problem"));
|
||||
error (EXPR_INVALID, 0,
|
||||
_("The strings compared were %s and %s."),
|
||||
_("the strings compared were %s and %s"),
|
||||
quotearg_n_style (0, locale_quoting_style, l->u.s),
|
||||
quotearg_n_style (1, locale_quoting_style, r->u.s));
|
||||
}
|
||||
|
||||
+5
-5
@@ -420,8 +420,8 @@ main (int argc, char **argv)
|
||||
case PRESERVE_CONTEXT_OPTION:
|
||||
if ( ! selinux_enabled)
|
||||
{
|
||||
error (0, 0, _("Warning: ignoring --preserve-context; "
|
||||
"this kernel is not SELinux-enabled."));
|
||||
error (0, 0, _("WARNING: ignoring --preserve-context; "
|
||||
"this kernel is not SELinux-enabled"));
|
||||
break;
|
||||
}
|
||||
x.preserve_security_context = true;
|
||||
@@ -430,8 +430,8 @@ main (int argc, char **argv)
|
||||
case 'Z':
|
||||
if ( ! selinux_enabled)
|
||||
{
|
||||
error (0, 0, _("Warning: ignoring --context (-Z); "
|
||||
"this kernel is not SELinux-enabled."));
|
||||
error (0, 0, _("WARNING: ignoring --context (-Z); "
|
||||
"this kernel is not SELinux-enabled"));
|
||||
break;
|
||||
}
|
||||
scontext = optarg;
|
||||
@@ -487,7 +487,7 @@ main (int argc, char **argv)
|
||||
{
|
||||
if (target_directory)
|
||||
error (EXIT_FAILURE, 0,
|
||||
_("Cannot combine --target-directory (-t) "
|
||||
_("cannot combine --target-directory (-t) "
|
||||
"and --no-target-directory (-T)"));
|
||||
if (2 < n_files)
|
||||
{
|
||||
|
||||
+1
-1
@@ -380,7 +380,7 @@ check_order (const struct line *prev,
|
||||
{
|
||||
error ((check_input_order == CHECK_ORDER_ENABLED
|
||||
? EXIT_FAILURE : 0),
|
||||
0, _("File %d is not in sorted order"), whatfile);
|
||||
0, _("file %d is not in sorted order"), whatfile);
|
||||
|
||||
/* If we get to here, the message was just a warning, but we
|
||||
want only to issue it once. */
|
||||
|
||||
@@ -507,7 +507,7 @@ main (int argc, char **argv)
|
||||
{
|
||||
if (target_directory)
|
||||
error (EXIT_FAILURE, 0,
|
||||
_("Cannot combine --target-directory "
|
||||
_("cannot combine --target-directory "
|
||||
"and --no-target-directory"));
|
||||
if (n_files != 2)
|
||||
{
|
||||
|
||||
@@ -450,7 +450,7 @@ main (int argc, char **argv)
|
||||
{
|
||||
if (target_directory)
|
||||
error (EXIT_FAILURE, 0,
|
||||
_("Cannot combine --target-directory (-t) "
|
||||
_("cannot combine --target-directory (-t) "
|
||||
"and --no-target-directory (-T)"));
|
||||
if (2 < n_files)
|
||||
{
|
||||
|
||||
@@ -1838,7 +1838,7 @@ it must be one character from [doxn]"),
|
||||
{
|
||||
error (0, 0, _("extra operand %s"), quote (argv[optind + 1]));
|
||||
error (0, 0, "%s\n",
|
||||
_("Compatibility mode supports at most one file."));
|
||||
_("compatibility mode supports at most one file"));
|
||||
usage (EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -913,7 +913,7 @@ main (int argc, char **argv)
|
||||
error (EXIT_FAILURE, 0,
|
||||
_("`--pages=FIRST_PAGE[:LAST_PAGE]' missing argument"));
|
||||
else if (! first_last_page (oi, 0, optarg))
|
||||
error (EXIT_FAILURE, 0, _("Invalid page range %s"),
|
||||
error (EXIT_FAILURE, 0, _("invalid page range %s"),
|
||||
quote (optarg));
|
||||
break;
|
||||
}
|
||||
@@ -1099,11 +1099,11 @@ main (int argc, char **argv)
|
||||
|
||||
if (parallel_files & explicit_columns)
|
||||
error (EXIT_FAILURE, 0,
|
||||
_("Cannot specify number of columns when printing in parallel."));
|
||||
_("cannot specify number of columns when printing in parallel"));
|
||||
|
||||
if (parallel_files & print_across_flag)
|
||||
error (EXIT_FAILURE, 0,
|
||||
_("Cannot specify both printing across and printing in parallel."));
|
||||
_("cannot specify both printing across and printing in parallel"));
|
||||
|
||||
/* Translate some old short options to new/long options.
|
||||
To meet downward compatibility with other UNIX pr utilities
|
||||
@@ -2394,7 +2394,7 @@ print_header (void)
|
||||
print_white_space ();
|
||||
|
||||
if (page_number == 0)
|
||||
error (EXIT_FAILURE, 0, _("Page number overflow"));
|
||||
error (EXIT_FAILURE, 0, _("page number overflow"));
|
||||
|
||||
/* The translator must ensure that formatting the translation of
|
||||
"Page %"PRIuMAX does not generate more than (sizeof page_text - 1)
|
||||
|
||||
+1
-1
@@ -189,7 +189,7 @@ next_file_name (void)
|
||||
sufindex[i] = 0;
|
||||
outfile_mid[i] = suffix_alphabet[sufindex[i]];
|
||||
}
|
||||
error (EXIT_FAILURE, 0, _("Output file suffixes exhausted"));
|
||||
error (EXIT_FAILURE, 0, _("output file suffixes exhausted"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -326,7 +326,7 @@ main (int argc, char **argv)
|
||||
/* must specify either size or reference file */
|
||||
if ((ref_file && got_size) || (!ref_file && !got_size))
|
||||
{
|
||||
error (0, 0, _("You must specify one of %s or %s"),
|
||||
error (0, 0, _("you must specify one of %s or %s"),
|
||||
quote_n (0, "--size"), quote_n (1, "--reference"));
|
||||
usage (EXIT_FAILURE);
|
||||
}
|
||||
|
||||
@@ -646,7 +646,7 @@ main (int argc, char **argv)
|
||||
{
|
||||
error (0, 0, _("extra operand %s"), quote (argv[optind]));
|
||||
fprintf (stderr, "%s\n",
|
||||
_("File operands cannot be combined with --files0-from."));
|
||||
_("file operands cannot be combined with --files0-from"));
|
||||
usage (EXIT_FAILURE);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user