summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Fish <drfish@us.ibm.com>2015-04-07 16:20:40 -0500
committerDoug Fish <drfish@us.ibm.com>2015-04-07 16:20:40 -0500
commit441277cc84e5feb34f438d42511b017e1d2ece43 (patch)
tree3e30a941dce2ea994f68067ba8ed6f08dbd30e29
parenta6406c991c860850417da5f084d6bc84fb1c8763 (diff)
downloadhorizon-441277cc84e5feb34f438d42511b017e1d2ece43.tar.gz
Make "RAW" in image table translatable.
Most of the format values in the images tables are acronyms and do not need to be translated. The "RAW" value is a word and should be translated. It really don't need to be all caps either. Change-Id: I3465d896760b24e19dad200ab550ca95e590291c Closes-Bug: 1441352
-rw-r--r--openstack_dashboard/dashboards/project/images/images/tables.py9
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 0a371f9f0..6c20cf559 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):