1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2024-12-25 15:45:23 +00:00

update locale files and TR translations.

This commit is contained in:
catborise 2020-06-10 11:15:14 +03:00
parent 31c86a6a7b
commit 7bb6bd310b
30 changed files with 10038 additions and 5130 deletions

View file

@ -7,7 +7,7 @@ from django.conf import settings
class UserAddForm(forms.Form): class UserAddForm(forms.Form):
name = forms.CharField(label="Name", name = forms.CharField(label="Name",
error_messages={'required': _('No User name has been entered')}, error_messages={'required': _('No username has been entered')},
max_length=20) max_length=20)
password = forms.CharField(required=not settings.ALLOW_EMPTY_PASSWORD, password = forms.CharField(required=not settings.ALLOW_EMPTY_PASSWORD,
error_messages={'required': _('No password has been entered')},) error_messages={'required': _('No password has been entered')},)

View file

@ -22,7 +22,7 @@
<div class="col-lg-12"> <div class="col-lg-12">
<div class="alert alert-warning alert-dismissable"> <div class="alert alert-warning alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button> <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
<i class="fa fa-exclamation-triangle"></i> <strong>{% trans "Warning" %}:</strong> {% trans "You don't have any User" %} <i class="fa fa-exclamation-triangle"></i> <strong>{% trans "Warning" %}:</strong> {% trans "You don't have any user" %}
</div> </div>
</div> </div>
{% else %} {% else %}

View file

@ -18,7 +18,7 @@
<div class="col-lg-12"> <div class="col-lg-12">
<div class="alert alert-warning alert-dismissable"> <div class="alert alert-warning alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button> <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
<i class="fa fa-exclamation-triangle"></i> <strong>{% trans "Warning" %}:</strong> {% trans "You don't have any User" %} <i class="fa fa-exclamation-triangle"></i> <strong>{% trans "Warning" %}:</strong> {% trans "You don't have any user" %}
</div> </div>
</div> </div>
{% else %} {% else %}

View file

@ -22,7 +22,7 @@
<div class="col-lg-12"> <div class="col-lg-12">
<div class="alert alert-warning alert-dismissable"> <div class="alert alert-warning alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button> <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{% icon 'exclamation-triangle '%} <strong>{% trans "Warning" %}:</strong> {% trans "You don't have any users" %} {% icon 'exclamation-triangle '%} <strong>{% trans "Warning" %}:</strong> {% trans "You don't have any user" %}
</div> </div>
</div> </div>
{% else %} {% else %}
@ -35,7 +35,7 @@
<th span="col">{% trans "Staff" %}</th> <th span="col">{% trans "Staff" %}</th>
<th span="col">{% trans "Superuser" %}</th> <th span="col">{% trans "Superuser" %}</th>
<th span="col">{% trans "Can Clone" %}</th> <th span="col">{% trans "Can Clone" %}</th>
<th span="col">{% trans "" %}</th> <th span="col">""</th>
</tr> </tr>
</thead> </thead>
<tbody class="searchable"> <tbody class="searchable">

View file

@ -1,7 +1,7 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load i18n %} {% load i18n %}
{% load staticfiles %} {% load staticfiles %}
{% block title %}{% trans "Create new instanc" %} - {% trans "Select Type" %}{% endblock %} {% block title %}{% trans "Create new instance" %} - {% trans "Select Type" %}{% endblock %}
{% block content %} {% block content %}
<!-- Page Heading --> <!-- Page Heading -->

View file

@ -414,7 +414,7 @@
<div class="form-group row meta-prealloc"> <div class="form-group row meta-prealloc">
<label class="col-sm-3 col-form-label">{% trans "Disk Metadata" %}</label> <label class="col-sm-3 col-form-label">{% trans "Disk Metadata" %}</label>
<div class="col-sm-7"> <div class="col-sm-7">
<input type="checkbox" name="meta_prealloc" title="{% trans "Metadata Preallocation" %}" value="true"> <input type="checkbox" name="meta_prealloc" title="{% trans "Metadata preallocation" %}" value="true">
</div> </div>
<label class="col-lg-1 col-form-label">{% trans "Image" %}</label> <label class="col-lg-1 col-form-label">{% trans "Image" %}</label>
</div> </div>

