]> git.ipfire.org Git - thirdparty/xz.git/commitdiff
xz: Unify a few strings with liblzma
authorLasse Collin <lasse.collin@tukaani.org>
Mon, 20 Jan 2025 14:31:49 +0000 (16:31 +0200)
committerLasse Collin <lasse.collin@tukaani.org>
Mon, 20 Jan 2025 14:31:49 +0000 (16:31 +0200)
Avoid having both "%s: foo" and "foo" as translatable strings
so that translators don't need to handle it twice.

src/xz/options.c
src/xz/util.c

index af0b28c592b92cf53a847d8316eb2569d434742d..c4f56b4956092891681948b4e8acf4dd3fc5550a 100644 (file)
@@ -82,9 +82,9 @@ parse_options(const char *str, const option_map *opts,
                        *value++ = '\0';
 
                if (value == NULL || value[0] == '\0')
-                       message_fatal(_("%s: Options must be 'name=value' "
-                                       "pairs separated with commas"),
-                                       tuklib_mask_nonprint(str));
+                       message_fatal(_("%s: %s"), tuklib_mask_nonprint(str),
+                                       _("Options must be 'name=value' "
+                                       "pairs separated with commas"));
 
                // Look for the option name from the option map.
                unsigned i = 0;
@@ -110,8 +110,9 @@ parse_options(const char *str, const option_map *opts,
                        }
 
                        if (opts[i].map[j].name == NULL)
-                               message_fatal(_("%s: Invalid option value"),
-                                               tuklib_mask_nonprint(value));
+                               message_fatal(_("%s: %s"),
+                                               tuklib_mask_nonprint(value),
+                                               _("Invalid option value"));
 
                        set(filter_options, i, opts[i].map[j].id, value);
 
index 0d339aede675ca7ad98645dddf63d5beb19a70ef..3af5982e0df17a608412cbb63fa8fe5807a6d2d4 100644 (file)
@@ -103,8 +103,8 @@ str_to_uint64(const char *name, const char *value, uint64_t min, uint64_t max)
                return max;
 
        if (*value < '0' || *value > '9')
-               message_fatal(_("%s: Value is not a non-negative "
-                               "decimal integer"), value);
+               message_fatal(_("%s: %s"), value,
+                       _("Value is not a non-negative decimal integer"));
 
        do {
                // Don't overflow.