grav-plugin-form icon indicating copy to clipboard operation
grav-plugin-form copied to clipboard

Translation string "GRAV.YES" for Checkbox in `forms/data.html.twig` not working

Open stephan-strate opened this issue 4 years ago • 7 comments
trafficstars

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?

stephan-strate avatar Mar 23 '21 09:03 stephan-strate

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.

NicoHood avatar Mar 23 '21 11:03 NicoHood

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.

stephan-strate avatar Mar 23 '21 11:03 stephan-strate

So this is not working? https://github.com/getgrav/grav-plugin-form/blob/develop/templates/forms/default/data.html.twig#L32

NicoHood avatar May 13 '21 09:05 NicoHood

No, its just showing GRAV.YES

stephan-strate avatar May 13 '21 09:05 stephan-strate

Dod you try this in a normal page template?

NicoHood avatar May 13 '21 09:05 NicoHood

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.

stephan-strate avatar May 13 '21 09:05 stephan-strate

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.

fspin avatar Sep 26 '21 15:09 fspin