Skip to content

fix: refresh color dropdown when UI language changes (#21)#133

Merged
JohnMcLear merged 1 commit intomainfrom
fix/refresh-dropdown-on-language-change
Apr 17, 2026
Merged

fix: refresh color dropdown when UI language changes (#21)#133
JohnMcLear merged 1 commit intomainfrom
fix/refresh-dropdown-on-language-change

Conversation

@JohnMcLear
Copy link
Copy Markdown
Member

Fixes #21. The color select is wrapped in niceSelect, which renders its own DOM copy of the at init time. html10n rewrites option text in place for the new locale, but niceSelect does not observe those mutations, so the dropdown kept showing the previous language. Subscribe to html10n.localized and call niceSelect('update') to refresh the custom dropdown. Backend spec asserts the wiring is present.

The color select is wrapped in niceSelect, which renders its own DOM
copy of the <select> at init time. html10n rewrites the option text in
place for the new locale, but niceSelect does not observe those
mutations, so the user kept seeing the previous language's labels in
the dropdown.

Subscribe to \`html10n.localized\` from postAceInit and call
\`niceSelect('update')\` on the underlying select so the custom dropdown
re-reads the translated options.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@JohnMcLear JohnMcLear merged commit b20edbb into main Apr 17, 2026
5 checks passed
@JohnMcLear JohnMcLear deleted the fix/refresh-dropdown-on-language-change branch April 17, 2026 10:42
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.

Changing languages does not change the contents of the menu

1 participant