Skip to content

Conversation

@limshyun
Copy link
Contributor

@limshyun limshyun commented Jan 6, 2026

Resolves #4416(FR-1567)

Summary

  • Add i18n configuration for Storybook with 21 supported languages
  • Add locale selector toolbar in Storybook to switch languages dynamically
  • Add i18next dependencies for Storybook development

Changes

  • packages/backend.ai-ui/src/i18n.ts: New i18n configuration that imports all locale files directly
  • packages/backend.ai-ui/.storybook/preview.tsx: Add i18n decorator with locale selector toolbar
  • packages/backend.ai-ui/package.json: Add i18next-browser-languagedetector and i18next-http-backend as devDependencies

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

  • Run Storybook and verify locale selector appears in toolbar
  • Switch between languages and verify translations update in components using useTranslation
2026-01-06.2.49.53.mov

@github-actions github-actions bot added the size:L 100~500 LoC label Jan 6, 2026
@cla-assistant
Copy link

cla-assistant bot commented Jan 6, 2026

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link
Contributor Author

limshyun commented Jan 6, 2026


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • flow:merge-queue - adds this PR to the back of the merge queue
  • flow:hotfix - for urgent hot fixes, skip the queue and merge this PR next

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.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 6, 2026

Coverage report for ./packages/backend.ai-ui

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

@limshyun limshyun marked this pull request as ready for review January 6, 2026 05:50
@nowgnuesLee nowgnuesLee requested a review from Copilot January 7, 2026 07:32
Copy link
Contributor

Copilot AI left a 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-languagedetector and i18next-http-backend as 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

@limshyun limshyun requested a review from nowgnuesLee January 8, 2026 02:03
agatha197

This comment was marked as resolved.

@limshyun limshyun requested a review from agatha197 January 8, 2026 05:40
@limshyun limshyun requested a review from nowgnuesLee January 8, 2026 08:23
@limshyun limshyun force-pushed the feat/FR-1567/apply-i18n-for-storybook branch from 492a193 to 428a650 Compare January 8, 2026 09:21
@limshyun limshyun requested a review from nowgnuesLee January 8, 2026 09:42
Copy link
Contributor

@nowgnuesLee nowgnuesLee left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100~500 LoC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

apply i18n for storybook

4 participants