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 <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Caroline Cyr La Rose 2025-02-06 16:11:55 -05:00 committed by Katrin Fischer
parent 2190d4020c
commit 6945fa70b8
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
1 changed files with 5 additions and 0 deletions

View File

@ -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;
},
};