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.

Comments

vasike’s picture

Status: Active » Needs review
StatusFileSize
new5.71 KB

here 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.

vasike’s picture

jsacksick’s picture

I 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?

jsacksick’s picture

Status: Needs review » Fixed

I 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

j0rd’s picture

I 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.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.