1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-11-08 11:16:47 +00:00
webvirtcloud/console/refusals.py
catborise 6d22a18ba7 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.
2026-11-06 23:48:53 +03:00

9 lines
561 B
Python

"""socketiod's refusals, which its page shows in the user's language. Here,
as makemessages reads only .py files and socketiod has no extension."""
from django.utils.translation import gettext_noop
TURNED_OFF = gettext_noop("The serial console is turned off on this server")
NOT_ALLOWED = gettext_noop("The console link has expired, or you may no longer open this console: reload the page")
OPEN_ELSEWHERE = gettext_noop("The console of this VM is open in another window")
TOO_MANY = gettext_noop("Too many consoles are open on this server: try again later")