mirror of https://git.tukaani.org/xz.git
xz: Unify a few strings with liblzma
Avoid having both "%s: foo" and "foo" as translatable strings so that translators don't need to handle it twice.
This commit is contained in:
parent
713fdaa8b0
commit
6f5cdd4534
|
@ -82,9 +82,9 @@ parse_options(const char *str, const option_map *opts,
|
||||||
*value++ = '\0';
|
*value++ = '\0';
|
||||||
|
|
||||||
if (value == NULL || value[0] == '\0')
|
if (value == NULL || value[0] == '\0')
|
||||||
message_fatal(_("%s: Options must be 'name=value' "
|
message_fatal(_("%s: %s"), tuklib_mask_nonprint(str),
|
||||||
"pairs separated with commas"),
|
_("Options must be 'name=value' "
|
||||||
tuklib_mask_nonprint(str));
|
"pairs separated with commas"));
|
||||||
|
|
||||||
// Look for the option name from the option map.
|
// Look for the option name from the option map.
|
||||||
unsigned i = 0;
|
unsigned i = 0;
|
||||||
|
@ -110,8 +110,9 @@ parse_options(const char *str, const option_map *opts,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (opts[i].map[j].name == NULL)
|
if (opts[i].map[j].name == NULL)
|
||||||
message_fatal(_("%s: Invalid option value"),
|
message_fatal(_("%s: %s"),
|
||||||
tuklib_mask_nonprint(value));
|
tuklib_mask_nonprint(value),
|
||||||
|
_("Invalid option value"));
|
||||||
|
|
||||||
set(filter_options, i, opts[i].map[j].id, value);
|
set(filter_options, i, opts[i].map[j].id, value);
|
||||||
|
|
||||||
|
|
|
@ -103,8 +103,8 @@ str_to_uint64(const char *name, const char *value, uint64_t min, uint64_t max)
|
||||||
return max;
|
return max;
|
||||||
|
|
||||||
if (*value < '0' || *value > '9')
|
if (*value < '0' || *value > '9')
|
||||||
message_fatal(_("%s: Value is not a non-negative "
|
message_fatal(_("%s: %s"), value,
|
||||||
"decimal integer"), value);
|
_("Value is not a non-negative decimal integer"));
|
||||||
|
|
||||||
do {
|
do {
|
||||||
// Don't overflow.
|
// Don't overflow.
|
||||||
|
|
Loading…
Reference in New Issue