diff options
author | Jenkins <jenkins@review.openstack.org> | 2015-04-08 22:45:56 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2015-04-08 22:45:56 +0000 |
commit | 68b2a05b58cfbb38d5ec0c182d6fe3859d18fcea (patch) | |
tree | 7e1765c4ccdc1f8075db2bdcd4752a20334158b9 | |
parent | 60d11845ce0175a662082a94245c7685da0e2136 (diff) | |
parent | 441277cc84e5feb34f438d42511b017e1d2ece43 (diff) | |
download | horizon-68b2a05b58cfbb38d5ec0c182d6fe3859d18fcea.tar.gz |
Merge "Make "RAW" in image table translatable."
-rw-r--r-- | openstack_dashboard/dashboards/project/images/images/tables.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/openstack_dashboard/dashboards/project/images/images/tables.py b/openstack_dashboard/dashboards/project/images/images/tables.py index cfdf73f00..53742e636 100644 --- a/openstack_dashboard/dashboards/project/images/images/tables.py +++ b/openstack_dashboard/dashboards/project/images/images/tables.py @@ -220,8 +220,13 @@ def get_format(image): format = getattr(image, "disk_format", "") # The "container_format" attribute can actually be set to None, # which will raise an error if you call upper() on it. - if format is not None: - return format.upper() + if not format: + return format + # Most image formats are untranslated acronyms, but raw is a word + # and should be translated + if format == "raw": + return pgettext_lazy("Image format for display in table", u"Raw") + return format.upper() class UpdateRow(tables.Row): |