Skip to content

feat(i18n): integrate i18next and react-i18next for localization support#1232

Merged
tenphi merged 9 commits into
mainfrom
feat-internationalization
Jul 16, 2026
Merged

feat(i18n): integrate i18next and react-i18next for localization support#1232
tenphi merged 9 commits into
mainfrom
feat-internationalization

Conversation

@tenphi

@tenphi tenphi commented Jul 9, 2026

Copy link
Copy Markdown
Member

Note

Medium Risk
Large cross-cutting change to default UI copy and a11y strings across many components; hosts must align on the shared i18next instance and SSR should use request-local instances to avoid language races.

Overview
Adds first-class i18n to @cube-dev/ui-kit: i18next / react-i18next as dependencies, a shared default instance (getI18n()), per-request instances (createUIKitI18n(locale)), and 12 uikit locale JSON bundles with parity tests.

Root now wraps the tree in I18nProvider, which pairs I18nextProvider with React Aria’s locale so translated strings and date/number formatting stay aligned. New optional i18n and locale props support SSR and formatting overrides.

Widespread component updates replace hardcoded English with useI18n() defaults (dialogs, forms, pickers, tabs, notifications, copy blocks, a11y labels, etc.). useFormatter() / createFormatter(locale) add memoized Intl helpers; notification formatRelativeTime uses translation keys.

The package re-exports i18next, react-i18next, and useLocale so hosts use one copy. Storybook gets a locale toolbar; tests reset language in setup. Bundle size limit rises 425kB → 445kB (minor changeset).

Reviewed by Cursor Bugbot for commit cd22e67. Bugbot is set up for automated code reviews on this repo. Configure here.

@changeset-bot

changeset-bot Bot commented Jul 9, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: cd22e67

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@cube-dev/ui-kit Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercel Bot commented Jul 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cube-ui-kit Ready Ready Preview, Comment Jul 13, 2026 1:20pm

Request Review

@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

📦 NPM canary release

Deployed canary version 0.0.0-canary-ba53cbd.

@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

🏋️ Size limit report

Name Size Passed?
All 428.7 KB (+3.91% 🔺) Yes 🎉
Tree shaking (just a Button) 114.36 KB (0% 🟰) Yes 🎉

Click here if you want to find out what is changed in this build

@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

🧪 Storybook is successfully deployed!

Comment thread src/components/content/Placeholder/Placeholder.tsx
Comment thread .storybook/preview.jsx
Comment thread src/components/content/CopyPasteBlock/CopyPasteBlock.tsx
Comment thread src/components/overlays/Toast/useProgressToast.tsx
Comment thread src/components/fields/ListBox/ListBox.tsx
Comment thread src/i18n/I18nProvider.tsx Outdated

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 227ee9b. Configure here.

Comment thread .storybook/preview.jsx
Comment thread src/i18n/instance.ts Outdated
@tenphi
tenphi merged commit 76e1f99 into main Jul 16, 2026
16 checks passed
@tenphi
tenphi deleted the feat-internationalization branch July 16, 2026 13:57
@github-actions github-actions Bot mentioned this pull request Jul 16, 2026
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