Skip to content

Commit

Permalink
Corrected untranslated items
Browse files Browse the repository at this point in the history
  • Loading branch information
kuletco committed Dec 13, 2023
1 parent e0d83a3 commit c58d6f4
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 20 deletions.
20 changes: 11 additions & 9 deletions instances/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,29 +15,31 @@ class Meta:


class ConsoleForm(forms.Form):
type = forms.ChoiceField()
listen_on = forms.ChoiceField()
generate_password = forms.BooleanField(required=False)
clear_password = forms.BooleanField(required=False)
type = forms.ChoiceField(label=_("Type"))
listen_on = forms.ChoiceField(label=_("Listen on"))
generate_password = forms.BooleanField(label=_("Generate password"), required=False)
clear_password = forms.BooleanField(label=_("Clear password"), required=False)
password = forms.CharField(
label=_("Password"),
widget=forms.PasswordInput(render_value=True),
required=False
)
clear_keymap = forms.BooleanField(required=False)
keymap = forms.ChoiceField(required=False)
clear_keymap = forms.BooleanField(label=_("Clear keymap"), required=False)
keymap = forms.ChoiceField(label=_("Keymap"), required=False)

def __init__(self, *args, **kwargs):
super(ConsoleForm, self).__init__(*args, **kwargs)
type_choices = (
(c, c)
for c in AppSettings.objects.get(key="QEMU_CONSOLE_DEFAULT_TYPE").choices_as_list()
)
keymap_choices = [("auto", "Auto")] + list((c, c) for c in QEMU_KEYMAPS)
self.fields["type"] = forms.ChoiceField(choices=type_choices)
keymap_choices = [("auto", _("Auto"))] + list((c, c) for c in QEMU_KEYMAPS)
self.fields["type"] = forms.ChoiceField(label=_("Type"), choices=type_choices)
self.fields["listen_on"] = forms.ChoiceField(
label=_("Listen on"),
choices=QEMU_CONSOLE_LISTENER_ADDRESSES
)
self.fields["keymap"] = forms.ChoiceField(choices=keymap_choices)
self.fields["keymap"] = forms.ChoiceField(label=_("Keymap"), choices=keymap_choices)


class NewVMForm(forms.ModelForm):
Expand Down
18 changes: 9 additions & 9 deletions instances/templates/instances/settings_tab.html
Original file line number Diff line number Diff line change
Expand Up @@ -265,15 +265,15 @@
data-trigger="focus"
data-bs-toggle="popover"
data-bs-html="true"
data-bs-content="<strong>Bus:</strong> {{ disk.bus }} <br/>
<strong>Format:</strong> {{ disk.format }} <br/>
<strong>Cache:</strong> {{ disk.cache }} <br/>
<strong>Serial:</strong> {{ disk.serial }} <br/>
<strong>Readonly:</strong> {{ disk.readonly }} <br/>
<strong>Shareable:</strong> {{ disk.shareable }}</br>
<strong>IO Mode:</strong> {{ disk.io }} <br/>
<strong>Discard:</strong> {{ disk.discard }} <br/>
<strong>Detect Zeroes:</strong> {{ disk.detect_zeroes }}">
data-bs-content="<strong>{% trans 'Bus' %}:</strong> {{ disk.bus }} <br/>
<strong>{% trans 'Format' %}:</strong> {{ disk.format }} <br/>
<strong>{% trans 'Cache' %}:</strong> {{ disk.cache }} <br/>
<strong>{% trans 'Serial' %}:</strong> {{ disk.serial }} <br/>
<strong>{% trans 'Readonly' %}:</strong> {{ disk.readonly }} <br/>
<strong>{% trans 'Shareable' %}:</strong> {{ disk.shareable }}</br>
<strong>{% trans 'IO Mode' %}:</strong> {{ disk.io }} <br/>
<strong>{% trans 'Discard' %}:</strong> {{ disk.discard }} <br/>
<strong>{% trans 'Detect Zeroes' %}:</strong> {{ disk.detect_zeroes }}">
<span>{% bs_icon 'info' %} </span>
</button>
{{ disk.dev }}
Expand Down
5 changes: 3 additions & 2 deletions webvirtcloud/settings.py.template
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Django settings for webvirtcloud project.
import ldap
import subprocess
from django_auth_ldap.config import LDAPSearch, NestedActiveDirectoryGroupType
from django.utils.translation import gettext_lazy as _
from pathlib import Path

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

# List of console listen addresses
QEMU_CONSOLE_LISTENER_ADDRESSES = (
("127.0.0.1", "Localhost"),
("0.0.0.0", "All interfaces"),
("127.0.0.1", _("Localhost")),
("0.0.0.0", _("All interfaces")),
)

# List taken from http:https://qemu.weilnetz.de/qemu-doc.html#sec_005finvocation
Expand Down

0 comments on commit c58d6f4

Please sign in to comment.