- @akalam opened merge request.
When you access to /group/GID/menu/create in order to create a content related with a group, the menu name will be always shown in the language that was used when cleared the cache the last time.
There is already an issue for this https://www.drupal.org/project/drupal/issues/3038717 🐛 Block/menu/views derivative labels are always shown in the first language they are view in after cache rebuild Needs work . What we have to do is to use the TranslatableEntityLabelMarkup new class provided in this issue instead of using the menu name coming from the entity's label method.
Add the Spanish language in Drupal
Create a menu in /admin/structure/group_content_menu_types and translate it to spanish
Configure a group type to be able to add this menu
Create a group of this type
Go to /en/group/GID/menu/create and check that the item name is "Group menu (MENU_NAME_EN)"
Go to /es/group/GID/menu/create and check that the item name is "Group menu (MENU_NAME_ES) " when it should be "Group menu (MENU_NAME_EN)"
Go to /es/admin and clear the Drupal cache (ensuring you are in the Spanish administration interface)
Go to /en/group/GID/menu/create and check that the item name is "Group menu (MENU_NAME_ES)" when it should be "Group menu (MENU_NAME_EN)"
Go to /es/group/GID/menu/create and check that the item name is "Group menu (MENU_NAME_ES) "
Use the TranslatableEntityLabelMarkup when building the plugin label in the \Drupal\group_content_menu\Plugin\GroupContentEnabler\GroupContentMenuDeriver
Note that this issue depends on https://www.drupal.org/project/drupal/issues/3038717 🐛 Block/menu/views derivative labels are always shown in the first language they are view in after cache rebuild Needs work
Postponed
1.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.