diff --git a/horizon/templates/horizon/common/_limit_summary.html b/horizon/templates/horizon/common/_limit_summary.html index b58ba8b4cb..12c441d3a2 100644 --- a/horizon/templates/horizon/common/_limit_summary.html +++ b/horizon/templates/horizon/common/_limit_summary.html @@ -13,21 +13,21 @@
{% if quota.max|quotainf != '-1' %} {% if quota.type == "totalRAMUsed" %} - {% blocktrans trimmed with used=quota.used|mb_float_format available=quota.max|quotainf|mb_float_format %} - Used {{ used }} of {{ available }} + {% blocktrans trimmed with usedphrase=quota.text used=quota.used|mb_float_format available=quota.max|quotainf|mb_float_format %} + {{ usedphrase }} {{ used }} of {{ available }} {% endblocktrans %} {% elif quota.type == "totalGigabytesUsed" %} - {% blocktrans trimmed with used=quota.used|diskgbformat available=quota.max|quotainf|diskgbformat %} - Used {{ used }} of {{ available }} + {% blocktrans trimmed with usedphrase=quota.text used=quota.used|diskgbformat available=quota.max|quotainf|diskgbformat %} + {{ usedphrase }} {{ used }} of {{ available }} {% endblocktrans %} {% else %} - {% blocktrans trimmed with used=quota.used|intcomma available=quota.max|quotainf|intcomma %} - Used {{ used }} of {{ available }} + {% blocktrans trimmed with usedphrase=quota.text used=quota.used|intcomma available=quota.max|quotainf|intcomma %} + {{ usedphrase }} {{ used }} of {{ available }} {% endblocktrans %} {% endif %} {% else %} - {% blocktrans trimmed with used=quota.used|intcomma %} - Used {{ used }} (No Limit) + {% blocktrans trimmed with usedphrase=quota.text used=quota.used|intcomma %} + {{ usedphrase }} {{ used }} (No Limit) {% endblocktrans %} {% endif %}
diff --git a/openstack_dashboard/usage/views.py b/openstack_dashboard/usage/views.py index 745aebf910..2ff75d4d0c 100644 --- a/openstack_dashboard/usage/views.py +++ b/openstack_dashboard/usage/views.py @@ -10,6 +10,7 @@ # License for the specific language governing permissions and limitations # under the License. +from django.utils.translation import pgettext_lazy from django.utils.translation import ugettext_lazy as _ from horizon import exceptions @@ -68,7 +69,8 @@ class UsageView(tables.DataTableView): ("totalCoresUsed", "maxTotalCores", _("VCPUs")), ("totalRAMUsed", "maxTotalRAMSize", _("RAM")), ("totalFloatingIpsUsed", "maxTotalFloatingIps", - _("Floating IPs"), _("Allocated")), + _("Floating IPs"), + pgettext_lazy('Label in the limit summary', "Allocated")), ("totalSecurityGroupsUsed", "maxSecurityGroups", _("Security Groups"))] # Check for volume usage @@ -80,7 +82,7 @@ class UsageView(tables.DataTableView): _("Volume Storage"))) for t in types: if t[0] in self.usage.limits and t[1] in self.usage.limits: - text = False + text = pgettext_lazy('Label in the limit summary', 'Used') if len(t) > 3: text = t[3] context['charts'].append({