From 3d1f18d6dd9a18de1c1391f36e39457f3be066e3 Mon Sep 17 00:00:00 2001 From: Martin Hauser Date: Fri, 16 Jan 2026 19:53:49 +0100 Subject: [PATCH] fix(dcim): Localize mounting depth format string Replaces the fixed format string for `mounting_depth` with a localized version using `gettext_lazy`. This ensures proper translation of the unit label for internationalization purposes. Fixes #21178 --- netbox/dcim/ui/panels.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netbox/dcim/ui/panels.py b/netbox/dcim/ui/panels.py index a47ae3d2b..440cbad7b 100644 --- a/netbox/dcim/ui/panels.py +++ b/netbox/dcim/ui/panels.py @@ -31,7 +31,7 @@ class RackDimensionsPanel(panels.ObjectAttributesPanel): outer_width = attrs.NumericAttr('outer_width', unit_accessor='get_outer_unit_display') outer_height = attrs.NumericAttr('outer_height', unit_accessor='get_outer_unit_display') outer_depth = attrs.NumericAttr('outer_depth', unit_accessor='get_outer_unit_display') - mounting_depth = attrs.TextAttr('mounting_depth', format_string='{} mm') + mounting_depth = attrs.TextAttr('mounting_depth', format_string=_('{} millimeters')) class RackNumberingPanel(panels.ObjectAttributesPanel):