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

Translate, indentation and typo fixes

This commit is contained in:
catborise 2019-07-31 11:03:48 +03:00
parent f3b8b251b5
commit b18290794e
23 changed files with 3013 additions and 3031 deletions

View file

@ -30,11 +30,11 @@
<table class="table table-striped table-hover"> <table class="table table-striped table-hover">
<thead> <thead>
<tr> <tr>
<th>Username</th> <th>{% trans "Username" %}</th>
<th>Status</th> <th>{% trans "Status" %}</th>
<th>Staff</th> <th>{% trans "Staff" %}</th>
<th>Superuser</th> <th>{% trans "Superuser" %}</th>
<th>Clone</th> <th>{% trans "Clone" %}</th>
</tr> </tr>
</thead> </thead>
<tbody class="searchable"> <tbody class="searchable">

View file

@ -37,7 +37,7 @@
<div class="panel-body"> <div class="panel-body">
<div class="row"> <div class="row">
<div class="col-xs-4 col-sm-4"> <div class="col-xs-4 col-sm-4">
<p><strong>{% trans "Status:" %}</strong></p> <p><strong>{% trans "Status" %}:</strong></p>
</div> </div>
<div class="col-xs-4 col-sm-6"> <div class="col-xs-4 col-sm-6">
{% if compute.status %} {% if compute.status %}
@ -235,7 +235,6 @@
</div><!-- /.modal-content --> </div><!-- /.modal-content -->
</div><!-- /.modal-dialog --> </div><!-- /.modal-dialog -->
</div><!-- /.modal --> </div><!-- /.modal -->
</div> </div>
</div> </div>
</div> </div>
@ -244,7 +243,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 "Hypervisor doesn't have any Computes" %} <i class="fa fa-exclamation-triangle"></i> <strong>{% trans "Warning" %}:</strong> {% trans "Hypervisor doesn't have any Computes" %}
</div> </div>
</div> </div>
{% endif %} {% endif %}

View file

@ -62,9 +62,9 @@
</p> </p>
<p>{{ emulator }}</p> <p>{{ emulator }}</p>
<p> <p>
<span class="label label-default">{% trans 'Qemu' %} </span> <span class="label label-default">Qemu</span>
<span class="label label-primary">{{ version }}</span> &nbsp; <span class="label label-primary">{{ version }}</span> &nbsp;
<span class="label label-default">{% trans 'Libvirt' %} </span> <span class="label label-default">Libvirt</span>
<span class="label label-primary">{{ lib_version }}</span> &nbsp; <span class="label label-primary">{{ lib_version }}</span> &nbsp;
</p> </p>
<p>{{ host_memory|filesizeformat }}</p> <p>{{ host_memory|filesizeformat }}</p>

View file

@ -17,7 +17,6 @@
<form class="form-horizontal" method="post" role="form">{% csrf_token %} <form class="form-horizontal" method="post" role="form">{% csrf_token %}
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">{% trans "Name" %}</label> <label class="col-sm-3 control-label">{% trans "Name" %}</label>
<div class="col-sm-6"> <div class="col-sm-6">
<input type="text" name="label" class="form-control" placeholder="Micro" maxlength="20" <input type="text" name="label" class="form-control" placeholder="Micro" maxlength="20"
required pattern="[a-zA-Z0-9]+"> required pattern="[a-zA-Z0-9]+">
@ -25,7 +24,6 @@
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">{% trans "VCPU" %}</label> <label class="col-sm-3 control-label">{% trans "VCPU" %}</label>
<div class="col-sm-6"> <div class="col-sm-6">
<input type="text" class="form-control" name="vcpu" value="1" maxlength="1" required <input type="text" class="form-control" name="vcpu" value="1" maxlength="1" required
pattern="[0-9]"> pattern="[0-9]">
@ -33,7 +31,6 @@
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">{% trans "RAM" %}</label> <label class="col-sm-3 control-label">{% trans "RAM" %}</label>
<div class="col-sm-6"> <div class="col-sm-6">
<input type="text" class="form-control" name="memory" value="512" maxlength="5" required <input type="text" class="form-control" name="memory" value="512" maxlength="5" required
pattern="[0-9]+"> pattern="[0-9]+">
@ -42,7 +39,6 @@
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">{% trans "HDD" %}</label> <label class="col-sm-3 control-label">{% trans "HDD" %}</label>
<div class="col-sm-6"> <div class="col-sm-6">
<input type="text" class="form-control" name="disk" value="10" maxlength="3" required <input type="text" class="form-control" name="disk" value="10" maxlength="3" required
pattern="[0-9]+"> pattern="[0-9]+">

