Merge "Standardizing translation of "-""
This commit is contained in:
commit
7764af343e
@ -302,7 +302,7 @@ class Column(html.HTMLElement):
|
||||
self.allowed_data_types = allowed_data_types
|
||||
self.hidden = hidden
|
||||
self.status = status
|
||||
self.empty_value = empty_value or '-'
|
||||
self.empty_value = empty_value or _('-')
|
||||
self.filters = filters or []
|
||||
self.truncate = truncate
|
||||
self.wrap_list = wrap_list
|
||||
|
@ -99,7 +99,7 @@ class Server(base.APIResourceWrapper):
|
||||
from openstack_dashboard.api import glance # noqa
|
||||
|
||||
if not self.image:
|
||||
return "-"
|
||||
return _("-")
|
||||
if hasattr(self.image, 'name'):
|
||||
return self.image.name
|
||||
if 'name' in self.image:
|
||||
@ -109,7 +109,7 @@ class Server(base.APIResourceWrapper):
|
||||
image = glance.image_get(self.request, self.image['id'])
|
||||
return image.name
|
||||
except glance_exceptions.ClientException:
|
||||
return "-"
|
||||
return _("-")
|
||||
|
||||
@property
|
||||
def internal_name(self):
|
||||
|
@ -195,10 +195,10 @@ class FloatingIPsTable(tables.DataTable):
|
||||
fixed_ip = tables.Column(get_instance_info,
|
||||
link=get_instance_link,
|
||||
verbose_name=_("Mapped Fixed IP Address"),
|
||||
empty_value="-")
|
||||
empty_value=_("-"))
|
||||
pool = tables.Column("pool_name",
|
||||
verbose_name=_("Pool"),
|
||||
empty_value="-")
|
||||
empty_value=_("-"))
|
||||
status = tables.Column("status",
|
||||
verbose_name=_("Status"),
|
||||
status=True,
|
||||
|
@ -14,13 +14,13 @@
|
||||
<dt>{% trans "Status" %}</dt>
|
||||
<dd>{{ instance.status_label|title }}</dd>
|
||||
<dt>{% trans "Availability Zone" %}</dt>
|
||||
<dd>{{ instance.availability_zone|default:"-" }}</dd>
|
||||
<dd>{{ instance.availability_zone|default:_("-") }}</dd>
|
||||
<dt>{% trans "Created" %}</dt>
|
||||
<dd>{{ instance.created|parse_isotime }}</dd>
|
||||
<dt>{% trans "Uptime" %}</dt>
|
||||
<dd>{{ instance.created|parse_isotime|timesince }}</dd>
|
||||
<dt>{% trans "Host" %}</dt>
|
||||
<dd>{{ instance.host_server|default:"-" }}</dd>
|
||||
<dd>{{ instance.host_server|default:_("-") }}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
<dt>{% trans "ID" %}</dt>
|
||||
<dd>{{ network.id|default:_("None") }}</dd>
|
||||
<dt>{% trans "Project ID" %}</dt>
|
||||
<dd>{{ network.tenant_id|default:"-" }}</dd>
|
||||
<dd>{{ network.tenant_id|default:_("-") }}</dd>
|
||||
<dt>{% trans "Status" %}</dt>
|
||||
<dd>{{ network.status|default:_("Unknown") }}</dd>
|
||||
<dt>{% trans "Admin State" %}</dt>
|
||||
@ -21,8 +21,8 @@
|
||||
{% if network.provider__network_type %}
|
||||
<dt>{% trans "Provider Network" %}</dt>
|
||||
<dd>{% trans "Network Type:" %} {{ network.provider__network_type|default:_("Unknown") }}</dd>
|
||||
<dd>{% trans "Physical Network:" %} {{ network.provider__physical_network|default:"-" }}</dd>
|
||||
<dd>{% trans "Segmentation ID:" %} {{ network.provider__segmentation_id|default:"-" }}</dd>
|
||||
<dd>{% trans "Physical Network:" %} {{ network.provider__physical_network|default:_("-") }}</dd>
|
||||
<dd>{% trans "Segmentation ID:" %} {{ network.provider__segmentation_id|default:_("-") }}</dd>
|
||||
{% endif %}
|
||||
</dl>
|
||||
</div>
|
||||
|
@ -15,7 +15,7 @@
|
||||
<dt>{% trans "Network ID" %}</dt>
|
||||
<dd><a href="{{ network_url }}">{{ port.network_id|default:_("None") }}</a></dd>
|
||||
<dt>{% trans "Project ID" %}</dt>
|
||||
<dd>{{ port.tenant_id|default:"-" }}</dd>
|
||||
<dd>{{ port.tenant_id|default:_("-") }}</dd>
|
||||
<dt>{% trans "Fixed IP" %}</dt>
|
||||
<dd>
|
||||
{% if port.fixed_ips.items|length > 1 %}
|
||||
@ -40,7 +40,7 @@
|
||||
<dt>{% trans "Attached Device" %}</dt>
|
||||
{% if port.device_id|length > 1 or port.device_owner %}
|
||||
<dd><b>{% trans "Device Owner" %}</b>: {{ port.device_owner|default:_("None") }}</dd>
|
||||
<dd><b>{% trans "Device ID" %}</b>: {{ port.device_id|default:"-" }}</dd>
|
||||
<dd><b>{% trans "Device ID" %}</b>: {{ port.device_id|default:_("-") }}</dd>
|
||||
{% else %}
|
||||
<dd>{% trans "No attached device" %}</dd>
|
||||
{% endif %}
|
||||
|
@ -14,7 +14,7 @@
|
||||
<dt>{% trans "Network ID" %}</dt>
|
||||
<dd><a href="{{ network_url }}">{{ subnet.network_id|default:_("None") }}</a></dd>
|
||||
<dt>{% trans "IP version" %}</dt>
|
||||
<dd>{{ subnet.ipver_str|default:"-" }}</dd>
|
||||
<dd>{{ subnet.ipver_str|default:_("-") }}</dd>
|
||||
<dt>{% trans "CIDR" %}</dt>
|
||||
<dd>{{ subnet.cidr|default:_("None") }}</dd>
|
||||
<dt>{% trans "IP allocation pool" %}</dt>
|
||||
@ -25,7 +25,7 @@
|
||||
{% endfor %}
|
||||
</dd>
|
||||
<dt>{% trans "Gateway IP" %}</dt>
|
||||
<dd>{{ subnet.gateway_ip|default:"-" }}</dd>
|
||||
<dd>{{ subnet.gateway_ip|default:_("-") }}</dd>
|
||||
<dt>{% trans "DHCP Enable" %}<dt>
|
||||
<dd>{{ subnet.enable_dhcp|yesno|capfirst }}</dd>
|
||||
{% if subnet.ip_version == 6 %}
|
||||
|
@ -179,7 +179,7 @@ def get_external_network(router):
|
||||
if router.external_gateway_info:
|
||||
return router.external_gateway_info['network']
|
||||
else:
|
||||
return "-"
|
||||
return _("-")
|
||||
|
||||
|
||||
class RoutersTable(tables.DataTable):
|
||||
|
@ -304,7 +304,7 @@ def get_volume_type(volume):
|
||||
|
||||
def get_encrypted_value(volume):
|
||||
if not hasattr(volume, 'encrypted') or volume.encrypted is None:
|
||||
return "-"
|
||||
return _("-")
|
||||
elif volume.encrypted is False:
|
||||
return _("No")
|
||||
else:
|
||||
@ -353,7 +353,7 @@ class VolumesTable(VolumesTableBase):
|
||||
link="horizon:project:volumes:volumes:detail")
|
||||
volume_type = tables.Column(get_volume_type,
|
||||
verbose_name=_("Type"),
|
||||
empty_value="-")
|
||||
empty_value=_("-"))
|
||||
attachments = AttachmentColumn("attachments",
|
||||
verbose_name=_("Attached To"))
|
||||
availability_zone = tables.Column("availability_zone",
|
||||
|
Loading…
Reference in New Issue
Block a user