-
Notifications
You must be signed in to change notification settings - Fork 124
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
Make i18n translator resolver full generic #591
base: main
Are you sure you want to change the base?
Make i18n translator resolver full generic #591
Conversation
Make a few types more specific especially Scopes
🦋 Changeset detectedLatest commit: 5fa818c The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are too many changes to the scope/chained/proxy functionality.
Please just limit it to adding the generic for parameters when necessary.
Now all unit tests should pass
I know, that's because of the now nicely working scope api. To get all the types right was really a challange and involved hours of hard work, so please can we also merge this 👉👈 |
@BierDav can you fix this one as well? :) |
Of course |
…primitives into BierDav-add-generic-template-args
Everything seems to be working as before. on solid-site too. |
Sorry oversaw the pr. I've added a test that should ensure that nested translation works, the other part with the types could also be checked by typechecking the test files, don't know if that is already done or not. |
Is there anything else needed for this feature? The templates are pretty limited as of now, compared to some other i18n libraries where you can e.g. pluralization in the templates, like: |
This is not supported out of the box, but you can implement your own resolver which would allow you to support that syntax. This is even possible with the current implementation, no need for this pr. |
@thetarnav is this ready to merge? |
Make a few types more specific especially Scopes. Now we get proper types for available scopes and added support for nested scopes such as for example
app.test