From a8015edee994b3cbf3de986fe11743f13aee4a56 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Mon, 16 Jun 2025 14:47:25 +0000 Subject: [PATCH] Bug 40146: Untranslatable actions on vendor This patch updates the vendor detail view in order to make some menu items translatable.. To test, apply the patch and run 'yarn build'. Test that the correct strings are translatable. In this example I'm testing fr-FR: - Update a translation: > gulp po:update > cd misc/translator > perl translate update fr-FR - Open the corresponding .po file for the strings pulled from JavaScript e.g. misc/translator/po/fr-FR-messages-js.po - Locate strings pulled from vue/components/Vendors/VendorShow.vue for translation, e.g.: #: koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/VendorShow.vue:12 #, fuzzy msgid "Basket" msgstr "Paniers" - Lines 12, 25, and 35 of VendorShow.vue have been modified. - Delete the line "#, fuzzy" - Edit the "msgstr" string if ncessary, however you want (it's just for testing) - Install the updated translation: > perl translate install fr-FR - Go to Acquisitions -> Vendors -> Vendor details. - Switch to your updated translation. - Confirm that the menu items under "New" are translated correctly. Sponsored-by: Athens County Public Libraries --- .../prog/js/vue/components/Vendors/VendorShow.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/VendorShow.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/VendorShow.vue index 456250ad2eb..69b385a08df 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/VendorShow.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/VendorShow.vue @@ -9,7 +9,7 @@ path: '/cgi-bin/koha/acqui/basketheader.pl', query: { booksellerid: vendor.id, op: 'add_form' }, }, - title: 'Basket', + title: $__('Basket'), callback: toolbarComponent => { const url = toolbarComponent.handleQuery( toolbarComponent.to @@ -22,7 +22,7 @@ path: '/cgi-bin/koha/admin/aqcontract.pl', query: { booksellerid: vendor.id, op: 'add_form' }, }, - title: 'Contract', + title: $__('Contract'), callback: toolbarComponent => { const url = toolbarComponent.handleQuery( toolbarComponent.to @@ -32,7 +32,7 @@ }, { to: { name: 'VendorFormAdd' }, - title: 'Vendor', + title: $__('Vendor'), }, ]" :title="$__('New')" -- 2.39.5