Skip to content

i18n: extend component locales in story#2563

Merged
huacnlee merged 2 commits into
mainfrom
calendar/story-locale-extensions
Jul 13, 2026
Merged

i18n: extend component locales in story#2563
huacnlee merged 2 commits into
mainfrom
calendar/story-locale-extensions

Conversation

@huacnlee

@huacnlee huacnlee commented Jul 13, 2026

Copy link
Copy Markdown
Member

Summary

  • upgrade to rust-i18n 4.2.0 and register Story locales with extend!(gpui_component)
  • add French Calendar and DatePicker translations as a Story-only extension
  • keep the component’s built-in Italian and Traditional Chinese locales unchanged
  • add French to the Story language menu and cover extension fallback behavior with a test
  • document custom I18n setup, namespace rules, override priority, and locale selection in English and Simplified Chinese

This uses rust-i18n’s locale extension mechanism to address the customization requirement discussed in #2548 without adding every downstream locale to gpui-component itself.

Refs #2548

Test Plan

  • cargo test -p gpui-component-story
  • git diff --check
  • bun run build (blocked by the current Bun/Vite Vue runtime: crypto.hash is not a function while compiling the existing contributors.md)

Demonstrate rust-i18n 4.2 locale extensions with Story-provided French calendar translations while preserving the component's built-in locales.

Co-authored-by: Codex <codex@openai.com>
@huacnlee huacnlee changed the title feat(i18n): extend component locales in story i18n: extend component locales in story Jul 13, 2026
Document how applications add or override component locales with rust-i18n extend!, including namespace and lookup priority.

Co-authored-by: Codex <codex@openai.com>
@huacnlee
huacnlee enabled auto-merge (squash) July 13, 2026 07:34
@huacnlee
huacnlee merged commit c467a74 into main Jul 13, 2026
4 checks passed
@huacnlee
huacnlee deleted the calendar/story-locale-extensions branch July 13, 2026 07:44
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.

1 participant