Localized show page titles
This commit is contained in:
@@ -161,6 +161,7 @@
|
|||||||
"edit": "Edit Spool",
|
"edit": "Edit Spool",
|
||||||
"list": "Spools",
|
"list": "Spools",
|
||||||
"show": "Show Spool",
|
"show": "Show Spool",
|
||||||
|
"show_title": "[Spool #{{id}}] {{name}}",
|
||||||
"archive": "Archive Spool"
|
"archive": "Archive Spool"
|
||||||
},
|
},
|
||||||
"messages": {
|
"messages": {
|
||||||
@@ -200,7 +201,8 @@
|
|||||||
"clone": "Clone Filament",
|
"clone": "Clone Filament",
|
||||||
"edit": "Edit Filament",
|
"edit": "Edit Filament",
|
||||||
"list": "Filaments",
|
"list": "Filaments",
|
||||||
"show": "Show Filament"
|
"show": "Show Filament",
|
||||||
|
"show_title": "[Filament #{{id}}] {{name}}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"vendor": {
|
"vendor": {
|
||||||
@@ -216,7 +218,8 @@
|
|||||||
"clone": "Clone Vendor",
|
"clone": "Clone Vendor",
|
||||||
"edit": "Edit Vendor",
|
"edit": "Edit Vendor",
|
||||||
"list": "Vendors",
|
"list": "Vendors",
|
||||||
"show": "Show Vendor"
|
"show": "Show Vendor",
|
||||||
|
"show_title": "[Vendor #{{id}}] {{name}}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"table": {
|
"table": {
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ export const FilamentShow: React.FC<IResourceComponentsProps> = () => {
|
|||||||
if (item.vendor) {
|
if (item.vendor) {
|
||||||
vendorPrefix = `${item.vendor.name} - `;
|
vendorPrefix = `${item.vendor.name} - `;
|
||||||
}
|
}
|
||||||
return `[Filament #${item.id}] ${vendorPrefix}${item.name}`;
|
return t("filament.titles.show_title", { id: item.id, name: vendorPrefix + item.name });
|
||||||
};
|
};
|
||||||
|
|
||||||
const formatVendor = (item: IVendor) => {
|
const formatVendor = (item: IVendor) => {
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ export const SpoolShow: React.FC<IResourceComponentsProps> = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const formatTitle = (item: ISpool) => {
|
const formatTitle = (item: ISpool) => {
|
||||||
return `[Spool #${item.id}] ${formatFilament(item.filament)}`;
|
return t("spool.titles.show_title", { id: item.id, name: formatFilament(item.filament) });
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
2
client/src/pages/vendors/show.tsx
vendored
2
client/src/pages/vendors/show.tsx
vendored
@@ -20,7 +20,7 @@ export const VendorShow: React.FC<IResourceComponentsProps> = () => {
|
|||||||
const record = data?.data;
|
const record = data?.data;
|
||||||
|
|
||||||
const formatTitle = (item: IVendor) => {
|
const formatTitle = (item: IVendor) => {
|
||||||
return `[Vendor #${item.id}] ${item.name}`;
|
return t("vendor.titles.show_title", { id: item.id, name: item.name });
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
Reference in New Issue
Block a user