Skip to content

Commit 77d35b3

Browse files
committed
Set LC_MESSAGES to C
1 parent a721a3b commit 77d35b3

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

components/desktop/mate/mate-control-center/patches/04-passwd-pty.patch

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
diff --git a/capplets/about-me/mate-about-me-password.c b/capplets/about-me/mate-about-me-password.c
2-
index abac117..55ee452 100644
2+
index abac117..e4b3e8c 100644
33
--- a/capplets/about-me/mate-about-me-password.c
44
+++ b/capplets/about-me/mate-about-me-password.c
5-
@@ -27,6 +27,14 @@
5+
@@ -27,14 +27,33 @@
66
# include <config.h>
77
#endif
88

@@ -16,8 +16,10 @@ index abac117..55ee452 100644
1616
+
1717
/* Are all of these needed? */
1818
#include <gdk/gdkkeysyms.h>
19+
+#include <locale.h>
1920
#include <pwd.h>
20-
@@ -35,6 +43,16 @@
21+
#include <stdlib.h>
22+
#include <unistd.h>
2123
#include <errno.h>
2224
#include <string.h>
2325
#include <sys/wait.h>
@@ -34,7 +36,7 @@ index abac117..55ee452 100644
3436

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

@@ -44,7 +46,7 @@ index abac117..55ee452 100644
4446
/*
4547
* Error handling {{
4648
*/
47-
@@ -170,85 +191,178 @@ static gboolean
49+
@@ -170,85 +192,181 @@ static gboolean
4850
spawn_passwd (PasswordDialog *pdialog, GError **error)
4951
{
5052
gchar *argv[2];
@@ -197,6 +199,9 @@ index abac117..55ee452 100644
197199
+ dup2(pty_s, 0);
198200
+ dup2(pty_s, 1);
199201
+ dup2(pty_s, 2);
202+
+
203+
+ /* We expect plain English from passwd */
204+
+ setlocale(LC_MESSAGES, "C");
200205
+
201206
+ execvp(argv[0], argv);
202207
+
@@ -284,7 +289,7 @@ index abac117..55ee452 100644
284289
}
285290

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

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

0 commit comments

Comments
 (0)