1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-12-02 08:56:07 +00:00

fix(ui): the settings index stays at hand on a phone; one wording in Turkish

On a phone the settings page opened with its group index on seven lines, and
the index was gone once the page, nine screens long, was scrolled. Below the lg
breakpoint it is now one row that scrolls sideways and sticks under the navbar
(navbar_height.js gives what sticks the navbar's height, which differs between
themes and grows when the phone menu opens).

Turkish said "VM" in 65 messages and "sanal makine" everywhere else; it now
says "sanal makine" throughout. Headings and buttons that still capitalised
every word follow the panel's sentence case, in English too (Change password,
SSH keys, Power off, ...). Wrong translations fixed: a password that is set
read as the command "Ayarla", the firmware setting was called a chip type,
Create flavor said Create user, the console viewport setting was called a port,
a DRBD typo, and host and interface are sunucu and arabirim as on every page.
A group's save button reads "Kaydet: <group>".
This commit is contained in:
catborise 2026-11-22 16:28:07 +03:00
parent a2da2ab394
commit 50fa42181b
28 changed files with 325 additions and 480 deletions

View file

@ -3,8 +3,8 @@
{% load i18n %}
{% load bootstrap_icons %}
{% block title %}{% trans "User Profile" %} - {{ user }}{% endblock %}
{% block page_heading %}{% trans "User Profile" %}{% endblock page_heading %}
{% block title %}{% trans "User profile" %} - {{ user }}{% endblock %}
{% block page_heading %}{% trans "User profile" %}{% endblock page_heading %}
{% block content %}
<section class="card mb-4" aria-labelledby="identity-title">
@ -54,8 +54,8 @@
</div>
<nav class="card-footer d-flex flex-wrap gap-3 small" aria-label="{% trans 'User sections' %}">
<a href="#instances">{% trans "VMs" %} <span class="badge text-bg-light border">{{ user_insts|length }}</span></a>
<a href="#public-keys">{% trans "SSH Keys" %} <span class="badge text-bg-light border">{{ publickeys|length }}</span></a>
<a href="#apitokens">{% trans "API Tokens" %} <span class="badge text-bg-light border">{{ api_tokens|length }}</span></a>
<a href="#public-keys">{% trans "SSH keys" %} <span class="badge text-bg-light border">{{ publickeys|length }}</span></a>
<a href="#apitokens">{% trans "API tokens" %} <span class="badge text-bg-light border">{{ api_tokens|length }}</span></a>
</nav>
</section>
@ -99,12 +99,12 @@
</section>
<section class="card mb-4" id="public-keys" aria-labelledby="public-keys-title">
<div class="card-header"><h2 class="h5 mb-0" id="public-keys-title">{% trans "SSH Keys" %} <span class="badge text-bg-light border">{{ publickeys|length }}</span></h2></div>
<div class="card-header"><h2 class="h5 mb-0" id="public-keys-title">{% trans "SSH keys" %} <span class="badge text-bg-light border">{{ publickeys|length }}</span></h2></div>
<div class="list-group list-group-flush">{% include "ssh_key_list.html" with owner=user %}</div>
</section>
<section class="card" id="apitokens" aria-labelledby="apitokens-title">
<div class="card-header"><h2 class="h5 mb-0" id="apitokens-title">{% trans "API Tokens" %} <span class="badge text-bg-light border">{{ api_tokens|length }}</span></h2></div>
<div class="card-header"><h2 class="h5 mb-0" id="apitokens-title">{% trans "API tokens" %} <span class="badge text-bg-light border">{{ api_tokens|length }}</span></h2></div>
<div class="list-group list-group-flush">{% include "api_token_list.html" with owner=user %}</div>
</section>
{% endblock content %}

View file