View file

@ -229,7 +229,7 @@
{% endif %} {% endif %}
{% if status == 5 %} {% if status == 5 %}
<div role="tabpanel" class="tab-pane tab-pane-bordered active" id="boot"> <div role="tabpanel" class="tab-pane tab-pane-bordered active" id="boot">
<p>{% trans "Click on Boot button to start this instance." %}</p> <p>{% trans "Click on Power On button to start this instance." %}</p>
<form action="" method="post" role="form" aria-label="Start instance form">{% csrf_token %} <form action="" method="post" role="form" aria-label="Start instance form">{% csrf_token %}
{% if instance.is_template %} {% if instance.is_template %}
<p>{% trans "Template instance cannot be started." %}</p> <p>{% trans "Template instance cannot be started." %}</p>
@ -447,7 +447,7 @@
<form method="post" role="form" aria-label="Resize instance memory form">{% csrf_token %} <form method="post" role="form" aria-label="Resize instance memory form">{% csrf_token %}
<p class="font-weight-bold">{% trans "Total host memory" %}: {{ memory_host|filesizeformat }}</p> <p class="font-weight-bold">{% trans "Total host memory" %}: {{ memory_host|filesizeformat }}</p>
<div class="form-group row"> <div class="form-group row">
<label class="col-sm-4 col-form-label">{% trans "Current allocation" %} ({% trans "MB" %})</label> <label class="col-sm-4 col-form-label">{% trans "Current Allocation" %} ({% trans "MB" %})</label>
<div class="col-sm-4 js-custom__container"> <div class="col-sm-4 js-custom__container">
<select name="cur_memory" class="custom-select js-custom__toggle"> <select name="cur_memory" class="custom-select js-custom__toggle">
{% for mem in memory_range %} {% for mem in memory_range %}
@ -460,7 +460,7 @@
</div> </div>
<div class="form-group row"> <div class="form-group row">
<label class="col-sm-4 col-form-label"> <label class="col-sm-4 col-form-label">
{% trans "Maximum allocation" %} ({% trans "MB" %}) {% trans "Maximum Allocation" %} ({% trans "MB" %})
</label> </label>
<div class="col-sm-4 js-custom__container"> <div class="col-sm-4 js-custom__container">
<select name="memory" class="form-control js-custom__toggle"> <select name="memory" class="form-control js-custom__toggle">
@ -487,7 +487,7 @@
<p class="font-weight-bold">{% trans "Disk allocation (GB)" %}:</p> <p class="font-weight-bold">{% trans "Disk allocation (GB)" %}:</p>
{% for disk in disks %} {% for disk in disks %}
<div class="form-group row"> <div class="form-group row">
<label class="col-sm-4 col-form-label">{% trans "Current allocation" %} ({{ disk.dev }})</label> <label class="col-sm-4 col-form-label">{% trans "Current Allocation" %} ({{ disk.dev }})</label>
<div class="col-sm-4 js-custom__container"> <div class="col-sm-4 js-custom__container">
<input type="text" name="disk_size_{{ disk.dev }}" class="form-control" value="{{ disk.size|filesizeformat }}" /> <input type="text" name="disk_size_{{ disk.dev }}" class="form-control" value="{{ disk.size|filesizeformat }}" />
</div> </div>
@ -761,7 +761,7 @@
data-toggle="popover" data-toggle="popover"
data-html="true" data-html="true"
data-content="<strong>{% trans 'Bus' %}:</strong> {{ cd.bus }} <br/> data-content="<strong>{% trans 'Bus' %}:</strong> {{ cd.bus }} <br/>
<strong>{% trans 'Dev' %}:</strong> {{ cd.dev }}"> <strong>{% trans 'Device' %}:</strong> {{ cd.dev }}">
{% trans "CD-ROM" %} {{ forloop.counter }} {% trans "CD-ROM" %} {{ forloop.counter }}
</a> </a>
{% if not cd.image %} {% if not cd.image %}
@ -1053,7 +1053,7 @@
<tbody> <tbody>
{% for q, attrs in qos.items %} {% for q, attrs in qos.items %}
{% for att in attrs %} {% for att in attrs %}
<form method="post" role="form" aria-label="Instance Qos configuration form">{% csrf_token %} <form method="post" role="form" aria-label="Instance QoS configuration form">{% csrf_token %}
<tr> <tr>
<td><label class="col-form-label">{{ q }} {{ att.direction | capfirst }}</label></td> <td><label class="col-form-label">{{ q }} {{ att.direction | capfirst }}</label></td>
<td><input id="qos_average" class="form-control" name="qos_average" <td><input id="qos_average" class="form-control" name="qos_average"
@ -1176,8 +1176,8 @@
</form> </form>
<div class="clearfix"></div> <div class="clearfix"></div>
</div> </div>
<div role="tabpanel" class="tab-pane tab-pane-bordered" id="xmledit"> <div role="tabpanel" class="tab-pane ta"b-pane-bordered" id="xmledit">
<p>{% trans "If you need to edit xml please Power Off the instance" %}</p> <p>{% trans "If you need to edit XML please Power Off the instance" %}</p>
<form method="post" role="form" aria-label="Edit instance XML form">{% csrf_token %} <form method="post" role="form" aria-label="Edit instance XML form">{% csrf_token %}
<div class="col-sm-12" id="xmlheight"> <div class="col-sm-12" id="xmlheight">
<textarea id="editor">{{ inst_xml }}</textarea> <textarea id="editor">{{ inst_xml }}</textarea>

