Skip to content

Commit

Permalink
Set LC_MESSAGES to C
Browse files Browse the repository at this point in the history
  • Loading branch information
pyhalov committed Nov 13, 2018
1 parent a721a3b commit 77d35b3
Showing 1 changed file with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/capplets/about-me/mate-about-me-password.c b/capplets/about-me/mate-about-me-password.c
index abac117..55ee452 100644
index abac117..e4b3e8c 100644
--- a/capplets/about-me/mate-about-me-password.c
+++ b/capplets/about-me/mate-about-me-password.c
@@ -27,6 +27,14 @@
@@ -27,14 +27,33 @@
# include <config.h>
#endif

Expand All @@ -16,8 +16,10 @@ index abac117..55ee452 100644
+
/* Are all of these needed? */
#include <gdk/gdkkeysyms.h>
+#include <locale.h>
#include <pwd.h>
@@ -35,6 +43,16 @@
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include <sys/wait.h>
Expand All @@ -34,7 +36,7 @@ index abac117..55ee452 100644

#if __sun
#include <sys/types.h>
@@ -85,6 +103,9 @@ typedef struct {
@@ -85,6 +104,9 @@ typedef struct {
/* Buffer size for backend output */
#define BUFSIZE 64

Expand All @@ -44,7 +46,7 @@ index abac117..55ee452 100644
/*
* Error handling {{
*/
@@ -170,85 +191,178 @@ static gboolean
@@ -170,85 +192,181 @@ static gboolean
spawn_passwd (PasswordDialog *pdialog, GError **error)
{
gchar *argv[2];
Expand Down Expand Up @@ -197,6 +199,9 @@ index abac117..55ee452 100644
+ dup2(pty_s, 0);
+ dup2(pty_s, 1);
+ dup2(pty_s, 2);
+
+ /* We expect plain English from passwd */
+ setlocale(LC_MESSAGES, "C");
+
+ execvp(argv[0], argv);
+
Expand Down Expand Up @@ -284,7 +289,7 @@ index abac117..55ee452 100644
}

/* Stop passwd backend */
@@ -822,7 +936,7 @@ passdlg_spawn_passwd (PasswordDialog *pdialog)
@@ -822,7 +940,7 @@ passdlg_spawn_passwd (PasswordDialog *pdialog)

/* translators: Unable to launch <program>: <error message> */
details = g_strdup_printf (_("Unable to launch %s: %s"),
Expand Down

0 comments on commit 77d35b3

Please sign in to comment.