]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
hardlink: set all locale elements, so that messages will get translated
authorBenno Schulenberg <bensberg@telfort.nl>
Sun, 13 Mar 2022 09:43:56 +0000 (10:43 +0100)
committerKarel Zak <kzak@redhat.com>
Mon, 14 Mar 2022 09:29:46 +0000 (10:29 +0100)
This setting and binding were lost a year ago, in commit 2180ecc81b.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
misc-utils/hardlink.c

index 9320486227a2dedeb83485fddc939296e433bdf1..d4bb48386e37d0d43b638983f2a08b8cc1a30a3b 100644 (file)
@@ -1329,8 +1329,10 @@ int main(int argc, char *argv[])
        sigaction(SIGINT, &sa, NULL);
        sigaction(SIGUSR1, &sa, NULL);
 
-       /* Pretty print numeric output */
-       setlocale(LC_NUMERIC, "");
+       /* Localize messages, number formatting, and anything else. */
+       setlocale(LC_ALL, "");
+       bindtextdomain(PACKAGE, LOCALEDIR);
+       textdomain(PACKAGE);
 
        if (atexit(to_be_called_atexit) != 0)
                err(EXIT_FAILURE, _("cannot register exit handler"));