]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
irqtop,lsirq: set up locale path, so messages get actually translated
authorBenno Schulenberg <bensberg@telfort.nl>
Sun, 16 Mar 2025 15:20:37 +0000 (16:20 +0100)
committerKarel Zak <kzak@redhat.com>
Mon, 17 Mar 2025 11:19:15 +0000 (12:19 +0100)
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
(cherry picked from commit 7a912b98f99131049f91c1a3f53c4f51075ac348)

sys-utils/irqtop.c
sys-utils/lsirq.c

index 8fbedb16ab3206a0672f92f85a3ace5fedae1341..ce6a2ca5b700cf928019da69664b9fabc4160013 100644 (file)
@@ -391,6 +391,9 @@ int main(int argc, char **argv)
        };
 
        setlocale(LC_ALL, "");
+       bindtextdomain(PACKAGE, LOCALEDIR);
+       textdomain(PACKAGE);
+       close_stdout_atexit();
 
        parse_args(&ctl, &out, argc, argv);
 
index e31addaf595ec57e43a085555638be66719cf368..a389f249e625b9ff83c14cdd5ae3abf5293c099d 100644 (file)
@@ -105,6 +105,9 @@ int main(int argc, char **argv)
        int softirq = 0;
 
        setlocale(LC_ALL, "");
+       bindtextdomain(PACKAGE, LOCALEDIR);
+       textdomain(PACKAGE);
+       close_stdout_atexit();
 
        while ((c = getopt_long(argc, argv, "no:s:t:C:ShJPV", longopts, NULL)) != -1) {
                err_exclusive_options(c, longopts, excl, excl_st);