@ -2,9 +2,9 @@
{% load django_bootstrap5 %}
{% load i18n %}
{% block title %}{% trans "Change Password" %}{% endblock title %}
{% block title %}{% trans "Change password" %}{% endblock title %}
{% block page_heading %}{% trans "Change Password" %}{% endblock page_heading %}
{% block page_heading %}{% trans "Change password" %}{% endblock page_heading %}
{% block content %}
{# a user changes their own password; one who must (a new or reset account) cannot go elsewhere first #}

View file

@ -2,7 +2,7 @@
{% load static %}
{% load i18n %}
{% block title %}{% trans "WebVirtCloud" %} - {% trans "Sign In with OTP" %}{% endblock title %}
{% block title %}{% trans "WebVirtCloud" %} - {% trans "Sign in with OTP" %}{% endblock title %}
{% block page_header %}{% endblock page_header %}{# the page has its own heading #}
{% block content %}
@ -12,7 +12,7 @@
<div class="card-body p-4 p-sm-5">
<div class="text-center mb-4">
<div class="d-inline-block rounded-3 bg-primary text-white fs-2 lh-1 p-3 mb-3"><i class="bi bi-shield-check"></i></div>
<h1 class="h3 fw-bold mb-1">{% trans "Two-Factor Auth" %}</h1>
<h1 class="h3 fw-bold mb-1">{% trans "Two-factor authentication" %}</h1>
<p class="text-body-secondary small mb-0">{% trans "Enter your authentication code to continue" %}</p>
</div>
@ -54,7 +54,7 @@
<div class="mb-4">
<div class="d-flex justify-content-between align-items-center mb-2">
<label class="form-label small fw-medium mb-0" for="id_otp_token">{% trans "Security Code" %}</label>
<label class="form-label small fw-medium mb-0" for="id_otp_token">{% trans "Security code" %}</label>
<a href="{% url 'accounts:email_otp' %}" class="small">{% trans "Lost OTP?" %}</a>
</div>
<div class="input-group">
@ -66,7 +66,7 @@
<button id="btn-signin" class="btn btn-primary w-100 py-2" type="submit">
<i class="bi bi-shield-lock-fill me-1"></i>
<span id="btn-text">{% trans "Verify & Sign In" %}</span>
<span id="btn-text">{% trans "Verify and sign in" %}</span>
</button>
</form>
</div>

View file

@ -1,9 +1,9 @@
{% extends "base.html" %}
{% load i18n static %}
{% block title %}{% trans "OTP QR Code" %}{% endblock %}
{% block title %}{% trans "OTP QR code" %}{% endblock %}
{% block page_heading %}{% trans "OTP QR Code" %}{% endblock page_heading %}
{% block page_heading %}{% trans "OTP QR code" %}{% endblock page_heading %}
{% block content %}
<div class="card">

View file

@ -2,7 +2,7 @@
{% load static %}
{% load i18n %}
{% block title %}{% trans "WebVirtCloud" %} - {% trans "Sign In" %}{% endblock title %}
{% block title %}{% trans "WebVirtCloud" %} - {% trans "Sign in" %}{% endblock title %}
{% block page_header %}{% endblock page_header %}{# the page has its own heading #}
{% block content %}
@ -13,7 +13,7 @@
<div class="text-center mb-4">
<div class="d-inline-block rounded-3 bg-primary text-white fs-2 lh-1 p-3 mb-3"><i class="bi bi-hdd-network"></i></div>
<h1 class="h3 fw-bold mb-1">WebVirtCloud</h1>
<p class="text-body-secondary small mb-0">{% trans "Virtualization Management Console" %}</p>
<p class="text-body-secondary small mb-0">{% trans "Virtualization management console" %}</p>
</div>
{% if app_settings.LOGIN_NOTICE %}
@ -56,7 +56,7 @@
<button id="btn-signin" class="btn btn-primary w-100 py-2" type="submit">
<i class="bi bi-box-arrow-in-right me-1"></i>
<span id="btn-text">{% trans "Sign In" %}</span>
<span id="btn-text">{% trans "Sign in" %}</span>
</button>
</form>
</div>

View file

@ -32,7 +32,7 @@
{# an LDAP user's password is changed in LDAP #}
{% if perms.accounts.change_password and user.has_usable_password %}
<div class="card-footer">
<a href="{% url 'accounts:change_password' %}" class="btn btn-sm btn-outline-secondary">{% bs_icon 'lock' %} {% trans "Change Password" %}</a>
<a href="{% url 'accounts:change_password' %}" class="btn btn-sm btn-outline-secondary">{% bs_icon 'lock' %} {% trans "Change password" %}</a>
</div>
{% endif %}
</section>
@ -41,9 +41,9 @@
<div class="col-lg-8">
<section class="card mb-4" id="sshkeys" aria-labelledby="sshkeys-title">
<div class="card-header d-flex flex-wrap align-items-center justify-content-between gap-2">
<h2 class="h5 mb-0" id="sshkeys-title">{% trans "SSH Keys" %} <span class="badge text-bg-light border">{{ publickeys|length }}</span></h2>
<h2 class="h5 mb-0" id="sshkeys-title">{% trans "SSH keys" %} <span class="badge text-bg-light border">{{ publickeys|length }}</span></h2>
<button class="btn btn-sm btn-primary" type="button" data-bs-toggle="collapse" data-bs-target="#add-ssh-key" aria-expanded="false" aria-controls="add-ssh-key">
{% bs_icon 'plus-lg' %} {% trans "Add SSH Key" %}
{% bs_icon 'plus-lg' %} {% trans "Add SSH key" %}
</button>
</div>
<div class="card-body small text-body-secondary">{% trans "Offered when you create a VM and on a VM's Access tab." %}</div>
@ -59,7 +59,7 @@
<section class="card" id="apitokens" aria-labelledby="apitokens-title">
<div class="card-header d-flex flex-wrap align-items-center justify-content-between gap-2">
<h2 class="h5 mb-0" id="apitokens-title">{% trans "API Tokens" %} <span class="badge text-bg-light border">{{ api_tokens|length }}</span></h2>
<h2 class="h5 mb-0" id="apitokens-title">{% trans "API tokens" %} <span class="badge text-bg-light border">{{ api_tokens|length }}</span></h2>
<button class="btn btn-sm btn-primary" type="button" data-bs-toggle="collapse" data-bs-target="#create-api-token" aria-expanded="false" aria-controls="create-api-token">
{% bs_icon 'plus-lg' %} {% trans "Create an API token" %}
</button>

View file

@ -108,7 +108,7 @@ class AccountsUtilsTestCase(TestCase):
send_email_with_otp(RequestFactory().get("/"), device)
self.assertEqual(len(mail.outbox), 1)
message = mail.outbox[0]
self.assertEqual((message.subject, message.to, message.alternatives), ("OTP QR Code", ["user@example.com"], []))
self.assertEqual((message.subject, message.to, message.alternatives), ("OTP QR code", ["user@example.com"], []))
self.assertNotIn(device.bin_key.hex(), message.body)
self.assertNotIn("otpauth", message.body)
# the token is the fragment, which no request (no access log) carries

View file

@ -63,7 +63,7 @@ def send_email_with_otp(request, device):
user = device.user
url = request.build_absolute_uri(reverse("accounts:otp_qr")) + "#" + OTP_LINK.sign(str(device.pk))
send_mail(
_("OTP QR Code"),
_("OTP QR code"),
_("Open this link within an hour to see the OTP QR code of account '%(user)s':\n\n%(url)s")
% {"user": user, "url": url},
None,

View file

@ -237,7 +237,7 @@ def change_password(request):
pass
except OSError:
logging.getLogger(__name__).warning("Could not remove the generated admin password file")
messages.success(request, _("Password Changed"))
messages.success(request, _("Password changed"))
return redirect("accounts:profile")
if form.has_error("old_password", "password_incorrect"): # someone at an open session guessing it
failed(request, None, f"User {request.user.username}", "change password", "wrong old password")
@ -268,7 +268,7 @@ def user_instance_create(request, user_id):
"common/form.html",
{
"form": form,
"title": _("Create User Instance"),
"title": _("Create user instance"),
"searchable": True,
},
)
@ -303,7 +303,7 @@ def user_instance_update(request, pk):
"common/form.html",
{
"form": form,
"title": _("Update User Instance"),
"title": _("Update user instance"),
},
)

View file

@ -2,9 +2,9 @@
{% load django_bootstrap5 %}
{% load i18n %}
{% block title %}{% trans "Change Password" %}{% endblock %}
{% block title %}{% trans "Change password" %}{% endblock %}
{% block page_heading %}{% trans "Change Password" %}{% endblock page_heading %}
{% block page_heading %}{% trans "Change password" %}{% endblock page_heading %}
{% block content %}
{# an administrator sets another user's password, or takes it away (sign-in by LDAP, for one) #}

View file

@ -77,7 +77,7 @@ def group_create(request):
"admin/group_form.html",
{
"form": form,
"title": _("Create Group"),
"title": _("Create group"),
},
)
@ -119,7 +119,7 @@ def group_update(request, pk):
"form": form,
"group": group,
"seen": form_seen(group_snapshot(group)),
"title": _("Update Group"),
"title": _("Update group"),
},
)
@ -219,7 +219,7 @@ def user_create(request):
{
"user_form": user_form,
"attributes_form": attributes_form,
"title": _("Create User"),
"title": _("Create user"),
},
)
@ -293,7 +293,7 @@ def user_update(request, pk):
"attributes_form": attributes_form,
"edited_user": user,
"seen": seen,
"title": _("Update User"),
"title": _("Update user"),
},
)

