1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2024-12-24 15:15:22 +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):
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)
password = forms.CharField(required=not settings.ALLOW_EMPTY_PASSWORD,
error_messages={'required': _('No password has been entered')},)

View file

@ -22,7 +22,7 @@
<div class="col-lg-12">
<div class="alert alert-warning alert-dismissable">
<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>
{% else %}

View file

@ -18,7 +18,7 @@
<div class="col-lg-12">
<div class="alert alert-warning alert-dismissable">
<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>
{% else %}

View file

@ -22,7 +22,7 @@
<div class="col-lg-12">
<div class="alert alert-warning alert-dismissable">
<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>
{% else %}
@ -35,7 +35,7 @@
<th span="col">{% trans "Staff" %}</th>
<th span="col">{% trans "Superuser" %}</th>
<th span="col">{% trans "Can Clone" %}</th>
<th span="col">{% trans "" %}</th>
<th span="col">""</th>
</tr>
</thead>
<tbody class="searchable">

View file

@ -1,10 +1,10 @@
{% extends "base.html" %}
{% load i18n %}
{% load staticfiles %}
{% block title %}{% trans "Create new instanc" %} - {% trans "Select Type" %}{% endblock %}
{% block title %}{% trans "Create new instance" %} - {% trans "Select Type" %}{% endblock %}
{% block content %}
<!-- Page Heading -->
<!-- Page Heading -->
<div class="row">
<div class="col-lg-12">
<h3 class="page-header">{% trans "New instance on" %} {{ compute.name }}</h3>

View file

@ -414,7 +414,7 @@
<div class="form-group row meta-prealloc">
<label class="col-sm-3 col-form-label">{% trans "Disk Metadata" %}</label>
<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>
<label class="col-lg-1 col-form-label">{% trans "Image" %}</label>
</div>

View file

@ -229,7 +229,7 @@
{% endif %}
{% if status == 5 %}
<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 %}
{% if instance.is_template %}
<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 %}
<p class="font-weight-bold">{% trans "Total host memory" %}: {{ memory_host|filesizeformat }}</p>
<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">
<select name="cur_memory" class="custom-select js-custom__toggle">
{% for mem in memory_range %}
@ -460,7 +460,7 @@
</div>
<div class="form-group row">
<label class="col-sm-4 col-form-label">
{% trans "Maximum allocation" %} ({% trans "MB" %})
{% trans "Maximum Allocation" %} ({% trans "MB" %})
</label>
<div class="col-sm-4 js-custom__container">
<select name="memory" class="form-control js-custom__toggle">
@ -487,7 +487,7 @@
<p class="font-weight-bold">{% trans "Disk allocation (GB)" %}:</p>
{% for disk in disks %}
<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">
<input type="text" name="disk_size_{{ disk.dev }}" class="form-control" value="{{ disk.size|filesizeformat }}" />
</div>
@ -761,7 +761,7 @@
data-toggle="popover"
data-html="true"
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 }}
</a>
{% if not cd.image %}
@ -1053,7 +1053,7 @@
<tbody>
{% for q, attrs in qos.items %}
{% 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>
<td><label class="col-form-label">{{ q }} {{ att.direction | capfirst }}</label></td>
<td><input id="qos_average" class="form-control" name="qos_average"
@ -1176,8 +1176,8 @@
</form>
<div class="clearfix"></div>
</div>
<div role="tabpanel" class="tab-pane tab-pane-bordered" id="xmledit">
<p>{% trans "If you need to edit xml please Power Off the instance" %}</p>
<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>
<form method="post" role="form" aria-label="Edit instance XML form">{% csrf_token %}
<div class="col-sm-12" id="xmlheight">
<textarea id="editor">{{ inst_xml }}</textarea>

View file

@ -337,12 +337,12 @@ def instance(request, compute_id, vname):
if instance.uuid != uuid:
instance.uuid = uuid
instance.save()
msg = _("Fixing uuid %s" % uuid)
msg = _("Fixing UUID %s" % uuid)
addlogmsg(request.user.username, instance.name, msg)
except Instance.DoesNotExist:
instance = Instance(compute_id=compute_id, name=vname, uuid=uuid)
instance.save()
msg = _("Instance.DoesNotExist: Creating new instance")
msg = _("Instance does not exist: Creating new instance")
addlogmsg(request.user.username, instance.name, msg)
userinstances = UserInstance.objects.filter(instance=instance).order_by('user__username')
@ -600,10 +600,10 @@ def instance(request, compute_id, vname):
cache, io, discard, zeroes)
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"))
else:
messages.success(request, _("Disk is changed successfully."))
messages.success(request, _("Volume is changed successfully."))
msg = _('Edit disk: ' + target_dev)
addlogmsg(request.user.username, instance.name, msg)

View file

@ -22,36 +22,36 @@ class AddInterface(forms.Form):
ipv4_addr = self.cleaned_data['ipv4_addr']
have_symbol = re.match('^[0-9./]+$', ipv4_addr)
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:
raise forms.ValidationError(_('The ipv4 must not exceed 20 characters'))
raise forms.ValidationError(_('The IPv4 address must not exceed 20 characters'))
return ipv4_addr
def clean_ipv4_gw(self):
ipv4_gw = self.cleaned_data['ipv4_gw']
have_symbol = re.match('^[0-9.]+$', ipv4_gw)
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:
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
def clean_ipv6_addr(self):
ipv6_addr = self.cleaned_data['ipv6_addr']
have_symbol = re.match('^[0-9a-f./:]+$', ipv6_addr)
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:
raise forms.ValidationError(_('The ipv6 must not exceed 100 characters'))
raise forms.ValidationError(_('The IPv6 address must not exceed 100 characters'))
return ipv6_addr
def clean_ipv6_gw(self):
ipv6_gw = self.cleaned_data['ipv6_gw']
have_symbol = re.match('^[0-9.]+$', ipv6_gw)
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:
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
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']
have_symbol = re.match('^[0-9./]+$', subnet if subnet else ".")
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:
raise forms.ValidationError(_('The pool subnet must not exceed 20 characters'))
raise forms.ValidationError(_('The IPv4 subnet must not exceed 20 characters'))
return subnet
def clean_subnet6(self):
subnet = self.cleaned_data['subnet6']
have_symbol = re.match('^[0-9a-fA-F:/]+$', subnet if subnet else ":")
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:
raise forms.ValidationError(_('The pool subnet must not exceed 42 characters'))
raise forms.ValidationError(_('The IPv6 subnet must not exceed 42 characters'))
return subnet
def clean_bridge_name(self):

View file

@ -44,7 +44,7 @@
</div>
</div>
<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">
<input type="checkbox" name="fixed" value="true">
</div>

View file

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

View file

@ -45,9 +45,9 @@ class AddStgPool(forms.Form):
have_symbol = re.match('^[a-zA-Z0-9\/]+$', source)
if storage_type == 'logical' or storage_type == 'netfs':
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:
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

View file

@ -38,6 +38,10 @@
<i class="fa fa-fw fa-user"></i> {{ request.user.username }}
</a>
<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>
<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>