Skip to content

Commit c58d6f4

Browse files
committed
Corrected untranslated items
1 parent e0d83a3 commit c58d6f4

File tree

3 files changed

+23
-20
lines changed

3 files changed

+23
-20
lines changed

instances/forms.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,29 +15,31 @@ class Meta:
1515

1616

1717
class ConsoleForm(forms.Form):
18-
type = forms.ChoiceField()
19-
listen_on = forms.ChoiceField()
20-
generate_password = forms.BooleanField(required=False)
21-
clear_password = forms.BooleanField(required=False)
18+
type = forms.ChoiceField(label=_("Type"))
19+
listen_on = forms.ChoiceField(label=_("Listen on"))
20+
generate_password = forms.BooleanField(label=_("Generate password"), required=False)
21+
clear_password = forms.BooleanField(label=_("Clear password"), required=False)
2222
password = forms.CharField(
23+
label=_("Password"),
2324
widget=forms.PasswordInput(render_value=True),
2425
required=False
2526
)
26-
clear_keymap = forms.BooleanField(required=False)
27-
keymap = forms.ChoiceField(required=False)
27+
clear_keymap = forms.BooleanField(label=_("Clear keymap"), required=False)
28+
keymap = forms.ChoiceField(label=_("Keymap"), required=False)
2829

2930
def __init__(self, *args, **kwargs):
3031
super(ConsoleForm, self).__init__(*args, **kwargs)
3132
type_choices = (
3233
(c, c)
3334
for c in AppSettings.objects.get(key="QEMU_CONSOLE_DEFAULT_TYPE").choices_as_list()
3435
)
35-
keymap_choices = [("auto", "Auto")] + list((c, c) for c in QEMU_KEYMAPS)
36-
self.fields["type"] = forms.ChoiceField(choices=type_choices)
36+
keymap_choices = [("auto", _("Auto"))] + list((c, c) for c in QEMU_KEYMAPS)
37+
self.fields["type"] = forms.ChoiceField(label=_("Type"), choices=type_choices)
3738
self.fields["listen_on"] = forms.ChoiceField(
39+
label=_("Listen on"),
3840
choices=QEMU_CONSOLE_LISTENER_ADDRESSES
3941
)
40-
self.fields["keymap"] = forms.ChoiceField(choices=keymap_choices)
42+
self.fields["keymap"] = forms.ChoiceField(label=_("Keymap"), choices=keymap_choices)
4143

4244

4345
class NewVMForm(forms.ModelForm):

instances/templates/instances/settings_tab.html

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -265,15 +265,15 @@
265265
data-trigger="focus"
266266
data-bs-toggle="popover"
267267
data-bs-html="true"
268-
data-bs-content="<strong>Bus:</strong> {{ disk.bus }} <br/>
269-
<strong>Format:</strong> {{ disk.format }} <br/>
270-
<strong>Cache:</strong> {{ disk.cache }} <br/>
271-
<strong>Serial:</strong> {{ disk.serial }} <br/>
272-
<strong>Readonly:</strong> {{ disk.readonly }} <br/>
273-
<strong>Shareable:</strong> {{ disk.shareable }}</br>
274-
<strong>IO Mode:</strong> {{ disk.io }} <br/>
275-
<strong>Discard:</strong> {{ disk.discard }} <br/>
276-
<strong>Detect Zeroes:</strong> {{ disk.detect_zeroes }}">
268+
data-bs-content="<strong>{% trans 'Bus' %}:</strong> {{ disk.bus }} <br/>
269+
<strong>{% trans 'Format' %}:</strong> {{ disk.format }} <br/>
270+
<strong>{% trans 'Cache' %}:</strong> {{ disk.cache }} <br/>
271+
<strong>{% trans 'Serial' %}:</strong> {{ disk.serial }} <br/>
272+
<strong>{% trans 'Readonly' %}:</strong> {{ disk.readonly }} <br/>
273+
<strong>{% trans 'Shareable' %}:</strong> {{ disk.shareable }}</br>
274+
<strong>{% trans 'IO Mode' %}:</strong> {{ disk.io }} <br/>
275+
<strong>{% trans 'Discard' %}:</strong> {{ disk.discard }} <br/>
276+
<strong>{% trans 'Detect Zeroes' %}:</strong> {{ disk.detect_zeroes }}">
277277
<span>{% bs_icon 'info' %} </span>
278278
</button>
279279
{{ disk.dev }}

webvirtcloud/settings.py.template

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Django settings for webvirtcloud project.
66
import ldap
77
import subprocess
88
from django_auth_ldap.config import LDAPSearch, NestedActiveDirectoryGroupType
9+
from django.utils.translation import gettext_lazy as _
910
from pathlib import Path
1011

1112
# Build paths inside the project like this: BASE_DIR / 'subdir'.
@@ -213,8 +214,8 @@ SOCKETIO_PUBLIC_PATH = "socket.io/"
213214

214215
# List of console listen addresses
215216
QEMU_CONSOLE_LISTENER_ADDRESSES = (
216-
("127.0.0.1", "Localhost"),
217-
("0.0.0.0", "All interfaces"),
217+
("127.0.0.1", _("Localhost")),
218+
("0.0.0.0", _("All interfaces")),
218219
)
219220

220221
# List taken from http://qemu.weilnetz.de/qemu-doc.html#sec_005finvocation

0 commit comments

Comments
 (0)