feat(admin): enable shared localization runtime in God Mode - #9590
feat(admin): enable shared localization runtime in God Mode#9590bulunote wants to merge 2 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
🚧 Files skipped from review as they are similar to previous changes (4)
📝 WalkthroughWalkthroughThe admin app now wires the shared i18n provider, synchronizes the document locale, localizes breadcrumbs and common forms, and adds tests for translation integration. ChangesAdmin internationalization
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant CoreProviders
participant AdminTranslationProvider
participant AdminHeader
participant AdminForms
participant Document
CoreProviders->>AdminTranslationProvider: provide translation context
AdminTranslationProvider->>Document: synchronize active locale
AdminTranslationProvider->>AdminHeader: provide translation function
AdminTranslationProvider->>AdminForms: provide translation function
AdminHeader->>AdminHeader: translate breadcrumb labels
AdminForms->>AdminForms: translate form and popup text
Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@apps/admin/app/`(all)/(home)/sign-in-form.tsx:
- Line 141: Update the className in apps/admin/app/(all)/(home)/sign-in-form.tsx
at lines 141-141 and apps/admin/components/instance/setup-form.tsx at lines
218-218, changing the invalid !bg-surface-1 utility to the Tailwind v4 suffix
form bg-surface-1!.
In `@apps/admin/components/common/new-user-popup.tsx`:
- Around line 33-36: Update the popup description text in the new-user component
by removing the extra “with” so it reads “Start your journey by creating your
first workspace.”
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: e80daa42-8063-4b2a-b461-f8a291b113d6
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (10)
apps/admin/app/(all)/(dashboard)/general/form.tsxapps/admin/app/(all)/(home)/sign-in-form.tsxapps/admin/components/common/header/core.tsapps/admin/components/common/header/index.tsxapps/admin/components/common/new-user-popup.tsxapps/admin/components/instance/setup-form.tsxapps/admin/package.jsonapps/admin/providers/core.tsxapps/admin/providers/translation-provider.tsxapps/admin/tests/i18n-wiring.test.ts
Description
God Mode currently renders outside Plane's shared localization runtime, so changing the user's language in the main application does not affect common Admin controls or the document language metadata.
This change connects the Admin application to the existing
@plane/i18nruntime and performs a first, deliberately bounded localization pass:userLanguagepreference and keepsdocument.documentElement.langsynchronized;This PR intentionally does not add an Admin-specific namespace populated with English placeholders for other locales. Admin-only copy remains unchanged until it can be translated through Plane's normal localization workflow. That keeps every locale meaningful and makes this infrastructure change independently reviewable.
Scope and non-goals
Type of change
Screenshots / media
The visible behavior is locale-dependent: shared God Mode breadcrumbs, form labels, actions, and accessibility labels now follow the language already selected by the user. No layout or styling changes are introduced.
Test scenarios
userLanguageto a supported locale such aszh-CN, open God Mode, and confirm shared breadcrumbs and controls use that locale.langattribute matches the active locale after i18n initialization.Verification performed
pnpm --filter admin test:i18n— 5 tests passed.pnpm --filter admin check:types— passed.pnpm --filter @plane/i18n check:sync— all 19 locales remain synchronized at 3,837 keys.pnpm turbo run build --filter=admin --output-logs=errors-only— 9/9 tasks passed.git diff --check— passed.References
Part of #9089.
This complements the broader hardcoded-string work in #9082 by covering the separate Admin/God Mode application and keeping this first Admin slice small enough to review independently.
Summary by CodeRabbit
New Features
Tests