Imported Upstream version 1.8.2
[debian/sudo] / src / sesh.c
index e0aef78f8e1d8a11e79fb3f7f4ed3e0bdaca49f4..f6818ce60181e2762c6d84ee216ee46508424678 100644 (file)
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
+#ifdef HAVE_SETLOCALE
+# include <locale.h>
+#endif
 
 #include "missing.h"
+#include "gettext.h"
 
 int
 main (int argc, char *argv[])
 {
     char *cp, *cmnd;
 
+#ifdef HAVE_SETLOCALE 
+    setlocale(LC_ALL, "");
+#endif
+    bindtextdomain(PACKAGE_NAME, LOCALEDIR);
+    textdomain(PACKAGE_NAME);
+
     if (argc < 2)
-       errx(EXIT_FAILURE, "requires at least one argument");
+       errx(EXIT_FAILURE, _("requires at least one argument"));
 
     /* Shift argv and make a copy of the command to execute. */
     argv++;
@@ -51,6 +61,6 @@ main (int argc, char *argv[])
        *cp = '-';
     }
     execv(cmnd, argv);
-    warn("unable to execute %s", argv[0]);
+    warn(_("unable to execute %s"), argv[0]);
     _exit(EXIT_FAILURE);
 }