]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - src/setup/keymap.c
libsmooth+install: Fix output redirection
[ipfire-2.x.git] / src / setup / keymap.c
index b143492a1345df4a07d3968c79cf6b972765581c..d0030a3bc0d66c9a7ca549015090b429492b5ec1 100644 (file)
@@ -9,14 +9,16 @@
  * $Id: keymap.c,v 1.9.2.1 2004/04/14 22:05:41 gespinasse Exp $
  * 
  */
-   
+
+// Translation
+#include <libintl.h>
+#define _(x) dgettext("setup", x)
+
 #include "setup.h"
  
 extern FILE *flog;
 extern char *mylog;
 
-extern char **ctr;
-
 extern int automode;
 
 #define MAX_FILENAMES 5000
@@ -65,7 +67,7 @@ int handlekeymap(void)
        if (!(readkeyvalues(kv, CONFIG_ROOT "/main/settings")))
        {
                freekeyvalues(kv);
-               errorbox(ctr[TR_UNABLE_TO_OPEN_SETTINGS_FILE]);
+               errorbox(_("Unable to open settings file"));
                return 0;
        }       
        
@@ -79,8 +81,9 @@ int handlekeymap(void)
                        choice = c;
        }
        
-       rc = newtWinMenu(ctr[TR_KEYBOARD_MAPPING], ctr[TR_KEYBOARD_MAPPING_LONG], 50, 5, 5, 6, displaynames, &choice,
-               ctr[TR_OK], ctr[TR_CANCEL], NULL);
+       rc = newtWinMenu(_("Keyboard mapping"),
+               _("Choose the type of keyboard you are using from the list below."),
+               50, 5, 5, 6, displaynames, &choice, _("OK"), _("Cancel"), NULL);
 
        strcpy(keymap, filenames[choice]);
        
@@ -89,7 +92,7 @@ int handlekeymap(void)
                replacekeyvalue(kv, "KEYMAP", keymap);
                writekeyvalues(kv, CONFIG_ROOT "/main/settings");
                sprintf(commandstring, "/bin/loadkeys %s", keymap);
-               mysystem(commandstring);
+               mysystem(NULL, commandstring);
                result = 1;
        }
        else