mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-18 13:05:42 +00:00
Merge pull request #1464 from matmair/translation_improv
Translation improvments
This commit is contained in:
@ -164,11 +164,11 @@ function getFilterOptionList(tableKey, filterKey) {
|
||||
return {
|
||||
'1': {
|
||||
key: '1',
|
||||
value: 'true',
|
||||
value: '{% trans "true" %}',
|
||||
},
|
||||
'0': {
|
||||
key: '0',
|
||||
value: 'false',
|
||||
value: '{% trans "false" %}',
|
||||
},
|
||||
};
|
||||
} else if ('options' in settings) {
|
||||
@ -394,8 +394,8 @@ function getFilterOptionValue(tableKey, filterKey, valueKey) {
|
||||
|
||||
// Lookup for boolean options
|
||||
if (filter.type == 'bool') {
|
||||
if (value == '1') return 'true';
|
||||
if (value == '0') return 'false';
|
||||
if (value == '1') return '{% trans "true" %}';
|
||||
if (value == '0') return '{% trans "false" %}';
|
||||
|
||||
return value;
|
||||
}
|
||||
|
@ -354,7 +354,7 @@ function loadStockTable(table, options) {
|
||||
var html = imageHoverIcon(row.part_detail.thumbnail);
|
||||
|
||||
html += row.part_detail.full_name;
|
||||
html += ` <i>(${data.length} items)</i>`;
|
||||
html += ` <i>(${data.length} {% trans "items" %})</i>`;
|
||||
|
||||
html += makePartIcons(row.part_detail);
|
||||
|
||||
@ -446,7 +446,7 @@ function loadStockTable(table, options) {
|
||||
});
|
||||
|
||||
if (batches.length > 1) {
|
||||
return "" + batches.length + " batches";
|
||||
return "" + batches.length + " {% trans 'batches' %}";
|
||||
} else if (batches.length == 1) {
|
||||
if (batches[0]) {
|
||||
return batches[0];
|
||||
@ -473,9 +473,9 @@ function loadStockTable(table, options) {
|
||||
// Single location, easy!
|
||||
return locations[0];
|
||||
} else if (locations.length > 1) {
|
||||
return "In " + locations.length + " locations";
|
||||
return "In " + locations.length + " {% trans 'locations' %}";
|
||||
} else {
|
||||
return "<i>{% trans "Undefined location" %}</i>";
|
||||
return "<i>{% trans 'Undefined location' %}</i>";
|
||||
}
|
||||
} else if (field == 'notes') {
|
||||
var notes = [];
|
||||
@ -1219,7 +1219,7 @@ function loadInstalledInTable(table, options) {
|
||||
// Add some buttons yo!
|
||||
html += `<div class='btn-group float-right' role='group'>`;
|
||||
|
||||
html += makeIconButton('fa-unlink', 'button-uninstall', pk, "{% trans "Uninstall stock item" %}");
|
||||
html += makeIconButton('fa-unlink', 'button-uninstall', pk, "{% trans 'Uninstall stock item' %}");
|
||||
|
||||
html += `</div>`;
|
||||
|
||||
|
Reference in New Issue
Block a user