From c56a2b7e76957d0827f3e2fdb8485b94c03b5e98 Mon Sep 17 00:00:00 2001 From: Matt Blenkinsop Date: Wed, 22 Jul 2026 16:09:14 +0100 Subject: [PATCH] Bug 43121: Use an explicit label for group and tab names rather than a translated string Signed-off-by: Michaela Signed-off-by: Jonathan Druart Signed-off-by: Lucas Gass --- .../prog/js/vue/components/AccordionWrapper.vue | 2 +- .../prog/js/vue/components/ResourceFormSave.vue | 2 +- .../intranet-tmpl/prog/js/vue/components/ResourceShow.vue | 5 +++-- .../intranet-tmpl/prog/js/vue/components/TabsWrapper.vue | 4 ++-- .../intranet-tmpl/prog/js/vue/composables/base-resource.js | 5 +++++ 5 files changed, 12 insertions(+), 6 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/AccordionWrapper.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/AccordionWrapper.vue index 64c35f77cb..2fe5648b47 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/AccordionWrapper.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/AccordionWrapper.vue @@ -14,7 +14,7 @@ :aria-controls="`collapse-${counter}`" > - {{ group.name }} + {{ group.label }}
- {{ group.name }} + {{ group.label }}
  1. - {{ group.name }} + {{ group.label }}
    1. - {{ group.name }} + {{ group.label }}
      1. { return { name: field.name, + label: field.name, fields: [field], ...(props.instancedResource.showGroupsDisplayMode === "splitScreen" diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/TabsWrapper.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/TabsWrapper.vue index 53c527834f..3fcee04323 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/TabsWrapper.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/TabsWrapper.vue @@ -12,8 +12,8 @@ :data-bs-target="'#' + tab.name?.replace(/\s/g, '_')" role="tab" :aria-controls="tab.name?.replace(/\s/g, '_')" - :data-content="tab.name" - >{{ tab.name }}{{ tab.label }}
      2. diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/composables/base-resource.js b/koha-tmpl/intranet-tmpl/prog/js/vue/composables/base-resource.js index 1db07152a9..619d8d5e90 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/composables/base-resource.js +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/composables/base-resource.js @@ -42,6 +42,7 @@ import { * @param {Function} resourceConfig.defaultToolbarButtons - A function to amend default buttons in the toolbar. * @param {Function} resourceConfig.additionalToolbarButtons - A function to add additional buttons to the toolbar. * @param {String} resourceConfig.formGroupsDisplayMode - The display mode for the form groups if not the default. Can be one of the following: "accordion", "tabs". + * @param {Object} resourceConfig.groupLabels - Maps each group key to its translated, user-facing label, e.g. { ordering_information: $__("Ordering information") }. * @param {Array} resourceConfig.stickyToolbar - The names of the components with a toolbar that should be sticky. * @param {Array} resourceConfig.navigationOnFormSave - The name of the component that should be navigated to when saving the resource creation/edit form. Defaults to the show component * @@ -486,6 +487,10 @@ export function useBaseResource(resourceConfig) { ); const groupInfo = { name: group === "noGroupFound" ? null : group, + label: + group === "noGroupFound" + ? null + : (resourceConfig.groupLabels?.[group] ?? group), fields: groupFields, hasDataToDisplay: false, };