View file

@ -337,12 +337,12 @@ def instance(request, compute_id, vname):
if instance.uuid != uuid: if instance.uuid != uuid:
instance.uuid = uuid instance.uuid = uuid
instance.save() instance.save()
msg = _("Fixing uuid %s" % uuid) msg = _("Fixing UUID %s" % uuid)
addlogmsg(request.user.username, instance.name, msg) addlogmsg(request.user.username, instance.name, msg)
except Instance.DoesNotExist: except Instance.DoesNotExist:
instance = Instance(compute_id=compute_id, name=vname, uuid=uuid) instance = Instance(compute_id=compute_id, name=vname, uuid=uuid)
instance.save() instance.save()
msg = _("Instance.DoesNotExist: Creating new instance") msg = _("Instance does not exist: Creating new instance")
addlogmsg(request.user.username, instance.name, msg) addlogmsg(request.user.username, instance.name, msg)
userinstances = UserInstance.objects.filter(instance=instance).order_by('user__username') userinstances = UserInstance.objects.filter(instance=instance).order_by('user__username')
@ -600,10 +600,10 @@ def instance(request, compute_id, vname):
cache, io, discard, zeroes) cache, io, discard, zeroes)
if not conn.get_status() == 5: if not conn.get_status() == 5:
messages.success(request, _("Disk changes changes are applied. " + messages.success(request, _("Volume changes are applied. " +
"But it will be activated after shutdown")) "But it will be activated after shutdown"))
else: else:
messages.success(request, _("Disk is changed successfully.")) messages.success(request, _("Volume is changed successfully."))
msg = _('Edit disk: ' + target_dev) msg = _('Edit disk: ' + target_dev)
addlogmsg(request.user.username, instance.name, msg) addlogmsg(request.user.username, instance.name, msg)

View file

