summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2012-11-12 14:16:07 -0500
committerDave Reisner <dreisner@archlinux.org>2012-11-12 14:16:07 -0500
commita9cdc94f7ff40f22a3cf9472f612a80730a1b010 (patch)
treee41785d3ffdf9f99305ba4748b733dfd083a5582
parent1298001ec5e320f9f9b6a9b925c8939b2579396d (diff)
enable localization for common *ctl commands
-rw-r--r--src/hostname/hostnamectl.c2
-rw-r--r--src/journal/coredumpctl.c2
-rw-r--r--src/journal/journalctl.c2
-rw-r--r--src/locale/localectl.c2
-rw-r--r--src/login/loginctl.c2
-rw-r--r--src/systemctl/systemctl.c2
-rw-r--r--src/timedate/timedatectl.c2
7 files changed, 14 insertions, 0 deletions
diff --git a/src/hostname/hostnamectl.c b/src/hostname/hostnamectl.c
index e7b2b49f29..b7ae5ccc6c 100644
--- a/src/hostname/hostnamectl.c
+++ b/src/hostname/hostnamectl.c
@@ -23,6 +23,7 @@
#include <stdbool.h>
#include <unistd.h>
#include <getopt.h>
+#include <locale.h>
#include <string.h>
#include <sys/timex.h>
#include <sys/utsname.h>
@@ -507,6 +508,7 @@ int main(int argc, char *argv[]) {
dbus_error_init(&error);
+ setlocale(LC_ALL, "");
log_parse_environment();
log_open();
diff --git a/src/journal/coredumpctl.c b/src/journal/coredumpctl.c
index bdea8ed057..4adc9236f1 100644
--- a/src/journal/coredumpctl.c
+++ b/src/journal/coredumpctl.c
@@ -19,6 +19,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include <locale.h>
#include <stdio.h>
#include <string.h>
#include <getopt.h>
@@ -514,6 +515,7 @@ int main(int argc, char *argv[]) {
Iterator it;
int r = 0;
+ setlocale(LC_ALL, "");
log_parse_environment();
log_open();
diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c
index d1407abd9e..cccd8a7692 100644
--- a/src/journal/journalctl.c
+++ b/src/journal/journalctl.c
@@ -19,6 +19,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include <locale.h>
#include <fcntl.h>
#include <errno.h>
#include <stddef.h>
@@ -820,6 +821,7 @@ int main(int argc, char *argv[]) {
bool previous_boot_id_valid = false;
unsigned n_shown = 0;
+ setlocale(LC_ALL, "");
log_parse_environment();
log_open();
diff --git a/src/locale/localectl.c b/src/locale/localectl.c
index 7d3ac0ad2f..fa73bcaac6 100644
--- a/src/locale/localectl.c
+++ b/src/locale/localectl.c
@@ -19,6 +19,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include <locale.h>
#include <stdlib.h>
#include <stdbool.h>
#include <unistd.h>
@@ -740,6 +741,7 @@ int main(int argc, char *argv[]) {
dbus_error_init(&error);
+ setlocale(LC_ALL, "");
log_parse_environment();
log_open();
diff --git a/src/login/loginctl.c b/src/login/loginctl.c
index 24941fef34..146986b46e 100644
--- a/src/login/loginctl.c
+++ b/src/login/loginctl.c
@@ -25,6 +25,7 @@
#include <string.h>
#include <getopt.h>
#include <pwd.h>
+#include <locale.h>
#include "log.h"
#include "util.h"
@@ -1568,6 +1569,7 @@ int main(int argc, char*argv[]) {
dbus_error_init(&error);
+ setlocale(LC_ALL, "");
log_parse_environment();
log_open();
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index a85a6baf76..b82c79435d 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -22,6 +22,7 @@
#include <sys/reboot.h>
#include <stdio.h>
#include <getopt.h>
+#include <locale.h>
#include <stdbool.h>
#include <string.h>
#include <errno.h>
@@ -5240,6 +5241,7 @@ int main(int argc, char*argv[]) {
dbus_error_init(&error);
+ setlocale(LC_ALL, "");
log_parse_environment();
log_open();
diff --git a/src/timedate/timedatectl.c b/src/timedate/timedatectl.c
index 06b98b1061..caa5bc7dfb 100644
--- a/src/timedate/timedatectl.c
+++ b/src/timedate/timedatectl.c
@@ -23,6 +23,7 @@
#include <stdbool.h>
#include <unistd.h>
#include <getopt.h>
+#include <locale.h>
#include <string.h>
#include <sys/timex.h>
@@ -677,6 +678,7 @@ int main(int argc, char *argv[]) {
dbus_error_init(&error);
+ setlocale(LC_ALL, "");
log_parse_environment();
log_open();