Mark additional strings as translatable
Some variables and templates variables that should be translatable weren't marked as such. Fixes bug #1180316 Change-Id: I90baf19c4bea09c126f8ed225777037194f5331f
This commit is contained in:
parent
accc983d00
commit
acfb83d5d5
@ -1,3 +1,4 @@
|
||||
{% load i18n %}
|
||||
<div class="table_actions clearfix">
|
||||
{% block table_filter %}
|
||||
{% if filter.filter_type == 'fixed' %}
|
||||
@ -9,7 +10,7 @@
|
||||
{% elif filter.filter_type == 'query' %}
|
||||
<div class="table_search">
|
||||
<input class="span3 example" value="{{ filter.filter_string|default:'' }}" type="text" name="{{ filter.get_param_name }}" />
|
||||
<button type="submit" {{ filter.attr_string|safe }}>Filter</button>
|
||||
<button type="submit" {{ filter.attr_string|safe }}>{% trans "Filter" %}</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock table_filter %}
|
||||
|
@ -4,27 +4,37 @@
|
||||
<h3>{% trans "Quota Summary" %}</h3>
|
||||
<div class="d3_quota_bar">
|
||||
<div class="d3_pie_chart" data-used="{% widthratio usage.quotas.instances.used usage.quotas.instances.quota 100 %}"></div>
|
||||
<strong>{% trans "Available Instances" %} <br /> {% trans "Used" %}<span> {{ usage.quotas.instances.used|intcomma }} </span> {% trans "of" %} <span> {{ usage.quotas.instances.quota|intcomma }} </span></strong>
|
||||
<strong>{% trans "Available Instances" %} <br />
|
||||
{% blocktrans with used=usage.quotas.instances.used|intcomma available=usage.quotas.instances.quota|intcomma %}Used <span> {{ used }} </span> of <span> {{ available }} </span>{% endblocktrans %}
|
||||
</strong>
|
||||
</div>
|
||||
|
||||
<div class="d3_quota_bar">
|
||||
<div class="d3_pie_chart" data-used="{% widthratio usage.quotas.cores.used usage.quotas.cores.quota 100 %}"></div>
|
||||
<strong>{% trans "Available VCPUs" %} <br /> {% trans "Used" %} <span> {{ usage.quotas.cores.used|intcomma }} </span>{% trans "of" %}<span> {{ usage.quotas.cores.quota|intcomma }} </span></strong>
|
||||
<strong>{% trans "Available VCPUs" %} <br />
|
||||
{% blocktrans with used=usage.quotas.cores.used|intcomma available=usage.quotas.cores.quota|intcomma %}Used <span> {{ used }} </span> of <span> {{ available }} </span>{% endblocktrans %}
|
||||
</strong>
|
||||
</div>
|
||||
|
||||
<div class="d3_quota_bar">
|
||||
<div class="d3_pie_chart" data-used="{% widthratio usage.quotas.ram.used usage.quotas.ram.quota 100 %}"></div>
|
||||
<strong>{% trans "Available RAM" %} <br /> {% trans "Used" %} <span> {{ usage.quotas.ram.used|intcomma }} MB </span>{% trans "of" %}<span> {{ usage.quotas.ram.quota|intcomma }} MB </span></strong>
|
||||
<strong>{% trans "Available RAM" %} <br />
|
||||
{% blocktrans with used=usage.quotas.ram.used|intcomma available=usage.quotas.ram.quota|intcomma %}Used <span> {{ used }} MB </span> of <span> {{ available }} MB </span>{% endblocktrans %}
|
||||
</strong>
|
||||
</div>
|
||||
|
||||
{% if usage.quotas.volumes %}
|
||||
<div class="d3_quota_bar">
|
||||
<div class="d3_pie_chart" data-used="{% widthratio usage.quotas.volumes.used usage.quotas.volumes.quota 100 %}"></div>
|
||||
<strong>{% trans "Available Volumes" %} <br /> {% trans "Used" %} <span> {{ usage.quotas.volumes.used|intcomma }} </span>{% trans "of" %}<span> {{ usage.quotas.volumes.quota|intcomma }} </span></strong>
|
||||
<strong>{% trans "Available Volumes" %} <br />
|
||||
{% blocktrans with used=usage.quotas.volumes.used|intcomma available=usage.quotas.volumes.quota|intcomma %} Used <span> {{ used }} </span> of <span> {{ available }} </span>{% endblocktrans %}
|
||||
</strong>
|
||||
</div>
|
||||
<div class="d3_quota_bar">
|
||||
<div class="d3_pie_chart" data-used="{% widthratio usage.quotas.gigabytes.used usage.quotas.gigabytes.quota 100 %}"></div>
|
||||
<strong>{% trans "Available Volume Storage" %} <br /> {% trans "Used" %} <span> {{ usage.quotas.gigabytes.used|intcomma }} GB </span>{% trans "of" %}<span> {{ usage.quotas.gigabytes.quota|intcomma }} GB </span></strong>
|
||||
<strong>{% trans "Available Volume Storage" %} <br />
|
||||
{% blocktrans with used=usage.quotas.gigabytes.used|intcomma available=usage.quotas.gigabytes.quota|intcomma%}Used <span> {{ used }} GB </span> of <span> {{ available }} GB</span>{% endblocktrans %}
|
||||
</strong>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
@ -22,7 +22,7 @@ from openstack_dashboard.dashboards.admin import dashboard
|
||||
|
||||
|
||||
class Routers(horizon.Panel):
|
||||
name = "Routers"
|
||||
name = _("Routers")
|
||||
slug = 'routers'
|
||||
permissions = ('openstack.services.network',)
|
||||
|
||||
|
@ -115,13 +115,13 @@ class OwnerFilter(tables.FixedFilterAction):
|
||||
def make_dict(text, tenant, icon):
|
||||
return dict(text=text, value=tenant, icon=icon)
|
||||
|
||||
buttons = [make_dict('Project', 'project', 'icon-home')]
|
||||
buttons = [make_dict(_('Project'), 'project', 'icon-home')]
|
||||
for button_dict in filter_tenants():
|
||||
new_dict = button_dict.copy()
|
||||
new_dict['value'] = new_dict['tenant']
|
||||
buttons.append(new_dict)
|
||||
buttons.append(make_dict('Shared with Me', 'shared', 'icon-share'))
|
||||
buttons.append(make_dict('Public', 'public', 'icon-fire'))
|
||||
buttons.append(make_dict(_('Shared with Me'), 'shared', 'icon-share'))
|
||||
buttons.append(make_dict(_('Public'), 'public', 'icon-fire'))
|
||||
return buttons
|
||||
|
||||
def categorize(self, table, images):
|
||||
|
@ -33,7 +33,7 @@
|
||||
|
||||
<div class="quota_title clearfix">
|
||||
<strong>{% trans "Total RAM" %} <span>({{ usages.ram.used|intcomma }} {% trans "MB" %})</span></strong>
|
||||
<p>{{ usages.ram.available|quota:"MB"|intcomma }}</p>
|
||||
<p>{{ usages.ram.available|quota:_("MB")|intcomma }}</p>
|
||||
</div>
|
||||
<div id="quota_ram" data-progress-indicator-flavor data-quota-limit="{{ usages.ram.quota }}" data-quota-used="{{ usages.ram.used }}" class="quota_bar">
|
||||
</div>
|
||||
|
@ -43,7 +43,7 @@ class CreateNetworkInfoAction(workflows.Action):
|
||||
initial=True, required=False)
|
||||
|
||||
class Meta:
|
||||
name = ("Network")
|
||||
name = _("Network")
|
||||
help_text = _("From here you can create a new network.\n"
|
||||
"In addition a subnet associated with the network "
|
||||
"can be created in the next panel.")
|
||||
@ -88,7 +88,7 @@ class CreateSubnetInfoAction(workflows.Action):
|
||||
initial=False, required=False)
|
||||
|
||||
class Meta:
|
||||
name = ("Subnet")
|
||||
name = _("Subnet")
|
||||
help_text = _('You can create a subnet associated with the new '
|
||||
'network, in which case "Network Address" must be '
|
||||
'specified. If you wish to create a network WITHOUT a '
|
||||
@ -164,7 +164,7 @@ class CreateSubnetDetailAction(workflows.Action):
|
||||
required=False)
|
||||
|
||||
class Meta:
|
||||
name = ("Subnet Detail")
|
||||
name = _("Subnet Detail")
|
||||
help_text = _('You can specify additional attributes for the subnet.')
|
||||
|
||||
def _convert_ip_address(self, ip, field_name):
|
||||
|
@ -22,7 +22,7 @@ from openstack_dashboard.dashboards.project import dashboard
|
||||
|
||||
|
||||
class Routers(horizon.Panel):
|
||||
name = "Routers"
|
||||
name = _("Routers")
|
||||
slug = 'routers'
|
||||
permissions = ('openstack.services.network',)
|
||||
|
||||
|
@ -23,8 +23,8 @@
|
||||
<h3>{% trans "Volume Quotas" %}</h3>
|
||||
|
||||
<div class="quota_title clearfix">
|
||||
<strong>{% trans "Total Gigabytes" %} <span>({{ usages.gigabytes.used|intcomma }} GB)</span></strong>
|
||||
<p>{{ usages.gigabytes.available|quota:"GB"|intcomma }}</p>
|
||||
<strong>{% trans "Total Gigabytes" %} <span>({{ usages.gigabytes.used|intcomma }} {% trans "GB" %})</span></strong>
|
||||
<p>{{ usages.gigabytes.available|quota:_("GB")|intcomma }}</p>
|
||||
</div>
|
||||
|
||||
<div id="quota_size" data-progress-indicator-for="id_size" data-quota-limit="{{ usages.gigabytes.quota }}" data-quota-used="{{ usages.gigabytes.used }}" class="quota_bar">
|
||||
|
Loading…
x
Reference in New Issue
Block a user