Closed JamesBoon closed 3 years ago
We're open to a PR for this functionality!
Cool. I'll try it.
Looking through the sources and the tests, there is one question:
Why should ;t("FALSE POSITIVE 2");
not match? See edge-cases.js. This test was added two years ago, without any linked Issue.
If I'd add
I have decided against this pattern. I'll link a PR soon, then we could discuss my changes while looking at some code.\W
as delimiter, this would create a match, too. Is this change okay?
Love the PR, I think it's great!
Thank you :smile: Do you know when a new release will be available?
If the translate function
t()
is used inside of brackets or parentheses, it should still be detected by vue-i18n-extract.It would be nice if these examples would work:
Wouldn't it be better if the regexp uses any "not word" (
\W
) character as delimiter in front of the translation function?Until then, there is a (ugly) workaround: as the vue-i18n-extract regexp requires a space in front of the translation function, the following examples already work: