Mark additional strings as translatable
Some variables and templates variables that should be translatable
weren't marked as such.
Fixes bug #1180316
Note the change in horizon/templates/horizon/common/_quota_summary.html
is not backported in this commit to keep the existing translations work.
Change-Id: I90baf19c4bea09c126f8ed225777037194f5331f
(cherry picked from commit acfb83d5d5
)
This commit is contained in:
parent
70e403b616
commit
598c73567e
|
@ -1,3 +1,4 @@
|
|||
{% load i18n %}
|
||||
<div class="table_actions clearfix">
|
||||
{% if filter.filter_type == 'fixed' %}
|
||||
<div class="table_filter btn-group" data-toggle="buttons-radio">
|
||||
|
@ -8,7 +9,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 %}
|
||||
{% for action in table_actions %}
|
||||
|
|
|
@ -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',)
|
||||
|
||||
|
|
|
@ -95,13 +95,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):
|
||||
|
|
|
@ -35,7 +35,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">
|
||||
{% horizon_progress_bar usages.ram.used usages.ram.quota %}
|
||||
|
|
|
@ -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',)
|
||||
|
||||
|
|
|
@ -22,8 +22,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…
Reference in New Issue