Problem/Motivation
@plach, from #2073217-44: Remove the $langcode parameter from the entity view/render system:
I can envision a scenario where a contrib
contact_translation
module could hook into the execution flow, and add translations to the contact message via a machine-translation service. This would be useful to allow a support center to react promptly even to support request in languages they don't understand. However thecontact_message
entity type is not even translatable currently, so this is not a problem in core, although those language parameters should be restored to allow translatability to be enabled in contrib.
Proposed resolution
Support translation of submitted contact messages.
In original issue summary: Support language-aware email notifications.
Remaining tasks
- Figure out whether any other change is required to support translatable messages.
- Write a patch
- Reviews
User interface changes
None
API changes
None
Data model changes
None
Comment | File | Size | Author |
---|---|---|---|
#3 | contact-translation-2582621-3.patch | 1.61 KB | plach |
Comments
Comment #2
plachComment #3
plachHere's a start
Comment #5
plachComment #7
andypostatm message has no storage so it's only a question in which language new entity created
Comment #8
plachAs I was saying in the OP, a machine-translation service could add a translation on the fly. That would not need to be stored to exist, in fact it could live just for the time needed to send a translated notification.
Comment #11
BerdirAs @plach said, that's not necessary. A module could hook into the mail process somehow and translate the created message on the fly, e.g. using google translate before sending it out.
Comment #12
andypostLooks like duplicate of #2484959: Properly pass langcode from contact message
And the patch is different...
Comment #16
jibranIs this still relevant?
Comment #25
Greg BoggsI think there are two issues here:
1. Translate the contact form fields.
2. Translate the email that is sent.
I think both of these need to be done. And the linked issue takes care of passing the translation language in the email, but not translating the form. Any objections for me to rewrite a better description for this issue?
Comment #26
Amber Himes Matz+1 to rescope this to just ensure the contact entity forms are translatable. Looks like #2484959: Properly pass langcode from contact message is focused just on the contact form mail message langcode.
Comment #27
Greg BoggsYep, yep, Berdir explained how this translates and I think this one is just a duplicate of #2484959 that's not needed.
Update again, to explain that I think I just misunderstand this issue entirely :)
Comment #28
Amber Himes MatzChatted in Slack about this with @Berdir and @Greg Boggs. Here are the take-aways of our discussion:
- This issue is an edge-case feature request to be able to translate an already-submitted contact message.
- The linked related issue is not a duplicate of this issue, but a bug (which is currently in-progress to be fixed).
- I'm updating this issue to be a "feature request" and updating the title and issue summary to clarify its scope.
Comment #29
smustgrave CreditAttribution: smustgrave at Mobomo commentedFor the fix.