i18next-parser
i18next-parser copied to clipboard
Please add this.$t in vue, now only this.$i18n.t is supported
In vue files in script section there are great support for function
this.$i18n.t
but function
this.$t
is skipped.
I found another problems
- In template props of input:
:placeholder="$t('select.placeholder', {type: $t('select.category')})"
select.placeholder- detected correctlyselect.category- skipped
- If one component imports other then in this component translations inside of
scriptare skipped.
What do you mean by "in script section"? If you want to add a function to parse, you should be able to configure the lexer:
vue: [{
lexer: 'JavascriptLexer',
functions: ['$i18n.t', '$t'], // Array of functions to match
}],
For 1., you are welcome to open a PR to fix it.
For 2. this project is a stupid parser, not an interpreter. You must tell it which files to parse and I'm not keen to add any kind of magic such as following imports in the code.