mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
app_argument_invalid: dunno why name was changed to field but this was breaking i18n consistency
This commit is contained in:
parent
4332278f07
commit
1b99bb8b0f
2 changed files with 9 additions and 9 deletions
|
@ -14,7 +14,7 @@
|
|||
"app_already_installed_cant_change_url": "This app is already installed. The URL cannot be changed just by this function. Check in `app changeurl` if it's available.",
|
||||
"app_already_up_to_date": "{app} is already up-to-date",
|
||||
"app_argument_choice_invalid": "Use one of these choices '{choices}' for the argument '{name}' instead of '{value}'",
|
||||
"app_argument_invalid": "Pick a valid value for the argument '{field}': {error}",
|
||||
"app_argument_invalid": "Pick a valid value for the argument '{name}': {error}",
|
||||
"app_argument_password_no_default": "Error while parsing password argument '{name}': password argument can't have a default value for security reason",
|
||||
"app_argument_required": "Argument '{name}' is required",
|
||||
"app_change_url_failed_nginx_reload": "Could not reload NGINX. Here is the output of 'nginx -t':\n{nginx_errors}",
|
||||
|
|
|
@ -664,7 +664,7 @@ class DomainQuestion(Question):
|
|||
|
||||
def _raise_invalid_answer(self):
|
||||
raise YunohostValidationError(
|
||||
"app_argument_invalid", field=self.name, error=m18n.n("domain_unknown")
|
||||
"app_argument_invalid", name=self.name, error=m18n.n("domain_unknown")
|
||||
)
|
||||
|
||||
|
||||
|
@ -687,7 +687,7 @@ class UserQuestion(Question):
|
|||
def _raise_invalid_answer(self):
|
||||
raise YunohostValidationError(
|
||||
"app_argument_invalid",
|
||||
field=self.name,
|
||||
name=self.name,
|
||||
error=m18n.n("user_unknown", user=self.value),
|
||||
)
|
||||
|
||||
|
@ -713,21 +713,21 @@ class NumberQuestion(Question):
|
|||
):
|
||||
raise YunohostValidationError(
|
||||
"app_argument_invalid",
|
||||
field=self.name,
|
||||
name=self.name,
|
||||
error=m18n.n("invalid_number"),
|
||||
)
|
||||
|
||||
if self.min is not None and int(self.value) < self.min:
|
||||
raise YunohostValidationError(
|
||||
"app_argument_invalid",
|
||||
field=self.name,
|
||||
name=self.name,
|
||||
error=m18n.n("invalid_number"),
|
||||
)
|
||||
|
||||
if self.max is not None and int(self.value) > self.max:
|
||||
raise YunohostValidationError(
|
||||
"app_argument_invalid",
|
||||
field=self.name,
|
||||
name=self.name,
|
||||
error=m18n.n("invalid_number"),
|
||||
)
|
||||
|
||||
|
@ -739,7 +739,7 @@ class NumberQuestion(Question):
|
|||
return int(self.value)
|
||||
|
||||
raise YunohostValidationError(
|
||||
"app_argument_invalid", field=self.name, error=m18n.n("invalid_number")
|
||||
"app_argument_invalid", name=self.name, error=m18n.n("invalid_number")
|
||||
)
|
||||
|
||||
|
||||
|
@ -805,7 +805,7 @@ class FileQuestion(Question):
|
|||
):
|
||||
raise YunohostValidationError(
|
||||
"app_argument_invalid",
|
||||
field=self.name,
|
||||
name=self.name,
|
||||
error=m18n.n("file_does_not_exist", path=self.value),
|
||||
)
|
||||
if self.value in [None, ""] or not self.accept:
|
||||
|
@ -815,7 +815,7 @@ class FileQuestion(Question):
|
|||
if "." not in filename or "." + filename.split(".")[-1] not in self.accept:
|
||||
raise YunohostValidationError(
|
||||
"app_argument_invalid",
|
||||
field=self.name,
|
||||
name=self.name,
|
||||
error=m18n.n(
|
||||
"file_extension_not_accepted", file=filename, accept=self.accept
|
||||
),
|
||||
|
|
Loading…
Add table
Reference in a new issue