From 7a0a901c2baf921fe8beb2c2e63675255c5c0b35 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sat, 17 Apr 2021 23:28:10 +0200 Subject: [PATCH] translations fo true/false yes /no --- InvenTree/templates/js/bom.js | 4 ++++ InvenTree/templates/yesnolabel.html | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/InvenTree/templates/js/bom.js b/InvenTree/templates/js/bom.js index beb4110df6..5b62955499 100644 --- a/InvenTree/templates/js/bom.js +++ b/InvenTree/templates/js/bom.js @@ -268,6 +268,10 @@ function loadBomTable(table, options) { field: 'optional', title: '{% trans "Optional" %}', searchable: false, + formatter: function(value) { + if (value == '1') return '{% trans "true" %}'; + if (value == '0') return '{% trans "false" %}'; + } }); cols.push({ diff --git a/InvenTree/templates/yesnolabel.html b/InvenTree/templates/yesnolabel.html index cdc6070560..2117d42faa 100644 --- a/InvenTree/templates/yesnolabel.html +++ b/InvenTree/templates/yesnolabel.html @@ -1,5 +1,7 @@ +{% load i18n %} + {% if value %} -Yes +{% trans 'Yes' %} {% else %} -No +{% trans 'No' %} {% endif %} \ No newline at end of file