From ac1f5d4bc3f0eb77c3fce00965cd3c9418498747 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. Signed-off-by: Martin Renvoize --- 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 27c8e75f8c4..4c36558b48e 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.49.0