From 32a755db2dd4c502cd1a16b4ba62007b06cda330 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 Content-Type: text/plain; charset=utf-8 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 Signed-off-by: David Flater Signed-off-by: Marcel de Rooy --- .../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 456250ad2e..69b385a08d 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