-
-
Notifications
You must be signed in to change notification settings - Fork 27
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
Improve stubs adding missing translation keys #35
Conversation
There was a similar PR on October from Alxy, it never got merged because it added the localization strings without the --include-translations argument... see here: |
I didn't know! Thanks! I definitely get the @alxy work here and finish it before getting this PR out of draft status. |
@wintercms/maintainers I've added a note into the doc to generate the controller's file using this option. The goal of this one is to ease the build of a multi-languages plugin without the need to go to all the generated view files to manually operate those changes. I agree that it's not perfect out the box: example if I'm using this in a french app into a model named "car", the delete confirmation, will be like "Êtes-vous sûr de vouloir supprimer ce car?", which -in french- is not what the plugin's developer mean (car = bus). But still, this eases the developer work as he only needs to translate the model names and use nested translation like so: trans('backend::lang.form.confirm_delete_name', ['name' => trans('acme.rental::lang.models.car')])
|
Replaced by wintercms/winter#486 |
Leaving this as draft: I need to create some corresponding keys into the modules files and do some tests.
Also, using translation key, a little regression is needed: we can't underline the first letter which corresponds to the saving shortcut on update here because even if it would be possible to use css styling to underline the first letter, it won't be the good one in some language...