View file

@ -436,7 +436,6 @@
</div> </div>
<label class="col-sm-1 control-label">{% trans "MB" %}</label> <label class="col-sm-1 control-label">{% trans "MB" %}</label>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">{% trans "HDD" %}</label> <label class="col-sm-3 control-label">{% trans "HDD" %}</label>
<input id="images" name="images" type="hidden" value=""/> <input id="images" name="images" type="hidden" value=""/>
@ -582,8 +581,7 @@
</div> </div>
<div class="clearfix"></div> <div class="clearfix"></div>
</div> </div>
</div> </div><!-- /Tab panes -->
<!-- /Tab panes -->
</div> </div>
{% endblock %} {% endblock %}
@ -607,7 +605,6 @@
} }
$(document).ready(function () { $(document).ready(function () {
$('#image-control').multiselect({ $('#image-control').multiselect({
disableIfEmpty: true, disableIfEmpty: true,
enableCaseInsensitiveFiltering: true, enableCaseInsensitiveFiltering: true,
@ -716,7 +713,6 @@
function get_disk_bus_choices(compute_id, dev_idx, disk_type){ function get_disk_bus_choices(compute_id, dev_idx, disk_type){
get_diskBus_url = "/computes/" + compute_id + "/disk/" + disk_type + "/buses"; get_diskBus_url = "/computes/" + compute_id + "/disk/" + disk_type + "/buses";
$.getJSON(get_diskBus_url, function (data) { $.getJSON(get_diskBus_url, function (data) {
$("#bus" + dev_idx).find('option').remove(); $("#bus" + dev_idx).find('option').remove();
$.each(data['bus'], function(i, item) { $.each(data['bus'], function(i, item) {

View file

@ -48,7 +48,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 Instance" %} <i class="fa fa-exclamation-triangle"></i> <strong>{% trans "Warning" %}:</strong> {% trans "You don't have any Instance" %}
</div> </div>
</div> </div>
{% else %} {% else %}

View file

@ -3,7 +3,7 @@
<thead> <thead>
<tr> <tr>
<th><a href="#" id="hide_all_instances" onclick="hide_all_host_instances()">#</a> </th> <th><a href="#" id="hide_all_instances" onclick="hide_all_host_instances()">#</a> </th>
<th>{% trans "Name" %}<br>{% trans "Description" %}</th></th> <th>{% trans "Name" %}<br>{% trans "Description" %}</th>
<th>{% trans "User"%}</th> <th>{% trans "User"%}</th>
<th>{% trans "Status" %}</th> <th>{% trans "Status" %}</th>
<th>{% trans "VCPU" %}</th> <th>{% trans "VCPU" %}</th>

View file

@ -2,11 +2,11 @@
<table class="table table-hover table-striped sortable-theme-bootstrap" data-sortable> <table class="table table-hover table-striped sortable-theme-bootstrap" data-sortable>
<thead> <thead>
<tr> <tr>
<th>Name<br>Description</th> <th>{% trans "Name" %}<br>{% trans "Description" %}</th>
<th>Host<br>User</th> <th>{% trans "Host" %}<br>{% trans "User"%}</th>
<th>Status</th> <th>{% trans "Status" %}</th>
<th>VCPU</th> <th>{% trans "VCPU" %}</th>
<th>Memory</th> <th>{% trans "Memory" %}</th>
<th data-sortable="false" style="width:205px;">{% trans "Actions" %}</th> <th data-sortable="false" style="width:205px;">{% trans "Actions" %}</th>
</tr> </tr>
</thead> </thead>

View file

@ -48,7 +48,6 @@
{% include 'errors_block.html' %} {% include 'errors_block.html' %}
{% include 'messages_block.html' %} {% include 'messages_block.html' %}
<div class="row" id="max-width-page"> <div class="row" id="max-width-page">
<div class="col-lg-12"> <div class="col-lg-12">
<div role="tabpanel"> <div role="tabpanel">
@ -1567,7 +1566,6 @@ $(document).ready(function () {
}); });
set_orderlist($("#bootorder")); set_orderlist($("#bootorder"));
}); });
}); });
</script> </script>
<script> <script>
@ -1582,7 +1580,6 @@ $(document).ready(function () {
<script src="{% static "js/Chart.bundle.min.js" %}"></script> <script src="{% static "js/Chart.bundle.min.js" %}"></script>
<script> <script>
$('#chartgraphs').on('shown.bs.tab', function (event) { $('#chartgraphs').on('shown.bs.tab', function (event) {
var cpu_ctx = $("#cpuChart").get(0).getContext("2d"); var cpu_ctx = $("#cpuChart").get(0).getContext("2d");
var cpuChart = new Chart(cpu_ctx, { var cpuChart = new Chart(cpu_ctx, {
type: 'line', type: 'line',
@ -1803,7 +1800,6 @@ $(document).ready(function () {
$.getJSON('{% url 'inst_graph' compute_id vname %}', function (data) { $.getJSON('{% url 'inst_graph' compute_id vname %}', function (data) {
cpuChart.data.labels.push(data.timeline); cpuChart.data.labels.push(data.timeline);
cpuChart.data.datasets[0].data.push(data.cpudata); cpuChart.data.datasets[0].data.push(data.cpudata);
if (cpuChart.data.datasets[0].data.length > 10){ if (cpuChart.data.datasets[0].data.length > 10){
cpuChart.data.labels.shift(); cpuChart.data.labels.shift();
@ -1812,8 +1808,6 @@ $(document).ready(function () {
cpuChart.update(); cpuChart.update();
memChart.data.labels.push(data.timeline); memChart.data.labels.push(data.timeline);
memChart.options.scales.yAxes[0].ticks.max = parseInt(data.memdata.total / 1024); memChart.options.scales.yAxes[0].ticks.max = parseInt(data.memdata.total / 1024);
memChart.options.scales.yAxes[0].ticks.stepSize = parseInt(data.memdata.total / (1024 * 5)); memChart.options.scales.yAxes[0].ticks.stepSize = parseInt(data.memdata.total / (1024 * 5));
memChart.data.datasets[0].data.push(data.memdata.used / 1024); memChart.data.datasets[0].data.push(data.memdata.used / 1024);
@ -1823,7 +1817,6 @@ $(document).ready(function () {
} }
memChart.update(); memChart.update();
for (let j = 0; j < data.blkdata.length; j++) { for (let j = 0; j < data.blkdata.length; j++) {
diskChart[data.blkdata[j].dev].data.labels.push(data.timeline); diskChart[data.blkdata[j].dev].data.labels.push(data.timeline);

View file

@ -24,7 +24,6 @@
</div> </div>
<div class="row"> <div class="row">
<div class="col-lg-12"> <div class="col-lg-12">
<ol class="breadcrumb"> <ol class="breadcrumb">
<li class="active"> <li class="active">
<i class="fa fa-dashboard"></i> <a href="{% url 'overview' compute.id %}">{% trans "Overview" %}</a> <i class="fa fa-dashboard"></i> <a href="{% url 'overview' compute.id %}">{% trans "Overview" %}</a>
@ -51,14 +50,13 @@
</div> </div>
</div> </div>
<!-- /.row --> <!-- /.row -->
{% include 'errors_block.html' %} {% include 'errors_block.html' %}
<div class="row"> <div class="row">
{% if not all_host_vms %} {% if not all_host_vms %}
<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 "Hypervisor doesn't have any instances" %} <i class="fa fa-exclamation-triangle"></i> <strong>{% trans "Warning" %}:</strong> {% trans "Hypervisor doesn't have any instances" %}
</div> </div>
</div> </div>
{% else %} {% else %}
@ -67,7 +65,7 @@
<thead> <thead>
<tr> <tr>
<th>{% trans 'Name' %}<br>{% trans 'Description' %}</th> <th>{% trans 'Name' %}<br>{% trans 'Description' %}</th>
<th>{% trans 'Host' %}<br>{% trans 'User' %}</th> <th>{% trans 'User' %}</th>
<th>{% trans 'Status' %}</th> <th>{% trans 'Status' %}</th>
<th>{% trans 'VCPU' %}</th> <th>{% trans 'VCPU' %}</th>
<th>{% trans 'Memory' %}</th> <th>{% trans 'Memory' %}</th>
@ -79,7 +77,7 @@
{% for vm, info in inst.items %} {% for vm, info in inst.items %}
<tr> <tr>
<td><a href="{% url 'instance' host.0 vm %}">{{ vm }}</a><br><small><em>{{ info.title }}</em></small></td> <td><a href="{% url 'instance' host.0 vm %}">{{ vm }}</a><br><small><em>{{ info.title }}</em></small></td>
<td><a href="{% url 'overview' host.0 %}">{{ host.1 }}</a><br><small><em>{% if info.userinstances.count > 0 %}{{ info.userinstances.first_user.user.username }}{% if info.userinstances.count > 1 %} (+{{ info.userinstances.count|add:"-1" }}){% endif %}{% endif %}</em></small></td> <td><em>{% if info.userinstances.count > 0 %}{{ info.userinstances.first_user.user.username }}{% if info.userinstances.count > 1 %} (+{{ info.userinstances.count|add:"-1" }}){% endif %}{% endif %}</em></td>
<td> <td>
{% ifequal info.status 1 %}<span class="text-success">{% trans "Active" %}</span>{% endifequal %} {% ifequal info.status 1 %}<span class="text-success">{% trans "Active" %}</span>{% endifequal %}
{% ifequal info.status 5 %}<span class="text-danger">{% trans "Off" %}</span>{% endifequal %} {% ifequal info.status 5 %}<span class="text-danger">{% trans "Off" %}</span>{% endifequal %}
@ -87,7 +85,8 @@
</td> </td>
<td>{{ info.vcpu }}</td> <td>{{ info.vcpu }}</td>
<td>{{ info.memory|filesizeformat }}</td> <td>{{ info.memory|filesizeformat }}</td>
<td><form action="" method="post" role="form">{% csrf_token %} <td>
<form action="" method="post" role="form">{% csrf_token %}
<input type="hidden" name="name" value="{{ vm }}"/> <input type="hidden" name="name" value="{{ vm }}"/>
<input type="hidden" name="compute_id" value="{{ host.0 }}"/> <input type="hidden" name="compute_id" value="{{ host.0 }}"/>
{% ifequal info.status 5 %} {% ifequal info.status 5 %}

View file

@ -37,16 +37,16 @@
<div class="row"> <div class="row">
<div class="col-xs-6 col-sm-4"> <div class="col-xs-6 col-sm-4">
<p>{% trans "Interface:" %}</p> <p>{% trans "Interface" %}:</p>
<p>{% trans "IPv4:" %} ({% ifequal ipv4 None %}None{% else %}{{ ipv4_type }}{% endifequal %})</p> <p>{% trans "IPv4" %}: ({% ifequal ipv4 None %}{% trans 'None' %}{% else %}{{ ipv4_type }}{% endifequal %})</p>
<p>{% trans "IPv6:" %} ({% ifequal ipv6 None %}None{% else %}{{ ipv6_type }}{% endifequal %})</p> <p>{% trans "IPv6" %}: ({% ifequal ipv6 None %}{% trans 'None' %}{% else %}{{ ipv6_type }}{% endifequal %})</p>
<p>{% trans "MAC Adress:" %}</p> <p>{% trans "MAC Adress" %}:</p>
<p>{% trans "Interface Type:" %}</p> <p>{% trans "Interface Type" %}:</p>
{% ifequal itype 'bridge' %} {% ifequal itype 'bridge' %}
<p>{% trans "Bridge device" %}</p> <p>{% trans "Bridge device" %}</p>
{% endifequal %} {% endifequal %}
<p>{% trans "Boot Mode:" %}</p> <p>{% trans "Boot Mode" %}:</p>
<p>{% trans "State:" %}</p> <p>{% trans "State" %}:</p>
</div> </div>
<div class="col-xs-6 col-sm-6"> <div class="col-xs-6 col-sm-6">
<p><strong>{{ iface }}</strong></p> <p><strong>{{ iface }}</strong></p>

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 Logs" %} <i class="fa fa-exclamation-triangle"></i> <strong>{% trans "Warning" %}:</strong> {% trans "You don't have any Logs" %}
</div> </div>
</div> </div>
{% else %} {% else %}
@ -39,8 +39,8 @@
<tr> <tr>
<td>{{ log.id }}</td> <td>{{ log.id }}</td>
<td style="width:130px;">{{ log.date|date:"M d H:i:s" }}</td> <td style="width:130px;">{{ log.date|date:"M d H:i:s" }}</td>
<td>{{ log.user }}</a></td> <td>{{ log.user }}</td>
<td>{{ log.instance }}</a></td> <td>{{ log.instance }}</td>
<td>{{ log.message }}</td> <td>{{ log.message }}</td>
</tr> </tr>
{% endfor %} {% endfor %}

View file

@ -39,7 +39,6 @@
<input type="text" class="form-control" name="mac" required pattern="[0-9\/\:]+"> <input type="text" class="form-control" name="mac" required pattern="[0-9\/\:]+">
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">

View file

@ -44,20 +44,20 @@
<div class="row"> <div class="row">
<div class="col-xs-6 col-sm-6"> <div class="col-xs-6 col-sm-6">
<p>{% trans "Pool name:" %}</p> <p>{% trans "Pool name" %}:</p>
<p>{% trans "Pool type:" %}</p> <p>{% trans "Pool type" %}:</p>
<p>{% trans "Pool path:" %}</p> <p>{% trans "Pool path" %}:</p>
<p>{% trans "Pool status:" %}</p> <p>{% trans "Pool status" %}:</p>
<p>{% trans "Size:" %} ({{ size|filesizeformat }} / {{ used|filesizeformat }})</p> <p>{% trans "Size" %}: ({{ size|filesizeformat }} / {{ used|filesizeformat }})</p>
<p>{% trans "State:" %}</p> <p>{% trans "State" %}:</p>
<p>{% trans "Autostart:" %}</p> <p>{% trans "Autostart" %}:</p>
</div> </div>
<div class="col-xs-6 col-sm-6"> <div class="col-xs-6 col-sm-6">
<p>{{ pool }}</p> <p>{{ pool }}</p>
<p>{% if not type %}{% trans "None" %}{% else %}{{ type }}{% endif %}</p> <p>{% if not type %}{% trans "None" %}{% else %}{{ type }}{% endif %}</p>
<p>{% if not path %}{% trans "None" %}{% else %}{{ path }}{% endif %}</p> <p>{% if not path %}{% trans "None" %}{% else %}{{ path }}{% endif %}</p>
<p>{% if not status %}{% trans "None" %}{% else %}{{ status }}{% endif %}</p> <p>{% if not status %}{% trans "None" %}{% else %}{{ status }}{% endif %}</p>
<p>{% trans "Usage:" %} {{ percent }}%</p> <p>{% trans "Usage" %}: {{ percent }}%</p>
<p> <p>
<form action="" method="post" role="form">{% csrf_token %} <form action="" method="post" role="form">{% csrf_token %}
{% ifequal state 0 %} {% ifequal state 0 %}
@ -187,7 +187,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 "Hypervisor doesn't have any Volumes" %} <i class="fa fa-exclamation-triangle"></i> <strong>{% trans "Warning" %}:</strong> {% trans "Hypervisor doesn't have any Volumes" %}
</div> </div>
</div> </div>
{% endif %} {% endif %}