-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Description
Context
When using Matomo on a narrower screens (990px and below), the menus change into a hamburger and meatballs menu. When viewing the settings/administration, the Plugins menu item errors in this view with a missing translation as per the screenshot.
Expected Behavior
The menu item for Plugins displays correctly in all languages including the number of plugins to update.
Current Behavior
For wider views where the menu is generated by PHP it all works correctly, but for tablet and mobile views the JS menu is broken for the Plugins item.
Possible Solution
All other items use the translation key as the name of the item and translations are provided to JS via getClientSideTranslationKeys(&$translations)
.
For the Plugins menu item, the key for the menu is the actual translation itself due to the need to add the number of available updates to the item. For PHP this falls back to the text itself, but for JS it can't find the correct General_Plugins
key as it's not used.
One potential solution would be to add a new General_PluginsWithUpdatesAvailable
key and use that conditionally based on the available updates. That way the frontend would have the correct key to use. The question remains about how to pass the additional value with the number of plugin updates to the frontend. Possibly would need enhancing the FE menu mechanism to support this.
Steps to Reproduce (for Bugs)
- Visit
/index.php?module=CoreAdminHome&action=home
in a window with below 990px width - Open the hamburger menu, open the System item
- Observe the issue
Your Environment
- Matomo Version: 5.x-dev latest
- PHP Version: 8.2
- Server Operating System: MacOS
- Browser: Brave
- Operating System: MacOS