[PATCH 1/2 v2] hardlink: set all locale elements, so that messages will get translated

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This setting and binding were lost a year ago, in commit 2180ecc81b.

Signed-off-by: Benno Schulenberg <bensberg@xxxxxxxxxx>
---
 misc-utils/hardlink.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/misc-utils/hardlink.c b/misc-utils/hardlink.c
index 932048622..d4bb48386 100644
--- a/misc-utils/hardlink.c
+++ b/misc-utils/hardlink.c
@@ -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"));
-- 
2.34.1




[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux