Use 'trimmed' for blocktrans in html page

Add trimmed option to blocktrans, blocktrans trimmed
option removes newlines from contents of blocktrans
and replaces any whitespace at the beginning and end of a line into
a single space. This makes translator life easier.
More detail is described in the bug report.

Change-Id: I835167eeec4f8596cec9c906548b3fa557ed1374
Closes-Bug: #1655249
This commit is contained in:
qiaomin 2017-01-10 15:30:41 +08:00
parent 41f4a2c50c
commit 6657919d87
6 changed files with 11 additions and 11 deletions

View File

@ -1,4 +1,4 @@
{% load i18n %}
<p>{% blocktrans %}Specify the details for the database backup.{% endblocktrans %}</p>
<p>{% blocktrans %}You can perform an incremental backup by specifying a parent backup. <strong>However,</strong> not all databases support incremental backups in which case this operation will result in an error.{% endblocktrans %}</p>
<p>{% blocktrans trimmed %}Specify the details for the database backup.{% endblocktrans %}</p>
<p>{% blocktrans trimmed %}You can perform an incremental backup by specifying a parent backup. <strong>However,</strong> not all databases support incremental backups in which case this operation will result in an error.{% endblocktrans %}</p>

View File

@ -14,11 +14,11 @@
</fieldset>
</div>
<div class="right">
<p>{% blocktrans %}Specify the new root password for vertica cluster.{% endblocktrans %}</p>
<p>{% blocktrans trimmed %}Specify the new root password for vertica cluster.{% endblocktrans %}</p>
</div>
{% endblock %}
{% block modal-footer %}
<input class="btn btn-primary pull-right" type="submit" value="{% trans "Reset Root Password" %}" />
<a href="{% url "horizon:project:database_clusters:index" %}" class="btn btn-default secondary cancel close">{% trans "Cancel" %}</a>
{% endblock %}
{% endblock %}

View File

@ -1,3 +1,3 @@
{% load i18n %}
<p>{% blocktrans %}Optionally choose to create this database using a previous backup, or as a replica of another database instance.{% endblocktrans %}</p>
<p>{% blocktrans trimmed %}Optionally choose to create this database using a previous backup, or as a replica of another database instance.{% endblocktrans %}</p>

View File

@ -1,4 +1,4 @@
{% load i18n %}
<p>{% blocktrans %}Specify the details for launching an instance.{% endblocktrans %}</p>
<p>{% blocktrans %}<strong>Please note:</strong> The value specified in the Volume Size field should be greater than 0, however, some configurations do not support specifying volume size. If specifying the volume size results in an error stating volume support is not enabled, enter 0.{% endblocktrans %}</p>
<p>{% blocktrans trimmed %}Specify the details for launching an instance.{% endblocktrans %}</p>
<p>{% blocktrans trimmed %}<strong>Please note:</strong> The value specified in the Volume Size field should be greater than 0, however, some configurations do not support specifying volume size. If specifying the volume size results in an error stating volume support is not enabled, enter 0.{% endblocktrans %}</p>

View File

@ -5,14 +5,14 @@
<pre>database1, database2, database3</pre>
<h4>{% trans "Initial Admin User" %}</h4>
<p>{% blocktrans %}Create an optional initial user.
<p>{% blocktrans trimmed %}Create an optional initial user.
This user will have access to all databases you create.{% endblocktrans %}</p>
<ul>
<li><strong>{% trans "Username (required)" %}</strong></li>
<li><strong>{% trans "Password (required)" %}</strong></li>
<li><strong>{% trans "Allowed Host (optional)" %}</strong>
{% blocktrans %}Allow the user to connect from this host
{% blocktrans trimmed %}Allow the user to connect from this host
only. If not provided this user will be allowed to connect from anywhere.
{% endblocktrans %}</li>
</ul>
</ul>

View File

@ -1,7 +1,7 @@
{% load i18n %}
<p>
{% blocktrans %}
{% blocktrans trimmed %}
Move networks from 'Available Networks' to 'Selected Networks' by
clicking the button, or dragging and dropping. You can change the
NIC order by dragging and dropping as well.