Skip to content

"Plugins" menu item translation error on narrow screens #21204

@michalkleiner

Description

@michalkleiner

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.

plugins menu item not translated

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)

  1. Visit /index.php?module=CoreAdminHome&action=home in a window with below 990px width
  2. Open the hamburger menu, open the System item
  3. Observe the issue

Your Environment

  • Matomo Version: 5.x-dev latest
  • PHP Version: 8.2
  • Server Operating System: MacOS
  • Browser: Brave
  • Operating System: MacOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugFor errors / faults / flaws / inconsistencies etc.RegressionIndicates a feature used to work in a certain way but it no longer does even though it should.c: Design / UIFor issues that impact Matomo's user interface or the design overall.c: i18nFor issues around internationalisation and localisation.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions