-
Notifications
You must be signed in to change notification settings - Fork 2
feat(AutoForm): support i18n #13
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
base: master
Are you sure you want to change the base?
Conversation
6db38c0 to
8fc86ad
Compare
|
Thank you for this contribution! For some reason I did not get any notifications related to It would be nice to update project's documentation to mention i18n support, could you do that? |
|
Yeah no problem, I'll try to do that |
|
@Norbiros I'm sorry I was a bit busy, I hope the documentation I added is okay :) |
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.
I apologize for the delay.
I switched to your PR and started experimenting with it. I’m wondering, though—why can’t we just use $t() for the fields directly? Could you give a specific example where your solution provides a clear improvement?
Also, I noticed your solution doesn’t work for placeholders, which limits its potential usage.
As an alternative, maybe we could set the i18n key directly on the AutoForm component. Then it could dynamically query localized strings based on field names and metadata (so there is no need to write input: { title: 'input.title' }
BTW those test failures should be resolved, please rebase your branch
ce7a09d to
37e6c27
Compare
|
Hi @Norbiros, how would you use Yes it doesn't work for placeholders at the moment. I have to find another way to support it. I like your solution, but this way you force the dev to apply every key, what if I don't want to add a hint or an help text? Am I missing something? |
Closes #12