Without a correct schema, core is not able to pick translatable fields.
So the buttons can hardly be used on multilingual site, because the button text and messages are not translated.
Did I miss something? No, not you ;-)
| Comment | File | Size | Author |
|---|---|---|---|
| #14 | views_add_button-3351528-translatable-button.patch | 11.27 KB | tobiasb |
Issue fork views_add_button-3351528
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
tobiasbPatch file for composer.
Comment #5
mmbkComment #6
mmbkPatch #4 works as expected.
Comment #7
laboratory.mikeThanks Tobias for the patch. I'll review it in the near future and get it merged in.
Comment #8
mmbkFound a problem here
Found a problem here, when no custom text is configured, the t() in line 329 fails, because the argument is missing.
Comment #9
tobiasbI did not saw
$text = t($text);. This can then be removed. Because when configured via views -> translate it via config translation, when the button_text is empty useAdd @bundle-> can be translated via UI-Translation.Comment #11
sourabhjainComment #12
mmbkYes it's working and not crashing anymore
Comment #13
tobiasbPatch file for composer again. ;-)
Comment #14
tobiasbThe default button text was the bundle ID. I changed the patch so that it use the bundle label.
Comment #16
laboratory.mikeThank you for your contribution @tobiasb! I've merged this into the codebase, and will include it in the next release.