grav-plugin-form
grav-plugin-form copied to clipboard
Translation string "GRAV.YES" for Checkbox in `forms/data.html.twig` not working
I am using the forms/data.html.twig to render form content inside a confirmation email.
When there is a checkbox, the value (so either GRAV.YES or GRAV.NO) is not translated. Do you have any idea what the reason could be?
Which language? The translation was missing in german, I've added that recently. But those strings are not defined in crowdin, the translation platform, so nobody will ever see, that there is a string to translate.
It is actually german, but I am on the latest grav release 1.7.9 and these are available already. Thanks btw. They also do not work, when I replace them manually with some of my themes translation variables.
So this is not working? https://github.com/getgrav/grav-plugin-form/blob/develop/templates/forms/default/data.html.twig#L32
No, its just showing GRAV.YES
Dod you try this in a normal page template?
I am not quite sure, but I tried it in a fresh grav install of 1.7.9 with no mail template and the regular one provided by grav. And I located the language string of GRAV.YES and GRAV.NO, so they are there.
Instead of GRAV.YES or GRAV.NO, it should be PLUGIN_FORM.YES and PLUGIN_FORM.NO. The translations from system/languages/en.yaml are only used in php files, and meant for the system only. All plugins translations must be handled by the languages.yaml file in the plugin itself as far as I know.