-
Notifications
You must be signed in to change notification settings - Fork 336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add typesafe-18n
support
#678
Comments
Great localization package! |
Hi @terales, thanks! |
Currently I have this vaguely working with the following configs.
{
"i18n-ally.localesPaths": ["src/lib/i18n"],
"i18n-ally.pathMatcher": "{locale}/index.{ext}",
"i18n-ally.enabledParsers": ["ts", "js"]
}
languageIds:
- javascript
- typescript
- svelte
usageMatchRegex:
- "\\$?LL\\.({key})\\(\\)"
# refactorTemplates:
# - '{$LL.$1()}'
# - '{LL.$1()}'
# - '$LL.$1()'
# - 'LL.$1()'
monopoly: true Here's a screenshot of the result. |
@Juici wow, looks really cool 👍 |
@Juici I have tweaked the config a bit and this is now the config I use:
{
"i18n-ally.pathMatcher": "{locale}/index.{ext}",
"i18n-ally.enabledParsers": ["ts", "js"],
"i18n-ally.keystyle": "nested",
"i18n-ally.localesPaths": ["src/i18n"]
}
languageIds:
- typescript
- javascript
- typescriptreact
- javascriptreact
- svelte
- html
usageMatchRegex:
- "\\$?LL\\.({key})\\(((\\{.*\\})|([^)]*))\\)"
refactorTemplates:
- '{$LL.$1()}'
- '{LL.$1()}'
- '$LL.$1()'
- 'LL.$1()'
monopoly: true It works really great! |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
There is an open PR for this issue: #681 |
@ivanhofer |
@beqaMeqvabishvili thanks for your feedback. |
@ivanhofer Not sure. To be honest I don't even know how to even go around building a tool of this scale. I guess it would require some refactoring on |
Probably yes. But the project seems to have been abandoned. It doesn't look like there will be released new versions of this project. |
If you're getting this error while integrating i18n-ally and typesafe-i18n on vscode: I found a workaround to fix it: here's my package.json: You should also think about adding |
If someone goes from Google, I add a little hack that allow write your localization in .ts files (because original extension is doesn't support that). It's some weird but worked for my case |
What framework do you want to have? Please provide links of its i18n solution/package.
https://github.com/ivanhofer/typesafe-i18n
Please provide some overall screenshots about how the i18n usage would be like
Please provide a minimal starter project
https://github.com/ivanhofer/typesafe-i18n
There are
angular
,svelte
andreact
examples inside theexamples
folderAdditional context
I tried to get it working using this wiki-page, The keys show up, but the locale files are not detected. I could not figure out how. Please help!
The text was updated successfully, but these errors were encountered: