I noticed there are some issues for Commerce message types & Multiple languages:
- Adding new language : the alter won't take place till the default message types are rebuilt (clear cache).
- the Alter won't cover the Overridden Commerce message type
by Overriden, i mean the Commerce message are edited to fit every language - and after we want to use the default (LANGUAGE_NONE) settings for a new language it's added after.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | commerce_message-fix-multilingual-message-types-2033815-3.patch | 4.44 KB | jsacksick |
| #1 | commerce_message_types_multilingual-2033815-1.patch | 5.71 KB | vasike |
Comments
Comment #1
vasikehere is a patch that should provide the solution for description issues.
it uses hook_multilingual_settings_changed() for altering the Commerce message types.
i'm not sure if hook_default_message_type_alter() is still needed.
Comment #2
vasikeany feedback/results about the patch?
it should take care of other 2 open issues:
- #1990902: Incorrect implementation of hook_default_message_type_alter()
- #1995302: commerce_message_default_message_type_alter() alters types that it shouldnt
Comment #3
jsacksick commentedI don't really like the fact that we have to save the message type, add a _altered flag, I don't think we need all of that, the attached patch seems to work for me, what do you think?
Comment #4
jsacksick commentedI decided to commit the last patch, I'm pretty sure we don't want to alter the overriden message types even when the localized version is empty, I personally wouldn't expect this behavior, however, if you want that, you should probably open a feature request. 39b6cd5
Comment #5
j0rd commentedI don't know if the patch actually works, but the code is much easier to read than the one I wrote (and didn't understand) in "commerce_message_default_message_type_alter() alters types that it shouldnt"
So thumbs up on my side to mark my old issue as dupe and thumbs up to removal of some hardcoding.