mirror of
https://github.com/retspen/webvirtcloud
synced 2026-12-03 17:36:05 +00:00
fix(i18n): refusals and checks users read are translated
English-only texts users read, now in their language: - the serial console's four refusals, which socketiod sends in the language LocaleMiddleware would choose (cookie, then browser) and logs in English; the texts live in console/refusals.py, as makemessages reads only .py files; - a submission key reused for another request, a malformed MAC address, the moved-VM refusal of a script's request, the API's "Templates cannot be started" (now the page's sentence), "Pool is not active" and the ISO upload's checks; - "Problem occurred with host" was a fragment with the host's name and error after it: one sentence with both.
This commit is contained in:
parent
bf6a0c0a29
commit
0dda091cd5
14 changed files with 187 additions and 41 deletions
|
|
@ -13,7 +13,7 @@ from django.db import transaction
|
|||
from django.db.models import F, Value
|
||||
from django.db.models.functions import Coalesce
|
||||
from django.utils import timezone
|
||||
from django.utils.translation import gettext_noop
|
||||
from django.utils.translation import gettext, gettext_noop
|
||||
|
||||
from logs.audit import write
|
||||
from vrtManager.util import OperationError
|
||||
|
|
@ -148,7 +148,7 @@ def _existing(user, key, kind_name, params):
|
|||
Operation.objects.filter(pk=op.pk).update(submission_key=f"expired:{op.pk.hex}")
|
||||
return None
|
||||
if op.kind != kind_name or op.params != params:
|
||||
raise SubmissionConflict("This form was already submitted for another request; reload the page")
|
||||
raise SubmissionConflict(gettext("This form was already submitted for another request; reload the page"))
|
||||
return op
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue