Skip to content

Fix Beta Features menu items not being translated#2466

Merged
sejas merged 4 commits intotrunkfrom
fix/stu-1248-beta-features-translation
Jan 27, 2026
Merged

Fix Beta Features menu items not being translated#2466
sejas merged 4 commits intotrunkfrom
fix/stu-1248-beta-features-translation

Conversation

@sejas
Copy link
Copy Markdown
Member

@sejas sejas commented Jan 23, 2026

Related issues

Proposed Changes

  • Convert BETA_FEATURES from a static constant to a factory function (getBetaFeaturesDefinition) that calls __() at runtime. This ensures translations are loaded before the strings are evaluated.
Screenshot 2026-01-26 at 23 08 13

Testing Instructions

  • Append this translation at the end of common/translations/studio-es.jed.json
"Multi-Worker Support":["Compatibilidad con multiproceso"],"Enable multi-worker PHP processing for faster performance":["Habilita el procesamiento multiproceso de PHP para obtener un rendimiento más rápido"],"Xdebug Support":["Compatibilidad con Xdebug"],"Enable PHP debugging with Xdebug (one site at a time)":["Habilita la depuración de PHP con Xdebug (solo un sitio a la vez)"]
  • Start Studio and switch language to non-English (e.g., Spanish)
  • Open Beta Features menu (Studio menu > Beta Features on macOS)
  • Verify menu items display in the selected language
  • Toggle a beta feature on/off and verify it persists after restart
  • Change the language to English
  • Confirm the beta features are displayed in English

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?

Convert BETA_FEATURES from a static constant to a factory function
(getBetaFeaturesDefinition) that calls __() at runtime. This ensures
translations are loaded before the strings are evaluated.

Fixes STU-1248
@sejas sejas requested a review from a team January 26, 2026 22:56
sejas added 2 commits January 26, 2026 23:31
Replace BETA_FEATURES_CONFIG with simpler BETA_FEATURE_DEFAULTS object,
eliminating duplicate key and default value definitions.
@sejas sejas marked this pull request as ready for review January 26, 2026 23:45
Copy link
Copy Markdown
Contributor

@ivan-ottinger ivan-ottinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice fix! The change looks good and works as expected. The beta features are now translated:

Image

When a beta feature is toggled, the setting persists after app restart.

Copy link
Copy Markdown
Contributor

@epeicher epeicher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @sejas for solving this! I have tested it, and I can see the translation now in the Beta features menu, toggling them also persists after closing and opening Studio. Changes LGTM!

Image

@sejas sejas merged commit 1a484b6 into trunk Jan 27, 2026
8 checks passed
@sejas sejas deleted the fix/stu-1248-beta-features-translation branch January 27, 2026 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants