Skip to content
Snippets Groups Projects

Fix: RCV Table Translation does not work

Merged Sirieam Marie Hunke requested to merge Hotfix/2196-RCVTableTranslation into main
2 files
+ 893
1056
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -201,26 +201,6 @@ export default defineComponent({
},
data() {
return {
defaultHeaders: [
{
label: this.$t("page.resource.fileName").toString(),
key: "name",
sortable: true,
active: true,
},
{
label: this.$t("page.resource.lastModified").toString(),
key: "lastModified",
sortable: true,
active: true,
},
{
label: this.$t("page.resource.size").toString(),
key: "size",
sortable: true,
active: true,
},
] as Array<CustomTableField>,
columns: [] as CustomTableField[],
isBusy: true,
selectAll: false,
@@ -252,6 +232,36 @@ export default defineComponent({
?.editableDataUrl === true
);
},
locale(): string {
//Define as computed property to translate RCV Table
return this.$root.$i18n.locale;
},
defaultHeaders(): Array<CustomTableField> {
// Define as computed property to have table
// header text react on language changes.
return [
{
label: this.$t("page.resource.fileName").toString(),
key: "name",
sortable: true,
active: true,
},
{
label: this.$t("page.resource.lastModified").toString(),
key: "lastModified",
sortable: true,
active: true,
},
{
label: this.$t("page.resource.size").toString(),
key: "size",
sortable: true,
active: true,
},
];
},
filterFields(): string[] {
const filterFields = this.defaultHeaders.map((header) => header.key);
filterFields.push(
@@ -308,6 +318,9 @@ export default defineComponent({
resource() {
this.getData();
},
locale() {
this.getColumns();
},
},
created() {
this.isBusy = true;
Loading