Răsfoiți Sursa

Fixes #23809: Use unit symbols for total weight (#23834)

lexapi 22 ore în urmă
părinte
comite
16e94f5f96
1 a modificat fișierele cu 5 adăugiri și 5 ștergeri
  1. 5 5
      netbox/templates/dcim/attrs/total_weight.html

+ 5 - 5
netbox/templates/dcim/attrs/total_weight.html

@@ -1,10 +1,10 @@
-{% load helpers i18n %}
+{% load helpers %}
 {% with system=preferences|get_key:"ui.measurement_system" %}
 {% if system == "imperial" %}
-{% with lbs=value|kg_to_pounds|floatformat %}{{ lbs }} {% trans "Pound" %}{{ lbs|pluralize }}{% endwith %}
+{% with lbs=value|kg_to_pounds %}{{ lbs|floatformat }} {{ lbs|pluralize:"lb,lbs" }}{% endwith %}
 {% elif system == "metric" %}
-{% with formatted=value|floatformat %}{{ formatted }} {% trans "Kilogram" %}{{ formatted|pluralize }}{% endwith %}
+{% with formatted=value|floatformat %}{{ formatted }} kg{% endwith %}
 {% else %}
-{% with formatted=value|floatformat %}{% with lbs=value|kg_to_pounds|floatformat %}{{ formatted }} {% trans "Kilogram" %}{{ formatted|pluralize }} ({{ lbs }} {% trans "Pound" %}{{ lbs|pluralize }}){% endwith %}{% endwith %}
+{% with formatted=value|floatformat %}{% with lbs=value|kg_to_pounds %}{{ formatted }} kg ({{ lbs|floatformat }} {{ lbs|pluralize:"lb,lbs" }}){% endwith %}{% endwith %}
 {% endif %}
-{% endwith %}
+{% endwith %}