diff --git a/pgrep.c b/pgrep.c index 13e6dee4..8cb4a82c 100644 --- a/pgrep.c +++ b/pgrep.c @@ -761,6 +761,10 @@ int main (int argc, char **argv) union el *procs; int num; + setlocale (LC_ALL, ""); + bindtextdomain(PACKAGE, LOCALEDIR); + textdomain(PACKAGE); + parse_opts (argc, argv); procs = select_procs (&num); diff --git a/pmap.c b/pmap.c index 26a76b18..1c9bcc87 100644 --- a/pmap.c +++ b/pmap.c @@ -384,6 +384,10 @@ int main(int argc, char **argv) {NULL, 0, NULL, 0} }; + setlocale (LC_ALL, ""); + bindtextdomain(PACKAGE, LOCALEDIR); + textdomain(PACKAGE); + x_option = d_option = q_option = 0; while ((c = getopt_long(argc, argv, "xrdqA:hV", longopts, NULL)) != -1) diff --git a/ps/display.c b/ps/display.c index c9125e7a..2917edb5 100644 --- a/ps/display.c +++ b/ps/display.c @@ -530,7 +530,9 @@ static void fancy_spew(void){ /***** no comment */ int main(int argc, char *argv[]){ #if (__GNU_LIBRARY__ >= 6) - setlocale (LC_CTYPE, ""); + setlocale (LC_ALL, ""); + bindtextdomain(PACKAGE, LOCALEDIR); + textdomain(PACKAGE); #endif #ifdef DEBUG diff --git a/pwdx.c b/pwdx.c index 7e6b2511..2c699086 100644 --- a/pwdx.c +++ b/pwdx.c @@ -48,6 +48,10 @@ int main(int argc, char *argv[]) {NULL, 0, 0, 0} }; + setlocale (LC_ALL, ""); + bindtextdomain(PACKAGE, LOCALEDIR); + textdomain(PACKAGE); + while ((ch = getopt_long(argc, argv, "Vh", longopts, NULL)) != -1) switch (ch) { case 'V': diff --git a/skill.c b/skill.c index 2d798272..22e9617e 100644 --- a/skill.c +++ b/skill.c @@ -363,6 +363,10 @@ static void __attribute__ ((__noreturn__)) {NULL, 0, NULL, 0} }; + setlocale (LC_ALL, ""); + bindtextdomain(PACKAGE, LOCALEDIR); + textdomain(PACKAGE); + if (argc < 2) kill_usage(stderr); diff --git a/sysctl.c b/sysctl.c index b7d89a3b..e51f8d6f 100644 --- a/sysctl.c +++ b/sysctl.c @@ -610,6 +610,10 @@ int main(int argc, char *argv[]) {NULL, 0, NULL, 0} }; + setlocale (LC_ALL, ""); + bindtextdomain(PACKAGE, LOCALEDIR); + textdomain(PACKAGE); + PrintName = true; PrintNewline = true; IgnoreError = false; diff --git a/tload.c b/tload.c index e1cfd46b..23b243d1 100644 --- a/tload.c +++ b/tload.c @@ -96,7 +96,12 @@ int main(int argc, char **argv) {NULL, 0, NULL, 0} }; - while ((opt = getopt_long(argc, argv, "s:d:Vh", longopts, NULL)) != -1) + setlocale (LC_ALL, ""); + bindtextdomain(PACKAGE, LOCALEDIR); + textdomain(PACKAGE); + + while ((opt = + getopt_long(argc, argv, "s:d:Vh", longopts, NULL)) != -1) switch (opt) { case 's': scale_arg = optarg; diff --git a/uptime.c b/uptime.c index 51c4c557..6ad5d1fd 100644 --- a/uptime.c +++ b/uptime.c @@ -30,6 +30,10 @@ int main(int argc, char **argv) {NULL, 0, NULL, 0} }; + setlocale (LC_ALL, ""); + bindtextdomain(PACKAGE, LOCALEDIR); + textdomain(PACKAGE); + while ((c = getopt_long(argc, argv, "hV", longopts, NULL)) != -1) switch (c) { case 'h': diff --git a/vmstat.c b/vmstat.c index 0f8f8893..a81ecdf2 100644 --- a/vmstat.c +++ b/vmstat.c @@ -620,6 +620,10 @@ int main(int argc, char *argv[]) {NULL, 0, NULL, 0} }; + setlocale (LC_ALL, ""); + bindtextdomain(PACKAGE, LOCALEDIR); + textdomain(PACKAGE); + while ((c = getopt_long(argc, argv, "afmnsdDp:S:hV", longopts, NULL)) != EOF) diff --git a/w.c b/w.c index ccdbf766..001b0724 100644 --- a/w.c +++ b/w.c @@ -343,12 +343,16 @@ int main(int argc, char **argv) {NULL, 0, NULL, 0} }; + setlocale (LC_ALL, ""); + bindtextdomain(PACKAGE, LOCALEDIR); + textdomain(PACKAGE); + #ifndef W_SHOWFROM from = 0; #endif - setlocale(LC_ALL, ""); - while ((ch = getopt_long(argc, argv, "hlusfVo", longopts, NULL)) != -1) + while ((ch = + getopt_long(argc, argv, "hlusfV", longopts, NULL)) != -1) switch (ch) { case 'h': header = 0; diff --git a/watch.c b/watch.c index bc7c49c5..97dce3d6 100644 --- a/watch.c +++ b/watch.c @@ -309,6 +309,8 @@ int main(int argc, char *argv[]) }; setlocale(LC_ALL, ""); + bindtextdomain(PACKAGE, LOCALEDIR); + textdomain(PACKAGE); while ((optc = getopt_long(argc, argv, "+bced::hn:pvtx", longopts, (int *)0))