diff --git a/.vscode/i18n-ally-custom-framework.yml b/.vscode/i18n-ally-custom-framework.yml new file mode 100644 index 0000000000000000000000000000000000000000..fc7ca9ca80c77e8b4197173ce79ac1f4dfa0af1d --- /dev/null +++ b/.vscode/i18n-ally-custom-framework.yml @@ -0,0 +1,30 @@ +# .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: + - javascript + - php + - twig + - vue + +# 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 + - "->trans\\(\\s*['\"`]({key})['\"`]" # php syntax + - "[^\\w\\d]t\\(\\s*['\"`]({key})['\"`]" # javascript template + - "[`'\"]({key})[`'\"][\\s\\n]*\\|[\\s\\n]*trans" # twig syntax + + +# An array of strings containing refactor templates. +# The "$1" will be replaced by the keypath specified. +refactorTemplates: + - $this->trans("$1") + + +# If set to true, only enables this custom framework (will disable all built-in frameworks) +# monopoly: true \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000000000000000000000000000000000000..f93499a9fc84d71328bc82c784808a4c5ce2782c --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,8 @@ +{ + "i18n-ally.localesPaths": [ "translations" ], + "i18n-ally.pathMatcher": "**/*.{locale}.{ext}", + "i18n-ally.enabledParsers": ["yaml"], + "i18n-ally.sourceLanguage": "fr", + "i18n-ally.displayLanguage": "fr", + "i18n-ally.keystyle": "nested", +} \ No newline at end of file