@ -22,36 +22,36 @@ class AddInterface(forms.Form):
ipv4_addr = self.cleaned_data['ipv4_addr'] ipv4_addr = self.cleaned_data['ipv4_addr']
have_symbol = re.match('^[0-9./]+$', ipv4_addr) have_symbol = re.match('^[0-9./]+$', ipv4_addr)
if not have_symbol: if not have_symbol:
raise forms.ValidationError(_('The ipv4 must not contain any special characters')) raise forms.ValidationError(_('The IPv4 address must not contain any special characters'))
elif len(ipv4_addr) > 20: elif len(ipv4_addr) > 20:
raise forms.ValidationError(_('The ipv4 must not exceed 20 characters')) raise forms.ValidationError(_('The IPv4 address must not exceed 20 characters'))
return ipv4_addr return ipv4_addr
def clean_ipv4_gw(self): def clean_ipv4_gw(self):
ipv4_gw = self.cleaned_data['ipv4_gw'] ipv4_gw = self.cleaned_data['ipv4_gw']
have_symbol = re.match('^[0-9.]+$', ipv4_gw) have_symbol = re.match('^[0-9.]+$', ipv4_gw)
if not have_symbol: if not have_symbol:
raise forms.ValidationError(_('The ipv4 gateway must not contain any special characters')) raise forms.ValidationError(_('The IPv4 gateway must not contain any special characters'))
elif len(ipv4_gw) > 20: elif len(ipv4_gw) > 20:
raise forms.ValidationError(_('The ipv4 gateway must not exceed 20 characters')) raise forms.ValidationError(_('The IPv4 gateway must not exceed 20 characters'))
return ipv4_gw return ipv4_gw
def clean_ipv6_addr(self): def clean_ipv6_addr(self):
ipv6_addr = self.cleaned_data['ipv6_addr'] ipv6_addr = self.cleaned_data['ipv6_addr']
have_symbol = re.match('^[0-9a-f./:]+$', ipv6_addr) have_symbol = re.match('^[0-9a-f./:]+$', ipv6_addr)
if not have_symbol: if not have_symbol:
raise forms.ValidationError(_('The ipv6 must not contain any special characters')) raise forms.ValidationError(_('The IPv6 address must not contain any special characters'))
elif len(ipv6_addr) > 100: elif len(ipv6_addr) > 100:
raise forms.ValidationError(_('The ipv6 must not exceed 100 characters')) raise forms.ValidationError(_('The IPv6 address must not exceed 100 characters'))
return ipv6_addr return ipv6_addr
def clean_ipv6_gw(self): def clean_ipv6_gw(self):
ipv6_gw = self.cleaned_data['ipv6_gw'] ipv6_gw = self.cleaned_data['ipv6_gw']
have_symbol = re.match('^[0-9.]+$', ipv6_gw) have_symbol = re.match('^[0-9.]+$', ipv6_gw)
if not have_symbol: if not have_symbol:
raise forms.ValidationError(_('The ipv6 gateway must not contain any special characters')) raise forms.ValidationError(_('The IPv6 gateway must not contain any special characters'))
elif len(ipv6_gw) > 100: elif len(ipv6_gw) > 100:
raise forms.ValidationError(_('The ipv6 gateway must not exceed 100 characters')) raise forms.ValidationError(_('The IPv6 gateway must not exceed 100 characters'))
return ipv6_gw return ipv6_gw
def clean_name(self): def clean_name(self):

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

File diff suppressed because it is too large Load diff

View file

@ -30,18 +30,18 @@ class AddNetPool(forms.Form):
subnet = self.cleaned_data['subnet'] subnet = self.cleaned_data['subnet']
have_symbol = re.match('^[0-9./]+$', subnet if subnet else ".") have_symbol = re.match('^[0-9./]+$', subnet if subnet else ".")
if not have_symbol: if not have_symbol:
raise forms.ValidationError(_('The pool subnet must not contain any special characters')) raise forms.ValidationError(_('The IPv4 subnet must not contain any special characters'))
elif len(subnet) > 20: elif len(subnet) > 20:
raise forms.ValidationError(_('The pool subnet must not exceed 20 characters')) raise forms.ValidationError(_('The IPv4 subnet must not exceed 20 characters'))
return subnet return subnet
def clean_subnet6(self): def clean_subnet6(self):
subnet = self.cleaned_data['subnet6'] subnet = self.cleaned_data['subnet6']
have_symbol = re.match('^[0-9a-fA-F:/]+$', subnet if subnet else ":") have_symbol = re.match('^[0-9a-fA-F:/]+$', subnet if subnet else ":")
if not have_symbol: if not have_symbol:
raise forms.ValidationError(_('The pool subnet must not contain any special characters')) raise forms.ValidationError(_('The IPv6 subnet must not contain any special characters'))
elif len(subnet) > 42: elif len(subnet) > 42:
raise forms.ValidationError(_('The pool subnet must not exceed 42 characters')) raise forms.ValidationError(_('The IPv6 subnet must not exceed 42 characters'))
return subnet return subnet
def clean_bridge_name(self): def clean_bridge_name(self):

