@@ -24,7 +24,7 @@
const modalBody = document.querySelector('#printModal .modal-body');
modalBody.innerHTML = '';
if (!assetIds || assetIds.length === 0) {
- modalBody.innerHTML = '
No assets selected for printing.
';
+ modalBody.innerHTML = '
@T["No assets selected for printing."]
';
return;
}
modalBody.innerHTML = `
@@ -62,14 +62,14 @@
Asset ${i + 1}: ${asset.Name}
-
Asset ID: ${asset.Cn}
-
Owner: ${asset.Owner}
-
Type: ${asset.Description.Type}
+
@T["Asset ID"]: ${asset.Cn}
+
@T["Owner"]: ${asset.Owner}
+
@T["Type"]: ${asset.Description.Type}
-
Make: ${asset.Description.Make}
-
Model: ${asset.Description.Model}
-
Serial: ${asset.SerialNumber}
+
@T["Make"]: ${asset.Description.Make}
+
@T["Model"]: ${asset.Description.Model}
+
@T["Serial"]: ${asset.SerialNumber}
@@ -114,7 +114,7 @@
console.error(`Error fetching asset ${assetId}:`, error);
const errorDiv = document.createElement('div');
errorDiv.className = 'alert alert-danger';
- errorDiv.textContent = `Error loading asset ${assetId}`;
+ errorDiv.textContent = `@T["Error loading asset"] ${assetId}`;
modalBody.appendChild(errorDiv);
}
}
@@ -124,7 +124,7 @@
const container = document.getElementById(containerId);
if (!container) return console.error(`Container #${containerId} not found.`);
- container.innerHTML = `
Loading preview...
`;
+ container.innerHTML = `
@T["Loading preview..."]
`;
let batch = JSON.parse(localStorage.getItem("printBatch")) || [];
padNulls(batch, 24);
@@ -149,7 +149,7 @@
const assetId = batch[i];
if (!assetId) {
- cell.innerHTML = `
Empty Slot
`;
+ cell.innerHTML = `
@T["Empty Slot"]
`;
grid.appendChild(cell);
continue;
}
@@ -181,8 +181,8 @@
fontSize: 12,
});
} catch (error) {
- console.error(`Error rendering asset ${assetId}:`, error);
- cell.innerHTML = `
Error loading ${assetId}
`;
+ console.error(`@T["Error rendering asset"] ${assetId}:`, error);
+ cell.innerHTML = `
@T["Error loading"] ${assetId}
`;
grid.appendChild(cell);
}
}
@@ -268,7 +268,7 @@
padNulls(batch, 24);
if (!batch.length || batch.every(x => x === null)) {
- alert("No assets in print batch.");
+ alert("@T["No assets in print batch."]");
return;
}
@@ -376,7 +376,7 @@
console.error(err);
const errDiv = printWindow.document.createElement("div");
errDiv.className = "barcode-label text-danger";
- errDiv.textContent = `Error loading ${assetId}`;
+ errDiv.textContent = `@T["Error loading"] ${assetId}`;
cell.appendChild(errDiv);
grid.appendChild(cell);
}