Prepare sudo front end messages for translation.
This commit is contained in:
@@ -177,7 +177,7 @@ parse_args(int argc, char **argv, int *nargc, char ***nargv, char ***settingsp,
|
||||
break;
|
||||
case 'C':
|
||||
if (atoi(optarg) < 3) {
|
||||
warningx("the argument to -C must be a number greater than or equal to 3");
|
||||
warningx(_("the argument to -C must be a number greater than or equal to 3"));
|
||||
usage(1);
|
||||
}
|
||||
sudo_settings[ARG_CLOSEFROM].value = optarg;
|
||||
@@ -189,7 +189,7 @@ parse_args(int argc, char **argv, int *nargc, char ***nargv, char ***settingsp,
|
||||
#endif
|
||||
case 'D':
|
||||
if ((debug_level = atoi(optarg)) < 1 || debug_level > 9) {
|
||||
warningx("the argument to -D must be between 1 and 9 inclusive");
|
||||
warningx(_("the argument to -D must be between 1 and 9 inclusive"));
|
||||
usage(1);
|
||||
}
|
||||
sudo_settings[ARG_DEBUG_LEVEL].value = optarg;
|
||||
@@ -270,7 +270,7 @@ parse_args(int argc, char **argv, int *nargc, char ***nargv, char ***settingsp,
|
||||
break;
|
||||
case 'U':
|
||||
if ((getpwnam(optarg)) == NULL)
|
||||
errorx(1, "unknown user: %s", optarg);
|
||||
errorx(1, _("unknown user: %s"), optarg);
|
||||
list_user = optarg;
|
||||
break;
|
||||
case 'u':
|
||||
@@ -329,11 +329,11 @@ parse_args(int argc, char **argv, int *nargc, char ***nargv, char ***settingsp,
|
||||
|
||||
if (ISSET(flags, MODE_LOGIN_SHELL)) {
|
||||
if (ISSET(flags, MODE_SHELL)) {
|
||||
warningx("you may not specify both the `-i' and `-s' options");
|
||||
warningx(_("you may not specify both the `-i' and `-s' options"));
|
||||
usage(1);
|
||||
}
|
||||
if (ISSET(flags, MODE_PRESERVE_ENV)) {
|
||||
warningx("you may not specify both the `-i' and `-E' options");
|
||||
warningx(_("you may not specify both the `-i' and `-E' options"));
|
||||
usage(1);
|
||||
}
|
||||
SET(flags, MODE_SHELL);
|
||||
@@ -343,9 +343,9 @@ parse_args(int argc, char **argv, int *nargc, char ***nargv, char ***settingsp,
|
||||
if (mode == MODE_EDIT &&
|
||||
(ISSET(flags, MODE_PRESERVE_ENV) || env_add[0] != NULL)) {
|
||||
if (ISSET(mode, MODE_PRESERVE_ENV))
|
||||
warningx("the `-E' option is not valid in edit mode");
|
||||
warningx(_("the `-E' option is not valid in edit mode"));
|
||||
if (env_add[0] != NULL)
|
||||
warningx("you may not specify environment variables in edit mode");
|
||||
warningx(_("you may not specify environment variables in edit mode"));
|
||||
usage(1);
|
||||
}
|
||||
if ((runas_user != NULL || runas_group != NULL) &&
|
||||
@@ -353,11 +353,11 @@ parse_args(int argc, char **argv, int *nargc, char ***nargv, char ***settingsp,
|
||||
usage(1);
|
||||
}
|
||||
if (list_user != NULL && mode != MODE_LIST && mode != MODE_CHECK) {
|
||||
warningx("the `-U' option may only be used with the `-l' option");
|
||||
warningx(_("the `-U' option may only be used with the `-l' option"));
|
||||
usage(1);
|
||||
}
|
||||
if (ISSET(tgetpass_flags, TGP_STDIN) && ISSET(tgetpass_flags, TGP_ASKPASS)) {
|
||||
warningx("the `-A' and `-S' options may not be used together");
|
||||
warningx(_("the `-A' and `-S' options may not be used together"));
|
||||
usage(1);
|
||||
}
|
||||
if ((argc == 0 && mode == MODE_EDIT) ||
|
||||
@@ -415,7 +415,7 @@ parse_args(int argc, char **argv, int *nargc, char ***nargv, char ***settingsp,
|
||||
settings[j] = fmt_string(sudo_settings[i].name,
|
||||
sudo_settings[i].value);
|
||||
if (settings[j] == NULL)
|
||||
errorx(1, "unable to allocate memory");
|
||||
errorx(1, _("unable to allocate memory"));
|
||||
j++;
|
||||
}
|
||||
}
|
||||
@@ -428,7 +428,7 @@ parse_args(int argc, char **argv, int *nargc, char ***nargv, char ***settingsp,
|
||||
argv--;
|
||||
argv[0] = "sudoedit";
|
||||
#else
|
||||
errorx(1, "sudoedit is not supported on this platform");
|
||||
errorx(1, _("sudoedit is not supported on this platform"));
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -499,7 +499,7 @@ usage(int fatal)
|
||||
static void
|
||||
usage_excl(int fatal)
|
||||
{
|
||||
warningx("Only one of the -e, -h, -i, -K, -l, -s, -v or -V options may be specified");
|
||||
warningx(_("Only one of the -e, -h, -i, -K, -l, -s, -v or -V options may be specified"));
|
||||
usage(fatal);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user