View file

@ -44,7 +44,7 @@
</div> </div>
</div> </div>
<div class="form-group row bridge_name_form_group_dhcp"> <div class="form-group row bridge_name_form_group_dhcp">
<label class="col-sm-4 col-form-label">{% trans "Fixed Address" %}</label> <label class="col-sm-4 col-form-label">{% trans "Fixed Addresses" %}</label>
<div class="col-sm-6"> <div class="col-sm-6">
<input type="checkbox" name="fixed" value="true"> <input type="checkbox" name="fixed" value="true">
</div> </div>

View file

@ -149,7 +149,7 @@
{% include 'modify_ipv4_fixed_address.html' %} {% include 'modify_ipv4_fixed_address.html' %}
{% endif %} {% endif %}
<h5 class="page-header">{% trans "IPv4 Fixed Address" %}</h5> <h5 class="page-header">{% trans "IPv4 Fixed Addresses" %}</h5>
{% endif %} {% endif %}
@ -261,7 +261,7 @@
{% if state %} {% if state %}
{% include 'modify_ipv6_fixed_address.html' %} {% include 'modify_ipv6_fixed_address.html' %}
{% endif %} {% endif %}
<h5 class="page-header">{% trans "IPv6 Fixed Address" %}</h5> <h5 class="page-header">{% trans "IPv6 Fixed Addresses" %}</h5>
{% endif %} {% endif %}
{% if ipv6_fixed_address %} {% if ipv6_fixed_address %}

View file

@ -45,9 +45,9 @@ class AddStgPool(forms.Form):
have_symbol = re.match('^[a-zA-Z0-9\/]+$', source) have_symbol = re.match('^[a-zA-Z0-9\/]+$', source)
if storage_type == 'logical' or storage_type == 'netfs': if storage_type == 'logical' or storage_type == 'netfs':
if not source: if not source:
raise forms.ValidationError(_('No device has been entered')) raise forms.ValidationError(_('No device or path has been entered'))
if not have_symbol: if not have_symbol:
raise forms.ValidationError(_('The source must not contain any special characters')) raise forms.ValidationError(_('The disk source must not contain any special characters'))
return source return source

View file

@ -38,6 +38,10 @@
<i class="fa fa-fw fa-user"></i> {{ request.user.username }} <i class="fa fa-fw fa-user"></i> {{ request.user.username }}
</a> </a>
<div class="dropdown-menu" aria-labelledby="navbarUserDropdown"> <div class="dropdown-menu" aria-labelledby="navbarUserDropdown">
{% get_current_language as LANGUAGE_CODE %}
<a class="dropdown-item disabled" href="#">
{% trans "Language" %}: <span class="badge badge-secondary">{{ LANGUAGE_CODE }}</span>
</a>
<a class="dropdown-item {% view_active request 'profile' %}" href="{% url 'profile' %}"><i class="fa fa-fw fa-pencil-square-o"></i> {% trans "Profile" %}</a> <a class="dropdown-item {% view_active request 'profile' %}" href="{% url 'profile' %}"><i class="fa fa-fw fa-pencil-square-o"></i> {% trans "Profile" %}</a>
<div class="dropdown-divider"></div> <div class="dropdown-divider"></div>
<a class="dropdown-item" href="{% url 'logout' %}"><i class="fa fa-fw fa-power-off"></i> {% trans "Log Out" %}</a> <a class="dropdown-item" href="{% url 'logout' %}"><i class="fa fa-fw fa-power-off"></i> {% trans "Log Out" %}</a>