-
Notifications
You must be signed in to change notification settings - Fork 78
feat(FR-1567): add i18n configuration for Storybook #4946
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
|
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has required the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
Coverage report for
|
St.❔ |
Category | Percentage | Covered / Total |
|---|---|---|---|
| 🟡 | Statements | 63.5% | 254/400 |
| 🔴 | Branches | 42.3% | 151/357 |
| 🔴 | Functions | 50% | 46/92 |
| 🟡 | Lines | 65.16% | 230/353 |
Show new covered files 🐣
St.❔ |
File | Statements | Branches | Functions | Lines |
|---|---|---|---|---|---|
| 🔴 | ... / BAIDomainSelector.tsx |
50% | 0% | 0% | 50% |
Test suite run success
186 tests passing in 9 suites.
Report generated by 🧪jest coverage report action from 492a193
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds i18n (internationalization) configuration for Storybook to enable locale switching in component stories. It introduces a new i18n configuration file, adds a locale selector toolbar in Storybook, and includes two i18next plugin dependencies.
Key changes:
- New i18n configuration specifically for Storybook with all 21 locale files imported directly
- Storybook decorator with locale selector toolbar supporting language switching
- Addition of
i18next-browser-languagedetectorandi18next-http-backendas dev dependencies
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
packages/backend.ai-ui/src/i18n.ts |
New i18n configuration file that imports all 21 locale JSON files and initializes a separate i18n instance for Storybook |
packages/backend.ai-ui/.storybook/preview.tsx |
Adds i18n decorator with locale switching and toolbar configuration for 21 supported languages |
packages/backend.ai-ui/package.json |
Adds two i18next plugins as devDependencies |
pnpm-lock.yaml |
Auto-generated lock file updates for new dependencies |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
492a193 to
428a650
Compare
nowgnuesLee
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM

Resolves #4416(FR-1567)
Summary
Changes
Supported Languages
English, Korean, Japanese, Chinese (Simplified/Traditional), German, French, Spanish, Portuguese, Italian, Russian, Polish, Greek, Finnish, Turkish, Thai, Vietnamese, Indonesian, Malay, Mongolian
Test Plan
useTranslation2026-01-06.2.49.53.mov