diff --git a/InvenTree/templates/js/part.js b/InvenTree/templates/js/part.js
index aea67065ca..c4d5960a7a 100644
--- a/InvenTree/templates/js/part.js
+++ b/InvenTree/templates/js/part.js
@@ -41,14 +41,14 @@ function loadPartTable(table, url, options={}) {
if (options.checkbox) {
columns.push({
checkbox: true,
- title: 'Select',
+ title: '{% trans 'Select' %}',
searchable: false,
});
}
columns.push({
field: 'name',
- title: 'Part',
+ title: '{% trans 'Part' %}',
sortable: true,
formatter: function(value, row, index, field) {
@@ -73,19 +73,19 @@ function loadPartTable(table, url, options={}) {
var display = imageHoverIcon(row.thumbnail) + renderLink(name, '/part/' + row.pk + '/');
if (row.is_template) {
- display += ``;
+ display += ``;
}
if (row.assembly) {
- display += ``;
+ display += ``;
}
if (row.starred) {
- display += ``;
+ display += ``;
}
if (row.salable) {
- display += ``;
+ display += ``;
}
/*
@@ -95,7 +95,7 @@ function loadPartTable(table, url, options={}) {
*/
if (!row.active) {
- display += `INACTIVE`;
+ display += `{% trans "Inactive" %}`;
}
return display;
}
@@ -104,7 +104,7 @@ function loadPartTable(table, url, options={}) {
columns.push({
sortable: true,
field: 'description',
- title: 'Description',
+ title: '{% trans 'Description' %}',
formatter: function(value, row, index, field) {
if (row.is_template) {
@@ -118,20 +118,20 @@ function loadPartTable(table, url, options={}) {
columns.push({
sortable: true,
field: 'category_detail',
- title: 'Category',
+ title: '{% trans 'Category' %}',
formatter: function(value, row, index, field) {
if (row.category) {
return renderLink(value.pathstring, "/part/category/" + row.category + "/");
}
else {
- return 'No category';
+ return '{% trans "No category" %}';
}
}
});
columns.push({
field: 'in_stock',
- title: 'Stock',
+ title: '{% trans "Stock" %}',
searchable: false,
sortable: true,
formatter: function(value, row, index, field) {
@@ -142,20 +142,20 @@ function loadPartTable(table, url, options={}) {
// Is stock "low" (below the 'minimum_stock' quantity)?
if (row.minimum_stock && row.minimum_stock > value) {
- value += "Low stock";
+ value += "{% trans "Low stock" %}";
}
} else if (row.on_order) {
// There is no stock available, but stock is on order
- value = "0On Order : " + row.on_order + "";
+ value = "0{% trans "On Order" %}: " + row.on_order + "";
link = "orders";
} else if (row.building) {
// There is no stock available, but stock is being built
- value = "0Building : " + row.building + "";
+ value = "0{% trans "Building" %}: " + row.building + "";
link = "builds";
} else {
// There is no stock available
- value = "0No Stock";
+ value = "0{% trans "No Stock" %}";
}
return renderLink(value, '/part/' + row.pk + "/" + link + "/");
@@ -169,7 +169,7 @@ function loadPartTable(table, url, options={}) {
queryParams: filters,
groupBy: false,
original: params,
- formatNoMatches: function() { return "No parts found"; },
+ formatNoMatches: function() { return "{% trans "No parts found" %}"; },
columns: columns,
});