From cf5a4f256234c1edf8cbdd363933eec427ca6ff3 Mon Sep 17 00:00:00 2001 From: Caroline Cyr La Rose Date: Thu, 6 Feb 2025 16:11:55 -0500 Subject: [PATCH] Bug 39061: Allow translation context in vue files This patch adds the possibility to add translation context clues in vue files. Syntax is $__p("context","term") To test, see bug 39045. --- koha-tmpl/intranet-tmpl/prog/js/vue/i18n/index.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/i18n/index.js b/koha-tmpl/intranet-tmpl/prog/js/vue/i18n/index.js index 27c8e75f8c..4c36558b48 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/i18n/index.js +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/i18n/index.js @@ -2,8 +2,13 @@ export const $__ = key => { return window["__"](key); }; +export const $__p = (ctx, key) => { + return window["__p"](ctx, key); +}; + export default { install: (app, options) => { app.config.globalProperties.$__ = $__; + app.config.globalProperties.$__p = $__p; }, }; -- 2.43.0