-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for i18n-ally extension (#1392)
- Loading branch information
1 parent
da49413
commit 4bd282c
Showing
3 changed files
with
35 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# .vscode/i18n-ally-custom-framework.yml | ||
|
||
# An array of strings which contain Language Ids defined by VS Code | ||
# You can check avaliable language ids here: https://code.visualstudio.com/docs/languages/overview#_language-id | ||
languageIds: | ||
- typescript | ||
|
||
# An array of RegExes to find the key usage. **The key should be captured in the first match group**. | ||
# You should unescape RegEx strings in order to fit in the YAML file | ||
# To help with this, you can use https://www.freeformatter.com/json-escape.html | ||
usageMatchRegex: | ||
# The following example shows how to detect `t("your.i18n.keys")` | ||
# the `{key}` will be placed by a proper keypath matching regex, | ||
# you can ignore it and use your own matching rules as well | ||
- "[^\\w\\d]LocalizationManager.localizer.translate\\([\\n\\r\\s]*.+,[\\n\\r\\s]*['\"`]({key})['\"`]" | ||
- "[^\\w\\d]LocalizationManager.localizer.translateByLocale\\([\\n\\r\\s]*.+,[\\n\\r\\s]*['\"`]({key})['\"`]" | ||
- "[^\\w\\d]LocalizationManager.localizer.internalLocalizer.t\\([\\n\\r\\s]*['\"`]({key})['\"`]" | ||
|
||
# An array of strings containing refactor templates. | ||
# The "$1" will be replaced by the keypath specified. | ||
# Optional: uncomment the following two lines to use | ||
|
||
# refactorTemplates: | ||
# - i18n.get("$1") | ||
|
||
# If set to true, only enables this custom framework (will disable all built-in frameworks) | ||
monopoly: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
{ | ||
"files.insertFinalNewline": true, | ||
"typescript.tsdk": "node_modules/typescript/lib" | ||
} | ||
"typescript.tsdk": "node_modules/typescript/lib", | ||
"i18n-ally.localesPaths": [ | ||
"i18n" | ||
], | ||
"i18n-ally.enabledParsers": ["json"] | ||
} |