i18n-ally
i18n-ally copied to clipboard
The plugin cannot identify the key with quotes.
Describe the bug
The plugin cannot identify the key with quotes. Extension Version
Name: i18n Ally Id: lokalise.i18n-ally Description: 🌍 All in one i18n extension for VS Code Version: 2.8.1 Framework/i18n package you are using
react-i18next To Reproduce Steps to reproduce the behavior:
- Add
"i18n-ally.regex.key": ".*?"
and"i18n-ally.disablePathParsing": true
to settings.json. - Input a key with single quote such as
$t("I'm a coder.")
in a tsx file. - The key cannot be identified completely.
Device Infomation
- OS: Windows
- Version: 10
- VS Code Version: 1.67.1
Screenshots
And the &
char too
Want:
\$t\(\s*(['"`])(.*?)(?!\\)\1\s*(?!\\)\)
Actually Use:
(?<=\$t\(\s*['"`])(.*?)(?=(?!\\)['"`]\s*(?!\\)\))
settings.json
"i18n-ally.regex.key": "(?<=\\$t\\(\\s*['\"`])(.*?)(?=(?!\\\\)['\"`]\\s*(?!\\\\)\\))",
Please close this issue as solved.