tech-install archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Switching to the right locale for sysinst



Argh, and here is the patch...

Martin
Index: main.c
===================================================================
RCS file: /cvsroot/src/distrib/utils/sysinst/main.c,v
retrieving revision 1.52
diff -u -r1.52 main.c
--- main.c      23 Oct 2006 19:45:56 -0000      1.52
+++ main.c      31 Aug 2008 21:41:37 -0000
@@ -47,6 +47,7 @@
 #include <unistd.h>
 #include <fcntl.h>
 #include <dirent.h>
+#include <locale.h>
 
 #include "defs.h"
 #include "md.h"
@@ -307,6 +308,13 @@
        }
        free(lang_msg);
        free(fnames);
+
+       /* set locale according to selected language */
+       cp = msg_string(MSG_sysinst_message_locale);
+       if (cp) {
+               setlocale(LC_CTYPE, cp);
+               setenv("LC_CTYPE", cp, 1);
+       }
 }
 
 /* toplevel menu handler ... */
Index: msg.mi.de
===================================================================
RCS file: /cvsroot/src/distrib/utils/sysinst/msg.mi.de,v
retrieving revision 1.43
diff -u -r1.43 msg.mi.de
--- msg.mi.de   25 Mar 2008 12:54:32 -0000      1.43
+++ msg.mi.de   31 Aug 2008 21:41:37 -0000
@@ -45,6 +45,9 @@
 message sysinst_message_language
 {Installation auf Deutsch}
 
+message sysinst_message_locale
+{de_DE.ISO8859-15}
+
 message Yes {Ja}
 message No {Nein}
 message All {Alle(s)}
Index: msg.mi.en
===================================================================
RCS file: /cvsroot/src/distrib/utils/sysinst/msg.mi.en,v
retrieving revision 1.149
diff -u -r1.149 msg.mi.en
--- msg.mi.en   4 Feb 2008 01:54:56 -0000       1.149
+++ msg.mi.en   31 Aug 2008 21:41:37 -0000
@@ -45,6 +45,9 @@
 message sysinst_message_language
 {Installation messages in English}
 
+message sysinst_message_locale
+{en_US.ISO8859-1}
+
 message Yes {Yes}
 message No {No}
 message All {All}
Index: msg.mi.es
===================================================================
RCS file: /cvsroot/src/distrib/utils/sysinst/msg.mi.es,v
retrieving revision 1.21
diff -u -r1.21 msg.mi.es
--- msg.mi.es   4 Feb 2008 01:54:56 -0000       1.21
+++ msg.mi.es   31 Aug 2008 21:41:37 -0000
@@ -45,6 +45,9 @@
 message sysinst_message_language
 {Mensajes de instalación en castellano}
 
+message sysinst_message_locale
+{es_ES.ISO8859-15}
+
 message Yes {Sí}
 message No {No}
 message All {Todo}
Index: msg.mi.fr
===================================================================
RCS file: /cvsroot/src/distrib/utils/sysinst/msg.mi.fr,v
retrieving revision 1.101
diff -u -r1.101 msg.mi.fr
--- msg.mi.fr   4 Feb 2008 01:54:56 -0000       1.101
+++ msg.mi.fr   31 Aug 2008 21:41:37 -0000
@@ -45,6 +45,9 @@
 message sysinst_message_language
 {Messages d'installation en français}
 
+message sysinst_message_locale
+{fr_FR.ISO8859-15}
+
 message Yes {Oui}
 message No {Non}
 message All {Tout}
Index: msg.mi.pl
===================================================================
RCS file: /cvsroot/src/distrib/utils/sysinst/msg.mi.pl,v
retrieving revision 1.60
diff -u -r1.60 msg.mi.pl
--- msg.mi.pl   4 Feb 2008 01:54:56 -0000       1.60
+++ msg.mi.pl   31 Aug 2008 21:41:37 -0000
@@ -47,6 +47,9 @@
 message sysinst_message_language
 {Komunikaty instalacyjne w jezyku polskim}
 
+message sysinst_message_locale
+{pl_PL.ISO8859-2}
+
 message Yes {Tak}
 message No {Nie}
 message All {Wszystkie}


Home | Main Index | Thread Index | Old Index