View file

@ -1,25 +1,40 @@
{% extends "base.html" %}
{% load i18n %}
{% block title %}{% trans "Edit Settings" %}{% endblock title %}
{% block title %}{% trans "Edit settings" %}{% endblock title %}
{% block page_heading %}{% trans "Edit Settings" %}{% endblock page_heading %}
{% block page_heading %}{% trans "Edit settings" %}{% endblock page_heading %}
{% block style %}
<style>
/* a group's card stops below the sticky navbar; the group index stays in view */
/* a group's card stops below the sticky navbar; the group index stays in view: beside the
groups, or on a narrow screen as one row under the navbar that scrolls sideways */
.settings-group { scroll-margin-top: 5rem; }
@media (min-width: 992px) {
.settings-index { position: sticky; top: 5rem; }
}
@media (max-width: 991.98px) {
/* the column sticks: the index alone would only stick within it */
.settings-index-column {
position: sticky;
top: var(--navbar-height, 4rem);
z-index: 1000;
background: var(--bs-body-bg);
padding-block: .5rem;
}
/* the padding keeps a link's focus ring inside the scrolling row */
.settings-index .nav { flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; padding: .25rem; }
/* below the navbar and the index, whose height the theme and a scrollbar set */
.settings-group { scroll-margin-top: calc(var(--navbar-height, 4rem) + 6rem); }
}
</style>
{% endblock style %}
{% block content %}
<div class="row g-4">
<div class="col-lg-3">
<div class="col-lg-3 settings-index-column">
<nav class="settings-index" aria-label="{% trans 'Settings groups' %}">
<div class="nav nav-pills flex-wrap flex-lg-column gap-1">
<div class="nav nav-pills flex-lg-column gap-1">
<a class="nav-link" href="#appearance">{% trans "Appearance" %}</a>
{% for title, settings in groups %}
<a class="nav-link" href="#{{ title|slugify }}">{% trans title %}</a>

