p5.js-web-editor icon indicating copy to clipboard operation
p5.js-web-editor copied to clipboard

Bug: Missing translation in MobileNav Language Select Overlay

Open pranjal270 opened this issue 9 months ago • 3 comments

p5.js version

No response

What is your operating system?

Windows

Web browser and version

Version 145.0.7632.111

Actual Behavior

In the mobile view of the editor, when opening the 3-dot "More" menu and selecting "Language", the resulting Overlay modal has a hardcoded English string: "Select Language" for its title. Because this is hardcoded, it ignores the user's currently active language setting and will always display in English. This was explicitly marked with a // TODO: add translations by the original developer in MobileNav.jsx (line 385).

Image

Expected Behavior

The overlay title should use the t() translation hook for localization so the popup title translates properly when the editor language is changed to Spanish, Hindi, etc.

Steps to reproduce

Steps:

  1. Open the p5.js Web Editor on a mobile viewport (or shrink the browser window).
  2. Open account settings and change the language to anything other than English.
  3. Click the 3-dot "More" menu (⋮) in the top right.
  4. Click "Language".
  5. Observe that the overlay title says "Select Language" in English instead of the translated string.

Snippet:

// client/modules/IDE/components/Header/MobileNav.jsx (line 385)
<Overlay
  // TODO: add translations
  title="Select Language"
  ariaLabel="Select Language"
  closeOverlay={() => setIsLanguageModalVisible(false)}
>

**I would like to work on this issue and submit a PR fixing it!**

pranjal270 avatar Feb 24 '26 19:02 pranjal270

Hello! I am an active contributor and I would love to work on fixing this bug. @raclim could you please assign this issue to me so I can submit a Pull Request? Thank you!

pranjal270 avatar Feb 24 '26 19:02 pranjal270

Thanks for catching this, just assigned!

raclim avatar Feb 24 '26 22:02 raclim

Opened PR #3935 to address this. Feedback welcome.

pranjal270 avatar Feb 25 '26 05:02 pranjal270