superset icon indicating copy to clipboard operation
superset copied to clipboard

Active menu item not highlighted when using Russian language

Open innovark37 opened this issue 3 weeks ago • 3 comments

Bug description

Menu's active tab highlighting mechanism fails when Superset's interface language is set to Russian locale. This occurs because the active tab detection logic compares hardcoded English strings against localized menu item keys.

Note: The highlighting is currently broken for Russian locale, but this represents a systemic localization issue that affects all non-English interfaces. Any language where menu item translations don't exactly match the hardcoded English comparison strings will experience the same problem.

Steps to reproduce

  1. In config.py set the LANGUAGES variables:
LANGUAGES = {
    "en": {"flag": "us", "name": "English"},
    "ru": {"flag": "ru", "name": "Russian"},
}
  1. Open the "Dashboards" tab
  2. Observe that the "Dashboards" tab in the header is highlighted as active
  3. Switch the UI language to Russian language
  4. Open the "Dashboards" tab
  5. Observe that the "Dashboards" tab in the header is NOT highlighted as active

Screenshots/recordings

English (working): Image

Russian (broken): Image

Superset version

master / latest-dev

Python version

3.9

Node version

16

Browser

Chrome

Additional context

No response

Checklist

  • [x] I have searched Superset docs and Slack and didn't find a solution to my problem.
  • [x] I have searched the GitHub issue tracker and didn't find a similar bug report.
  • [ ] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.

innovark37 avatar Dec 03 '25 08:12 innovark37

You've correctly identified a systemic bug: Superset's active menu highlighting logic uses hardcoded English strings (like "Dashboards", "Charts", "Datasets") to set the active tab, but menu labels are localized, so the highlighting fails in non-English interfaces such as Russian. This logic is in the frontend code (Menu.tsx), where the active tab is set by matching the current route to these English strings, not to a route or a localization key.

Workarounds for other i18n issues (like overriding the bootstrap locale function or rebuilding translations) do not fix this core problem, since the comparison is still against hardcoded English strings, not keys or routes. The only robust solution is to refactor the active tab detection to use route-based or key-based matching, independent of the displayed (localized) label. This would ensure correct highlighting regardless of language.

If you want to address this, look for places in the code where setActiveTabs is called with English strings and change the logic to use a stable key (like a route or an internal identifier) for both menu rendering and active tab detection. This will prevent mismatches when the UI is localized.

References:

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Chat with Dosu Open in Cursor Join Discord Share on X

dosubot[bot] avatar Dec 03 '25 08:12 dosubot[bot]

Do you have any custom CSS or Themes applied?

rusackas avatar Dec 03 '25 23:12 rusackas

@rusackas No, I don't have any custom CSS or themes applied. The issue reproduces with the default Superset theme.

innovark37 avatar Dec 04 '25 06:12 innovark37