2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-18 04:55:44 +00:00

JS translation fix (#6288)

* Implement {% jstrans %} template

- Forces string escaping in translated text
- Required for js written in templates

* Fix part_base.html

* Update .html files

- Change any templated javascript code to use {% jstrans %}

* Update .js files

- Explicitly use {% jstrans %}

* Update CI checks
This commit is contained in:
Oliver
2024-01-19 12:16:17 +11:00
committed by GitHub
parent 914743627b
commit 4f8dddc597
49 changed files with 1682 additions and 1658 deletions

View File

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

View File

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