Closed kevinmu17 closed 1 year ago
Since the fromName is required since Craft 4 there is now a problem with the translation. 'Name' is not translated anymore.
<form method="post" action="" accept-charset="UTF-8"> {{ csrfInput() }} {{ actionInput('contact-form/send') }} <h3><label for="from-name">Your Name</label></h3> {{ input('text', 'fromName', submission.fromName ?? '', { id: 'from-name', autocomplete: 'name', }) }} <h3><label for="from-email">Your Email</label></h3> {{ input('email', 'fromEmail', submission.fromEmail ?? '', { id: 'from-email', autocomplete: 'email', }) }} <h3><label for="subject">Subject</label></h3> {{ input('text', 'subject', submission.subject ?? '', { id: 'subject', }) }} <h3><label for="message">Message</label></h3> {{ tag('textarea', { text: submission.message ?? '', id: 'message', name: 'message', rows: 10, cols: 40, }) }} <button type="submit">Send</button> </form>
file: vendor/craftcms/contact-form/src/Mailer.php
vendor/craftcms/contact-form/src/Mailer.php
if ($submission->fromName) { $fields[Craft::t('contact-form', 'Name')] = $submission->fromName; }
Contact Form 2.5.2 (Craft 3) and 3.0.1 (Craft 4) are out with Name and Email translations!
Name
Email
Description
Since the fromName is required since Craft 4 there is now a problem with the translation. 'Name' is not translated anymore.
Steps to reproduce
Additional info
file:
vendor/craftcms/contact-form/src/Mailer.php