diff --git a/python/web/src/device_utils.py b/python/web/src/device_utils.py
index 4dd1356c..cf28883f 100644
--- a/python/web/src/device_utils.py
+++ b/python/web/src/device_utils.py
@@ -2,6 +2,8 @@
Module for RaSCSI device management utility methods
"""
+from flask_babel import _
+
def get_valid_scsi_ids(devices, reserved_ids):
"""
@@ -48,3 +50,31 @@ def sort_and_format_devices(devices):
formatted_devices.sort(key=lambda dic: str(dic["id"]))
return formatted_devices
+
+
+def extend_device_names(device_types):
+ """
+ Takes a (list) of (str) device_types with the four letter device acronyms
+ Returns a (dict) of device_type:device_name mappings of localized device names
+ """
+ mapped_device_types = []
+ for device_type in device_types:
+ if device_type is "SAHD":
+ device_name = _("SASI Hard Drive")
+ elif device_type is "SCHD":
+ device_name = _("SCSI Hard Drive")
+ elif device_type is "SCRM":
+ device_name = _("Removable Drive")
+ elif device_type is "SCMO":
+ device_name = _("Magneto-Optical Drive")
+ elif device_type is "SCCD":
+ device_name = _("CD-ROM Drive")
+ elif device_type is "SCBR":
+ device_name = _("X68000 Host Bridge")
+ elif device_type is "SCDP":
+ device_name = _("DaynaPORT SCSI/Link")
+ else:
+ device_name = _("Unknown Device")
+ mapped_device_types.append({device_type: device_name})
+
+ return mapped_device_types
diff --git a/python/web/src/templates/index.html b/python/web/src/templates/index.html
index 01c9a1dc..47560eef 100644
--- a/python/web/src/templates/index.html
+++ b/python/web/src/templates/index.html
@@ -156,7 +156,6 @@
{{ _("Select a valid SCSI ID and LUN to attach to. Unless you know what you're doing, always use LUN 0.", url="https://en.wikipedia.org/wiki/Logical_unit_number") }}
{{ _("If RaSCSI was unable to detect the device type associated with the image, you can choose the type from the dropdown.") }}