Open dBianchii opened 3 months ago
You need to create a file named i18n-ally-custom-framework.yml in the root of your project. This file adds support for "Namespace", "rich", and "raw". Additionally, it properly handles long lines that prettier splits into multiple lines.
//i18n-ally-custom-framework.yml
languageIds:
- javascript
- typescript
- javascriptreact
- typescriptreact
usageMatchRegex:
- "[^\\w\\d]t\\(['\"`]({key})['\"`]\\)"
- "[^\\w\\d]t\\s*\\(\\s*['\"`]({key})['\"`]\\s*\\)"
- "[^\\w\\d]t\\.rich\\(['\"`]({key})['\"`]\\)"
- "[^\\w\\d]t\\.rich\\s*\\(\\s*['\"`]({key})['\"`]\\s*\\)"
- "[^\\w\\d]t\\.raw\\(['\"`]({key})['\"`]\\)"
- "[^\\w\\d]t\\.raw\\s*\\(\\s*['\"`]({key})['\"`]\\s*\\)"
scopeRangeRegex: "(?:useTranslations\\(|getTranslations\\(|namespace:)\\s*['\"`](.*?)['\"`]"
monopoly: true
You need to create a file named i18n-ally-custom-framework.yml in the root of your project. This file adds support for "Namespace", "rich", and "raw". Additionally, it properly handles long lines that prettier splits into multiple lines.
//i18n-ally-custom-framework.yml languageIds: - javascript - typescript - javascriptreact - typescriptreact usageMatchRegex: - "[^\\w\\d]t\\(['\"`]({key})['\"`]\\)" - "[^\\w\\d]t\\s*\\(\\s*['\"`]({key})['\"`]\\s*\\)" - "[^\\w\\d]t\\.rich\\(['\"`]({key})['\"`]\\)" - "[^\\w\\d]t\\.rich\\s*\\(\\s*['\"`]({key})['\"`]\\s*\\)" - "[^\\w\\d]t\\.raw\\(['\"`]({key})['\"`]\\)" - "[^\\w\\d]t\\.raw\\s*\\(\\s*['\"`]({key})['\"`]\\s*\\)" scopeRangeRegex: "(?:useTranslations\\(|getTranslations\\(|namespace:)\\s*['\"`](.*?)['\"`]" monopoly: true
Hi, I added this to .vscode folder and no sucess. I reloaded my vscode but saw no changes. I also tried adding it to the root of my project
Adding it to the .vscode folder should work.
Describe the bug
Extension Version
i18n Ally
Framework/i18n package you are using
next-international
To Reproduce Steps to reproduce the behavior: use this code snippet:
Device Infomation
Extension Log Go to
View
->Output
->i18n Ally
, and paste the content below. You should mask any sensitive informationScreenshots