View file

@ -3,8 +3,8 @@
{% load static %}
{% load operations %}
{% load bootstrap_icons %}
{% block title %}{% trans "Bulk Migrate" %} - {{ compute.name }}{% endblock %}
{% block page_heading %}{{ compute.name }} - {% trans "Bulk Migrate" %}{% endblock page_heading %}
{% block title %}{% trans "Bulk migrate" %} - {{ compute.name }}{% endblock %}
{% block page_heading %}{{ compute.name }} - {% trans "Bulk migrate" %}{% endblock page_heading %}
{% block content %}
<div class="row">

View file

@ -9,7 +9,7 @@
{% block page_heading_extra %}
<input id="filter" class="form-control w-auto" type="text" placeholder="{% trans 'Search' %}" aria-label="{% trans 'Search' %}">
{% if instances %}
<a href="{% url 'bulk_migrate' compute.id %}" class="btn btn-outline-primary">{% trans "Bulk Migrate" %}</a>
<a href="{% url 'bulk_migrate' compute.id %}" class="btn btn-outline-primary">{% trans "Bulk migrate" %}</a>
{% endif %}
{% if compute.maintenance %}
{# a disabled button shows no title: its wrapper says why #}

View file

@ -11,14 +11,14 @@
<a class="dropdown-item" id="ctrlaltdel" href="#">Ctrl+Alt+Del</a>
<a class="dropdown-item" id="ctrlaltbackspace" href="#">Ctrl+Alt+Backspace</a>
<div class="dropdown-divider"></div>
<h6 class="dropdown-header">{% trans "Navigation & Desktop" %}</h6>
<h6 class="dropdown-header">{% trans "Navigation and desktop" %}</h6>
<a class="dropdown-item" id="alttab" href="#">Alt+Tab</a>
<a class="dropdown-item" id="superkey" href="#">Windows / Super Key</a>
<a class="dropdown-item" id="sendesc" href="#">Escape</a>
<a class="dropdown-item" id="sendtab" href="#">Tab</a>
<div class="dropdown-divider"></div>
{% endif %}
<h6 class="dropdown-header">{% trans "Terminal Control" %}</h6>
<h6 class="dropdown-header">{% trans "Terminal control" %}</h6>
<a class="dropdown-item" id="ctrlc" href="#">Ctrl+C</a>
<a class="dropdown-item" id="ctrlz" href="#">Ctrl+Z</a>
<a class="dropdown-item" id="ctrld" href="#">Ctrl+D</a>
@ -28,7 +28,7 @@
<a class="dropdown-item" id="sendtab" href="#">Tab</a>
{% else %}
<div class="dropdown-divider"></div>
<h6 class="dropdown-header">{% trans "Virtual Consoles (Ctrl+Alt+F#)" %}</h6>
<h6 class="dropdown-header">{% trans "Virtual consoles (Ctrl+Alt+F#)" %}</h6>
<div class="px-3 py-1">
<div class="row g-1 text-center">
<div class="col-3"><a class="btn btn-sm btn-outline-secondary w-100 py-1" id="ctrlaltf1" href="#">F1</a></div>

View file

@ -95,7 +95,7 @@
{% if not vm_form.vcpu_mode.value %}<option value="" selected disabled>{% trans "Choose…" %}</option>{% endif %}
{% for mode in dom_caps.cpu_modes %}
{% if mode == 'custom' %}
<optgroup label="{% trans "Custom CPU Models" %}">
<optgroup label="{% trans "Custom CPU models" %}">
{% for model in dom_caps.cpu_custom_models %}
<option value="{{ model }}"{% if model == vm_form.vcpu_mode.value %} selected{% endif %}>{{ model }}</option>
{% endfor %}

View file

@ -1,21 +1,21 @@
{% load i18n %}
<div class="tab-pane" id="osinfo" role="tabpanel">
<h3 class="mb-3">{% trans "Guest Info" %}</h3>
<h3 class="mb-3">{% trans "Guest info" %}</h3>
<div id="osinfo-error" class="alert alert-warning d-none" role="alert" data-silent="{% trans 'The guest agent did not answer' %}"></div>
<dl class="mx-3 row">
<dt class="col-5 col-sm-3">{% trans "Hostname" %}</dt>
<dd class="col-7 col-sm-9 text-break" id="oshostname"></dd>
<dt class="col-5 col-sm-3">{% trans "OS Name" %}</dt>
<dt class="col-5 col-sm-3">{% trans "OS name" %}</dt>
<dd class="col-7 col-sm-9 text-break" id="osname"></dd>
<dt class="col-5 col-sm-3">{% trans "OS Pretty-Name" %}</dt>
<dt class="col-5 col-sm-3">{% trans "OS pretty name" %}</dt>
<dd class="col-7 col-sm-9 text-break" id="osprettyname"></dd>
<dt class="col-5 col-sm-3">{% trans "Version" %}</dt>
<dd class="col-7 col-sm-9 text-break" id="osversion"></dd>
<dt class="col-5 col-sm-3">{% trans "Kernel Release" %}</dt>
<dt class="col-5 col-sm-3">{% trans "Kernel release" %}</dt>
<dd class="col-7 col-sm-9 text-break" id="oskernelrelease"></dd>
<dt class="col-5 col-sm-3">{% trans "Kernel Version" %}</dt>
<dt class="col-5 col-sm-3">{% trans "Kernel version" %}</dt>
<dd class="col-7 col-sm-9 text-break" id="oskernelversion"></dd>
<dt class="col-5 col-sm-3">{% trans "Timezone / Offset" %}</dt>
<dt class="col-5 col-sm-3">{% trans "Time zone / offset" %}</dt>
<dd class="col-7 col-sm-9 text-break" id="ostimezone"></dd>
</dl>
{# instance_page.js fills and shows the table when the agent gives file systems with their usage, else the note #}

View file

@ -22,7 +22,7 @@
{% endif %}
</div>
{% if "poweron" in power_actions %}
<button type="submit" class="btn btn-primary" name="poweron">{% trans "Power On" %}</button>
<button type="submit" class="btn btn-primary" name="poweron">{% trans "Power on" %}</button>
<p class="small text-body-secondary mt-1 mb-0">{% trans "Starts the VM." %}</p>
{% elif "resume" in power_actions %}
<button type="submit" class="btn btn-primary" name="resume" formaction="{% url 'instances:resume' instance.id %}">{% trans "Resume" %}</button>
@ -53,7 +53,7 @@
{% endif %}
</div>
{% if "poweroff" in power_actions %}
<button type="submit" class="btn btn-outline-primary" name="poweroff" formaction="{% url 'instances:poweroff' instance.id %}">{% trans "Power Off" %}</button>
<button type="submit" class="btn btn-outline-primary" name="poweroff" formaction="{% url 'instances:poweroff' instance.id %}">{% trans "Power off" %}</button>
<p class="small text-body-secondary mt-1 mb-0">{% trans "Asks the guest to shut down." %}</p>
{% elif instance.status == 5 and instance.is_template %}
<p class="small text-body-secondary mb-0">{% trans "A template is not started: clone it to make a VM." %}</p>
@ -65,7 +65,7 @@
<form method="post" action="{% url 'instances:poweron' instance.id %}" class="d-flex flex-wrap align-items-center gap-2 border-top mt-4 pt-3">{% csrf_token %}
<span class="small me-auto">{% trans "The VM has a saved state: Power On resumes it as it was when saved." %}</span>
<button type="submit" class="btn btn-sm btn-outline-danger" name="fresh" value="1"
data-confirm="{% blocktrans with name=instance.name %}Start {{ name }} without its saved state? The saved state is discarded and the VM boots anew; what it had in memory is lost.{% endblocktrans %}">{% trans "Start Without Saved State" %}</button>
data-confirm="{% blocktrans with name=instance.name %}Start {{ name }} without its saved state? The saved state is discarded and the VM boots anew; what it had in memory is lost.{% endblocktrans %}">{% trans "Start without saved state" %}</button>
</form>
{% endif %}
{% if "force_off" in power_actions or "powercycle" in power_actions %}
@ -73,11 +73,11 @@
<span class="small text-danger me-auto">{% trans "A power cut: what the guest has not written to disk is lost." %}</span>
{% if "force_off" in power_actions %}
<button type="submit" class="btn btn-sm btn-outline-danger" name="powerforce" formaction="{% url 'instances:force_off' instance.id %}"
data-confirm="{% blocktrans with name=instance.name %}Force off {{ name }}? It stops at once, as after a power cut; what the guest has not written to disk is lost.{% endblocktrans %}">{% trans "Force Off" %}</button>
data-confirm="{% blocktrans with name=instance.name %}Force off {{ name }}? It stops at once, as after a power cut; what the guest has not written to disk is lost.{% endblocktrans %}">{% trans "Force off" %}</button>
{% endif %}
{% if "powercycle" in power_actions %}
<button type="submit" class="btn btn-sm btn-outline-danger" name="powercycle" formaction="{% url 'instances:powercycle' instance.id %}"
data-confirm="{% blocktrans with name=instance.name %}Power cycle {{ name }}? It stops at once, as after a power cut, and starts again; what the guest has not written to disk is lost.{% endblocktrans %}">{% trans "Power Cycle" %}</button>
data-confirm="{% blocktrans with name=instance.name %}Power cycle {{ name }}? It stops at once, as after a power cut, and starts again; what the guest has not written to disk is lost.{% endblocktrans %}">{% trans "Power cycle" %}</button>
{% endif %}
</form>
{% endif %}

View file

@ -55,7 +55,7 @@ class VmReportTests(TestCase):
response, _ = self.report(self.admin, [vm(UNKNOWN, "made-with-virsh", self.c2.id, state=5, os="", family="")],
language="tr")
rows, coverage = self.sheets(response, ("Sanal makineler", "Kapsam"))
self.assertEqual(rows[0][:3], ["VM", "Durum", "Sunucu"])
self.assertEqual(rows[0][:3], ["Sanal makine", "Durum", "Sunucu"])
self.assertEqual(rows[1][-1], "hayır")
self.assertIn("Listelenen sanal makineler: 1", coverage)

View file

@ -3035,7 +3035,7 @@ def flavor_create(request):
form.save()
if from_script(request):
return flavors_reply(request, FlavorForm())
messages.success(request, _("Flavor Created"))
messages.success(request, _("Flavor created"))
return get_safe_redirect(request, default=reverse("instances:index"))
if from_script(request):
return flavors_reply(request, form)
@ -3043,7 +3043,7 @@ def flavor_create(request):
return render(
request,
"common/form.html",
{"form": form, "title": _("Create Flavor")},
{"form": form, "title": _("Create flavor")},
)
@ -3055,7 +3055,7 @@ def flavor_delete(request, pk):
flavor.delete()
if from_script(request):
return flavors_reply(request, FlavorForm())
messages.success(request, _("Flavor Deleted"))
messages.success(request, _("Flavor deleted"))
return get_safe_redirect(request, default=reverse("instances:index"))
return render(

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

View file

@ -164,7 +164,7 @@ msgid "last used"
msgstr "上次使用"
#: accounts/templates/account.html:6 accounts/templates/account.html:7
msgid "User Profile"
msgid "User profile"
msgstr "用户资料"
#: accounts/templates/account.html:17 accounts/templates/profile.html:18
@ -227,12 +227,12 @@ msgstr "虚拟机"
#: accounts/templates/account.html:51 accounts/templates/account.html:96
#: accounts/templates/profile.html:44
msgid "SSH Keys"
msgid "SSH keys"
msgstr "SSH 密钥"
#: accounts/templates/account.html:52 accounts/templates/account.html:101
#: accounts/templates/profile.html:62
msgid "API Tokens"
msgid "API tokens"
msgstr "API 令牌"
#: accounts/templates/account.html:59
@ -274,14 +274,6 @@ msgstr "从用户移除"
msgid "No VMs."
msgstr "没有虚拟机。"
#: accounts/templates/accounts/change_password_form.html:5
#: accounts/templates/accounts/change_password_form.html:7
#: accounts/templates/profile.html:35
#: admin/templates/admin/user_password_form.html:5
#: admin/templates/admin/user_password_form.html:7
msgid "Change Password"
msgstr "修改密码"
#: accounts/templates/accounts/change_password_form.html:20
msgid "Choose a new password before you go on."
msgstr "请先设置新密码再继续。"
@ -356,11 +348,11 @@ msgid "WebVirtCloud"
msgstr "WebVirtCloud"
#: accounts/templates/accounts/otp_login.html:6
msgid "Sign In with OTP"
msgid "Sign in with OTP"
msgstr "使用 OTP 登录"
#: accounts/templates/accounts/otp_login.html:15
msgid "Two-Factor Auth"
msgid "Two-factor authentication"
msgstr "双因素认证"
#: accounts/templates/accounts/otp_login.html:16
@ -395,7 +387,7 @@ msgid "Toggle password visibility"
msgstr "显示/隐藏密码"
#: accounts/templates/accounts/otp_login.html:49
msgid "Security Code"
msgid "Security code"
msgstr "安全码"
#: accounts/templates/accounts/otp_login.html:50
@ -407,13 +399,12 @@ msgid "Leave empty if you have not set up two-factor authentication."
msgstr "如果未设置双因素认证,请留空。"
#: accounts/templates/accounts/otp_login.html:61
msgid "Verify & Sign In"
msgid "Verify and sign in"
msgstr "验证并登录"
#: accounts/templates/accounts/otp_qr.html:4
#: accounts/templates/accounts/otp_qr.html:6 accounts/utils.py:66
msgid "OTP QR Code"
msgid "OTP QR code"
msgstr "OTP 二维码"
#: accounts/templates/accounts/otp_qr.html:12
@ -490,11 +481,11 @@ msgid "No API tokens."
msgstr "没有 API 令牌。"
#: accounts/templates/login.html:5 accounts/templates/login.html:50
msgid "Sign In"
msgid "Sign in"
msgstr "登录"
#: accounts/templates/login.html:15
msgid "Virtualization Management Console"
msgid "Virtualization management console"
msgstr "虚拟化管理控制台"
#: accounts/templates/login.html:21
@ -514,10 +505,6 @@ msgstr "编辑用户信息表单"
msgid "Save profile"
msgstr "保存资料"
#: accounts/templates/profile.html:46
msgid "Add SSH Key"
msgstr "添加 SSH 密钥"
#: accounts/templates/profile.html:49
msgid "Offered when you create a VM and on a VM's Access tab."
msgstr "创建虚拟机时以及在虚拟机的“访问”选项卡中提供。"
@ -626,15 +613,15 @@ msgid ""
msgstr "已有此密钥的虚拟机会保留它;此后创建的虚拟机不会再获得它。"
#: accounts/views.py:238
msgid "Password Changed"
msgid "Password changed"
msgstr "密码已修改"
#: accounts/views.py:269
msgid "Create User Instance"
msgid "Create user instance"
msgstr "创建用户虚拟机"
#: accounts/views.py:304
msgid "Update User Instance"
msgid "Update user instance"
msgstr "更新用户虚拟机"
#: accounts/views.py:322
@ -1256,12 +1243,8 @@ msgid ""
"again"
msgstr "%(name)s 在此期间已更改:以下是其当前状态;请重新进行更改"
#: admin/views.py:78
msgid "Create Group"
msgstr "创建用户组"
#: admin/views.py:120
msgid "Update Group"
msgid "Update group"
msgstr "更新用户组"
#: admin/views.py:136
@ -1276,12 +1259,8 @@ msgstr "不能禁用、删除或降级你自己的账户"
msgid "This would leave no active superuser"
msgstr "这将导致没有可用的超级用户"
#: admin/views.py:217
msgid "Create User"
msgstr "创建用户"
#: admin/views.py:290
msgid "Update User"
msgid "Update user"
msgstr "更新用户"
#: admin/views.py:314
@ -1875,7 +1854,7 @@ msgstr "描述"
#: appsettings/templates/appsettings.html:4
#: appsettings/templates/appsettings.html:6
msgid "Edit Settings"
msgid "Edit settings"
msgstr "编辑设置"
#: appsettings/templates/appsettings.html:21
@ -2439,12 +2418,6 @@ msgstr "原因"
msgid "You kept it here: tick it to let it move"
msgstr "您将其保留在原处:勾选后即可迁移"
#: computes/templates/computes/bulk_migrate.html:6
#: computes/templates/computes/bulk_migrate.html:7
#: computes/templates/computes/instances.html:22
msgid "Bulk Migrate"
msgstr "批量迁移"
#: computes/templates/computes/bulk_migrate.html:18
#, python-format
msgid ""
@ -3114,15 +3087,15 @@ msgid "System"
msgstr "系统"
#: console/templates/console-menu.html:14
msgid "Navigation & Desktop"
msgid "Navigation and desktop"
msgstr "导航与桌面"
#: console/templates/console-menu.html:21
msgid "Terminal Control"
msgid "Terminal control"
msgstr "终端控制"
#: console/templates/console-menu.html:31
msgid "Virtual Consoles (Ctrl+Alt+F#)"
msgid "Virtual consoles (Ctrl+Alt+F#)"
msgstr "虚拟控制台(Ctrl+Alt+F#)"
#: console/templates/console-menu.html:49
@ -4535,7 +4508,7 @@ msgid "Choose…"
msgstr "请选择…"
#: instances/templates/create_instance_w2.html:99
msgid "Custom CPU Models"
msgid "Custom CPU models"
msgstr "自定义 CPU 型号"
#: instances/templates/create_instance_w2.html:146 storages/forms.py:124
@ -5148,7 +5121,7 @@ msgid "Location"
msgstr "位置"
#: instances/templates/instances/info_tab.html:3
msgid "Guest Info"
msgid "Guest info"
msgstr "客户机信息"
#: instances/templates/instances/info_tab.html:4
@ -5156,11 +5129,11 @@ msgid "The guest agent did not answer"
msgstr "客户机代理没有响应"
#: instances/templates/instances/info_tab.html:8
msgid "OS Name"
msgid "OS name"
msgstr "操作系统名称"
#: instances/templates/instances/info_tab.html:10
msgid "OS Pretty-Name"
msgid "OS pretty name"
msgstr "操作系统完整名称"
#: instances/templates/instances/info_tab.html:12
@ -5168,15 +5141,15 @@ msgid "Version"
msgstr "版本"
#: instances/templates/instances/info_tab.html:14
msgid "Kernel Release"
msgid "Kernel release"
msgstr "内核发行版"
#: instances/templates/instances/info_tab.html:16
msgid "Kernel Version"
msgid "Kernel version"
msgstr "内核版本"
#: instances/templates/instances/info_tab.html:18
msgid "Timezone / Offset"
msgid "Time zone / offset"
msgstr "时区 / 偏移"
#: instances/templates/instances/info_tab.html:22
@ -5380,7 +5353,7 @@ msgid "now"
msgstr "当前"
#: instances/templates/instances/power_tab.html:25
msgid "Power On"
msgid "Power on"
msgstr "开机"
#: instances/templates/instances/power_tab.html:26
@ -5400,7 +5373,7 @@ msgid "An administrator can resume it."
msgstr "管理员可以将其恢复运行。"
#: instances/templates/instances/power_tab.html:56
msgid "Power Off"
msgid "Power off"
msgstr "关机"
#: instances/templates/instances/power_tab.html:57
@ -5424,21 +5397,13 @@ msgid ""
msgstr "不使用保存的状态启动 %(name)s?保存的状态将被丢弃,虚拟机重新引导;其内存中的内容会丢失。"
#: instances/templates/instances/power_tab.html:68
msgid "Start Without Saved State"
msgid "Start without saved state"
msgstr "不使用保存的状态启动"
#: instances/templates/instances/power_tab.html:73
msgid "A power cut: what the guest has not written to disk is lost."
msgstr "相当于断电:客户机尚未写入磁盘的数据将丢失。"
#: instances/templates/instances/power_tab.html:76
msgid "Force Off"
msgstr "强制关闭"
#: instances/templates/instances/power_tab.html:80
msgid "Power Cycle"
msgstr "电源重置"
#: instances/templates/instances/resize_tab.html:9
msgid "You don't have permission for resizing instance"
msgstr "您没有调整虚拟机配置的权限"
@ -7333,15 +7298,15 @@ msgid "The machine type is q35, not %(machine)s: UEFI Secure Boot needs it"
msgstr "机器类型为 q35,而不是 %(machine)s:UEFI 安全启动需要它"
#: instances/views.py:3017
msgid "Flavor Created"
msgid "Flavor created"
msgstr "规格已创建"
#: instances/views.py:3025
msgid "Create Flavor"
msgid "Create flavor"
msgstr "创建规格"
#: instances/views.py:3037
msgid "Flavor Deleted"
msgid "Flavor deleted"
msgstr "规格已删除"
#: instances/views.py:3043
@ -9195,10 +9160,6 @@ msgstr "创建存储池"
msgid "Upload ISO"
msgstr "上传 ISO"
#: storages/templates/create_stg_vol_block.html:16
msgid "Upload ISO Image"
msgstr "上传 ISO 镜像"
#: storages/templates/create_stg_vol_block.html:19
msgid "Upload iso form"
msgstr "上传 ISO 表单"
@ -9701,7 +9662,7 @@ msgid "VM report (.xlsx)"
msgstr "虚拟机报告 (.xlsx)"
#: templates/navbar.html:58
msgid "Log Out"
msgid "Log out"
msgstr "退出登录"
#: virtsecrets/forms.py:19

View file

@ -0,0 +1,11 @@
// The sticky navbar's height as --navbar-height on the page, for what sticks
// below it: themes give the navbar different heights, and a phone's menu opens it.
(function () {
var navbar = document.querySelector(".navbar.sticky-top");
if (!navbar) return;
function measure() {
document.documentElement.style.setProperty("--navbar-height", navbar.offsetHeight + "px");
}
measure();
if (window.ResizeObserver) new ResizeObserver(measure).observe(navbar);
})();

View file

@ -13,7 +13,7 @@
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="IsoUploadLabel">{% trans "Upload ISO Image" %}</h5>
<h5 class="modal-title" id="IsoUploadLabel">{% trans "Upload ISO image" %}</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="{% trans "Close" %}"></button>
</div>
<form id="isoUploadForm" action="{% url 'storage' compute.id pool %}" enctype="multipart/form-data" method="post" aria-label="{% trans "Upload iso form" %}"

View file

@ -92,6 +92,7 @@
<script src="{% static 'js/error_focus.js' %}"></script>
<script src="{% static 'js/back_links.js' %}"></script>
<script src="{% static 'js/scroll_rows.js' %}"></script>
<script src="{% static 'js/navbar_height.js' %}"></script>
<script src="{% static 'js/console_window.js' %}"></script>
{% block script %}{% endblock %}
</body>

View file

@ -55,7 +55,7 @@
<div class="dropdown-divider"></div>
<form method="post" action="{% url 'accounts:logout' %}">
{% csrf_token %}
<button type="submit" class="dropdown-item">{% bs_icon 'power' %} {% trans "Log Out" %}</button>
<button type="submit" class="dropdown-item">{% bs_icon 'power' %} {% trans "Log out" %}</button>
</form>
</div>
</li>