2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-23 13:16:30 +00:00

Remove {% jstrans %} tag ()

* Revert {% jstrans %} for .js files

- file extension is enough

* Remove custom jstrans templatetag

* Replace jstrans calls for .html files

- Add "escape=True"

* Allow for custom "escape" argument

* Update custom trans tag

- Cannot pass kwargs in the same way
- Add the "escape" attribute

* Update js translations in html files
This commit is contained in:
Oliver
2024-01-21 22:47:47 +11:00
committed by GitHub
parent c5d0902379
commit 4b5fcd4e69
49 changed files with 1654 additions and 1664 deletions

@@ -270,7 +270,7 @@ src="{% static 'img/blank_image.png' %}"
'{% url "api-build-detail" build.pk %}',
{
method: 'DELETE',
title: '{% jstrans "Delete Build Order" %}',
title: '{% trans "Delete Build Order" escape %}',
redirect: "{% url 'build-index' %}",
}
);
@@ -280,7 +280,7 @@ src="{% static 'img/blank_image.png' %}"
<!-- Barcode functionality callbacks -->
$('#show-qr-code').click(function() {
showQRDialog(
'{% jstrans "Build Order QR Code" %}',
'{% trans "Build Order QR Code" escape %}',
'{"build": {{ build.pk }} }'
);
});
@@ -292,7 +292,7 @@ src="{% static 'img/blank_image.png' %}"
build: {{ build.pk }},
},
{
title: '{% jstrans "Link Barcode to Build Order" %}',
title: '{% trans "Link Barcode to Build Order" escape %}',
}
);
});

@@ -419,8 +419,8 @@ function allocateSelectedLines() {
if (unallocated_lines.length == 0) {
showAlertDialog(
'{% jstrans "Allocation Complete" %}',
'{% jstrans "All lines have been fully allocated" %}',
'{% trans "Allocation Complete" escape %}',
'{% trans "All lines have been fully allocated" escape %}',
);
} else {