Problem/Motivation

Currently the menu overview (located under admin/structure/menu) always displays the menu names/descriptions in the original language.
I know this was intentionally done for all config entity admin lists in #2136559: Config entity admin lists show configuration with overrides (eg. localized).

However in the case of the menu overview which is a config overview that is often accessed by editors whom are not necessarily fluent in english (or whatever the original language of your menu is) this can be a bit daunting.

Proposed resolution

Override the load method in the MenuListBuilder class to use the overridden config entities.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

geertvd created an issue. See original summary.

geertvd’s picture

Issue summary: View changes
geertvd’s picture

Issue summary: View changes
geertvd’s picture

Status: Active » Needs review
FileSize
841 bytes

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

borisson_’s picture

Issue tags: +Needs usability review

I agree, this is a good improvement for site builders - but I think the UX team should provide feedback here.

andypost’s picture

andypost’s picture

jhodgdon’s picture

I am pretty sure this page was showing the translated menu items back in Drupal 8.2 or so, because when I made screenshots for the User Guide in non-English languages, admin/structure/menu was showing non-English menu names and descriptions at that time.

For example, see the screenshots on this page from the Catalan User Guide, which I made from Drupal 8.2 or so:
https://www.drupal.org/ca/docs/user_guide/ca/menu-reorder.html

Both are showing English today when I try to regenerate the screenshots. I guess that is due to #2136559: Config entity admin lists show configuration with overrides (eg. localized) according to this issue's summary/comments.

Then when I click through to edit the menu item, I see the title and description in English there too, even if my only site language is Catalan. This could be very confusing to a non-English speaker.

However... I think this patch could make the situation even more confusing, because they would see the non-English menu items on the overview page, and then if they click through, they would see the name/description in English. In order to see the translated menu name/description, presumably they would need to click the Translate link instead of the Edit link.

So I think in addition to this patch, or instead of this patch, maybe some help should be added to the top of this page, explaining about the menu names being in English for the default menus, and needing to click Translate in order to change the translated names?

jhodgdon’s picture

I'm running through the screenshots for all the chapters of the User Guide, and I've run into the same thing as this issue on the Taxonomy page (admin/structure/taxonomy). The taxonomy that is set up by the Standard install profile, "Tags", used to be shown in the site language, as you can see in the first screen shot on
https://www.drupal.org/ca/docs/user_guide/ca/structure-taxonomy-setup.html
but today, it says "Tags" and "Use tags to group articles on similar topics into categories." in English.

This is another case where a content editor might be expected to want to see the page in the site language.

But read through the summary on #2136559: Config entity admin lists show configuration with overrides (eg. localized)... there is a reason that this decision was made. It is *very* confusing if the overview page for Menu and Taxonomy shows in, for example, Hungarian or Catalan, but when you click Edit, you see English (which you would, because Edit is for the un-translated configuration).

jhodgdon’s picture

Thinking more about this... I think this is really a Won't Fix issue as stated, for reasons outlined in #2136559: Config entity admin lists show configuration with overrides (eg. localized).

I think what we should do instead is add some hook_help() items to the Configuration Translation module, with a short explanation about editing the base config (in English) vs. translating the config item name/description, at the top of pages like
admin/structure/menu
admin/structure/taxonomy
admin/structure/views

andypost’s picture

Good idea about documentation, guess it should be added to config-translation - the most confusing module)

jhodgdon’s picture

I could see adding the hook_help() route entries to either the Language module (which lets you have non-English languages in the first place) or the Config Translation module (which provides the translate links/forms). The base configuration would be translated when it is displayed on the site (assuming the PO file had been downloaded from localize.drupal.org at installation) even without the Config Translation module, which (as far as I can tell) is just there to provide the UI for translating config within the site.

mpp’s picture

However... I think this patch could make the situation even more confusing, because they would see the non-English menu items on the overview page, and then if they click through, they would see the name/description in English. In order to see the translated menu name/description, presumably they would need to click the Translate link instead of the Edit link.

@jhodgdon, what language fallback settings are you using and are your menu's set as translatable on the "Content language" overview? When clicking through from the dutch menu overview on "menu bewerken" ("edit menu") we're still in the dutch context of that menu. So I'd say this patch is rtbc.

jhodgdon’s picture

If you click "Edit" on a menu that came from the Standard install profile or Drupal Core, you should be editing the English version of the name/description of the menu. You would need to click Translate to edit the Dutch version of the menu.

On the other hand, if you created your own menu, in Dutch, then if you click Edit you should see the base version of that menu, which is in Dutch.

mpp’s picture

@jhodgdon, I'd have to check wrt the standard profile but in my Drupal 8.6 installation I added an English menu, translated it to dutch and when clicking on the menu on the Dutch overview I go to the Dutch detail. Note that I have enabled menu translation, not sure if this is enabled by default in the standard profile.

I have these core patches applied:
"drupal/core": {
"Translations of taxonomy vocabulary not shown on admin overview": "https://www.drupal.org/files/issues/2018-05-18/translation_taxonomy_voca...",
"Menu overview always shows the untranslated config entities": "https://www.drupal.org/files/issues/menu_overview_always-2872646-4.patch"
}

jhodgdon’s picture

Hm. Something doesn't seem right... Let's step back a second. Here is what I think happens without this patch:
a) If you click Edit on a menu that was provided by the Core or the Standard installation profile, you will be editing the English version of the menu.
b) If you click Edit on a menu that was created by an admin, you will be editing the base-language version of the menu (in whatever language you specified when you created it).
c) If you click Translate, you should be able to see/edit all of the translations (including the base) of the menu.
d) If you visit the Menu overview page, what you see there should be the base language version of each menu, so that it matches what you see when you click Edit.

Which one(s) of these are changed by this patch?

Let's see. I'll test it out. I went to simplytest.me and made two sites:
1. 8.6.x without any patches
2. 8.6.x with the patch in #4

On both sites, I did the following after installation (which uses the Standard install profile by default on simplytest.me):
- Installed the 4 multilingual modules
- Added Spanish language
- Went to admin/menu and there:
-- Added a menu with English base language, and translated it into Spanish
-- Added a menu with Spanish base language and translated it into English

So now, on site 1 (no patch), when I go to admin/structure/menu, I see what I described above: all menus are shown in their base languages, and are consistent with what I see when I click Edit. Here is a screenshot of the page, and when I click Edit, I always get the same as what is shown on the overview page:
screenshot of menu overview no patch

But on site 2 (with this patch), I see the English translation of my Spanish menu when I go to admin/structure/menu and view in English:
screenshot of menu overview with patch
Which seems nice, but then when I click Edit on the menu whose base language is Spanish, I am editing the Spanish base menu, not the English translation I saw on the Menu overview page:
screenshot of edit screen with patch
The situation is much worse in this case if I view the menu overview page in Spanish. Then almost everything is shown in Spanish, but when I click Edit, I am mostly editing English.

This is big a usability problem, which is why I think this issue is a Won't Fix, and why the behavior was changed originally on #2136559: Config entity admin lists show configuration with overrides (eg. localized) -- what you see on the Menus overview page should be consistent with what you see when you click Edit: you always edit the base language of that particular menu, and to edit other languages, you go to Translate instead.

Gábor Hojtsy’s picture

Status: Needs review » Closed (won't fix)

The menu overview page as well as any other overview page should show the config in the language the config was created in. That is what you are editing when you hit edit. If you run a monolingual site and install in that language, that language will be shown in the overview and that language will be editable. If you run a multilingual site, the config will be in one of those languages and that is what the overview page will show and that is what the edit screen will let you edit. All other variants are translations and should be edited as translations.

Pasqualle’s picture