Internationalize strings in template files

This commit is contained in:
Sunil Mohan Adapa committed 2015-11-13 22:02:17 +05:30
1 parent 139db064a9
commit 02cd89b60d
64 files changed
+1331 -815

No files matched your search

@@ -18,6 +18,7 @@
#
{% endcomment %}
{% load i18n %}
{% block page_head %}
@@ -30,49 +31,55 @@
{% block content %}
<h2>{{ title }}</h2>
<h2>{{ title }}</h2>
<p>The system diagnostic test will run a number of checks on your
system to confirm that applications and services are working as expected.</p>
<p>
{% blocktrans trimmed %}
The system diagnostic test will run a number of checks on your
system to confirm that applications and services are working as
expected.
{% endblocktrans %}
</p>
{% if not is_running %}
<form class="form form-diagnostics-button" method="post"
action="{% url 'diagnostics:index' %}">
{% csrf_token %}
{% if not is_running %}
<form class="form form-diagnostics-button" method="post"
action="{% url 'diagnostics:index' %}">
{% csrf_token %}
<input type="submit" class="btn btn-primary" value="Run Diagnostics"/>
</form>
{% else %}
<p>Diagnotics test is currently running</p>
<div class="progress">
<div class="progress-bar progress-bar-striped active"
role="progressbar" aria-valuemin="0" aria-valuemax="100"
aria-valuenow="{{ results.progress_percentage }}"
style="width: {{ results.progress_percentage }}%">
{{ results.progress_percentage }}%
</div>
</div>
{% endif %}
{% if results %}
<h3>Results</h3>
{% if results.error %}
<div class="alert alert-danger alert-dismissable">
<a class="close" data-dismiss="alert">&times;</a>
{{ results.error }}
</div>
<input type="submit" class="btn btn-primary"
value="{% trans "Run Diagnostics" %}"/>
</form>
{% else %}
{% for module, module_results in results.results.items %}
<h4>Module: {{ module }}</h4>
<p>{% trans "Diagnotics test is currently running" %}</p>
<div class="progress">
<div class="progress-bar progress-bar-striped active"
role="progressbar" aria-valuemin="0" aria-valuemax="100"
aria-valuenow="{{ results.progress_percentage }}"
style="width: {{ results.progress_percentage }}%">
{{ results.progress_percentage }}%
</div>
</div>
{% if module_results %}
{% include "diagnostics_results.html" with results=module_results %}
{% else %}
<p><span class="glyphicon glyphicon-hourglass"></span></p>
{% endif %}
{% endfor %}
{% endif %}
{% endif %}
{% if results %}
<h3>{% trans "Results" %}</h3>
{% if results.error %}
<div class="alert alert-danger alert-dismissable">
<a class="close" data-dismiss="alert">&times;</a>
{{ results.error }}
</div>
{% else %}
{% for module, module_results in results.results.items %}
<h4>{% blocktrans %}Module: {{ module }}{% endblocktrans %}</h4>
{% if module_results %}
{% include "diagnostics_results.html" with results=module_results %}
{% else %}
<p><span class="glyphicon glyphicon-hourglass"></span></p>
{% endif %}
{% endfor %}
{% endif %}
{% endif %}
{% endblock %}
@@ -17,9 +17,12 @@
#
{% endcomment %}
{% load i18n %}
<form class="form form-diagnostics-button" method="post"
action="{% url 'diagnostics:module' module %}">
{% csrf_token %}
<input type="submit" class="btn btn-default" value="Run Diagnostics"/>
<input type="submit" class="btn btn-default"
value="{% trans "Run Diagnostics" %}"/>
</form>
@@ -18,16 +18,18 @@
#
{% endcomment %}
{% load i18n %}
{% block content %}
<h2>Diagnostic Results</h2>
<h2>{% trans "Diagnostic Results" %}</h2>
<h3>Module: {{ module_name }}</h3>
<h3>{% blocktrans %}Module: {{ module_name }}{% endblocktrans %}</h3>
{% if results %}
{% include "diagnostics_results.html" with results=results %}
{% else %}
<p>This module does not support diagnostics</p>
{% endif %}
{% if results %}
{% include "diagnostics_results.html" with results=results %}
{% else %}
<p>{% trans "This module does not support diagnostics" %}</p>
{% endif %}
{% endblock %}
@@ -17,31 +17,33 @@
#
{% endcomment %}
{% load i18n %}
<div class="row">
<div class="col-sm-5">
<table class="table table-bordered table-striped diagnostics-results">
<thead>
<tr>
<th class="diagnostic-test">Test</th>
<th class="diagnostics-result">Result</th>
<th class="diagnostic-test">{% trans "Test" %}</th>
<th class="diagnostics-result">{% trans "Result" %}</th>
</tr>
</thead>
<tbody>
{% for test, result in results %}
<tr>
<td>{{ test }}</td>
<td>
{% if result == 'passed' %}
<span class="label label-success">{{ result }}</span>
{% elif result == 'failed' %}
<span class="label label-danger">{{ result }}</span>
{% elif result == 'error' %}
<span class="label label-warning">{{ result }}</span>
{% else %}
{{ result }}
{% endif %}
</td>
</tr>
<tr>
<td>{{ test }}</td>
<td>
{% if result == 'passed' %}
<span class="label label-success">{{ result }}</span>
{% elif result == 'failed' %}
<span class="label label-danger">{{ result }}</span>
{% elif result == 'error' %}
<span class="label label-warning">{{ result }}</span>
{% else %}
{{ result }}
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>