Skip to content

feat(i18n): add Simplified Chinese localization#6120

Closed
fadewalk wants to merge 20 commits intokeephq:mainfrom
fadewalk:feat/i18n-zh-CN
Closed

feat(i18n): add Simplified Chinese localization#6120
fadewalk wants to merge 20 commits intokeephq:mainfrom
fadewalk:feat/i18n-zh-CN

Conversation

@fadewalk
Copy link

@fadewalk fadewalk commented Mar 21, 2026

Summary

  • Add complete Simplified Chinese (zh-CN) localization for Keep UI
  • Fix hydration error caused by block elements inside PageSubtitle in workflows page
  • Improve zh-CN terminology: replace "提供商" with "集成" for Keep provider concept (preserve "提供商" for SSO IdP and AI model providers)

Changes

  • New keep-ui/i18n/messages/zh-CN.json with full Chinese translations
  • New README.zh.md Chinese documentation
  • Language switcher component with cookie-based locale persistence
  • next-intl configuration with 'en' as default locale

Test plan

  • Verify Chinese localization displays correctly in browser
  • Check workflows page renders without hydration errors
  • Confirm terminology is consistent across all translated pages

- Add complete Chinese translations for all main pages
- Implement LanguageSwitcher component with cookie-based locale persistence
- Configure next-intl with 'en' as default locale
- Add useI18n hook for consistent translation usage

Supported pages:
- Alerts, Incidents, Workflows, Dashboard
- Providers, Topology, Rules, Settings
- Health, Sign-in, Error pages
@vercel
Copy link

vercel bot commented Mar 21, 2026

@fadewalk is attempting to deploy a commit to the KeepHQ Team on Vercel.

A member of the Team first needs to authorize it.

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Mar 21, 2026
@CLAassistant
Copy link

CLAassistant commented Mar 21, 2026

CLA assistant check
All committers have signed the CLA.

@github-actions
Copy link
Contributor

No linked issues found. Please add the corresponding issues in the pull request description.
Use GitHub automation to close the issue when a PR is merged

@dosubot dosubot bot added Feature A new feature javascript Pull requests that update Javascript code labels Mar 21, 2026
@dosubot dosubot bot added size:XXL This PR changes 1000+ lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Mar 21, 2026
@fadewalk fadewalk changed the title feat(i18n): Add Simplified Chinese (zh-CN) localization feat(i18n): add Simplified Chinese localization and README Mar 21, 2026
- Replace 提供商 with 集成 for Keep provider terminology
- Fix hydration error caused by block elements inside PageSubtitle
- Preserve correct 提供商 usage for SSO IdP and AI model providers
@fadewalk fadewalk changed the title feat(i18n): add Simplified Chinese localization and README fix(i18n): improve Chinese localization and fix hydration issues Mar 22, 2026
@fadewalk fadewalk changed the title fix(i18n): improve Chinese localization and fix hydration issues feat(i18n): add Simplified Chinese localization and fix hydration issues Mar 22, 2026
@fadewalk fadewalk changed the title feat(i18n): add Simplified Chinese localization and fix hydration issues feat(i18n): add Simplified Chinese localization Mar 22, 2026
fadewalk and others added 14 commits March 22, 2026 11:05
- Add missing i18n keys for provider form (pullingEnabled, connectTo,
  providerDocumentation, etc.)
- Translate KeepLoader loading text
- Translate provider search/filter placeholders
- Translate workflow template empty state
- Translate StepEditor provider selection
… workflows and shared UI

Translate remaining hardcoded English strings to Chinese in:
- Alert components (22 files): menu, sidebar, timeline, dismiss, note,
  assign ticket, associate incident, create incident AI, error events,
  enrich, simulate, history, raw alert, severity mapping, theme
- Incident components: severity/status selects, report metrics
- Workflow components: AI assistant, builder, test run, manual run,
  unsaved changes, alert payload, metadata form
- Shared UI: error component, pagination, workflow YAML editor,
  trace viewer
- Filter facet: filter values placeholder and no results message

Also add missing incident status (firing, acknowledged, merged) and
severity (warning, info) translation keys to both en.json and zh-CN.json.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- alerts-rules-builder.tsx: Translate CEL input, SQL import modal, query builder modal
- workflow-templates.tsx: Translate search placeholder and clear button
- ColumnSelection.tsx: Add full i18n support for column selection modal
- workflow-graph.tsx: Translate "No data available" text
- workflow-builder.tsx: Translate YAML editor and AI assistant button titles
- workflow-builder-card.tsx: Translate loading and error messages
- AlertsFoundBadge.tsx: Translate correlation rule alert matching messages
- AILink.tsx: Translate "AI Plugins" and "AI iterated" text
- create-or-update-maintenance-rule.tsx: Fix maintenance form translations

Added new translation keys:
- presets.* (celPlaceholder, enterToApply, invalidCEL, conditionApplied, etc.)
- workflows.builder.* (showYAMLEditor, hideYAMLEditor, showAIAssistant, etc.)
- rules.correlation.messages.* (alertsFoundSingle/Plural, noAlertsFound*, gettingYourAlerts)
- maintenance.timeCaption
- aiPlugins.iterated

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- alert-table-server-side.tsx: Translate no alerts empty state, simulate/connect buttons
- SettingsSelection.tsx: Translate settings button and tab labels
- Pagination.tsx, alert-pagination.tsx, pagination.tsx: Translate "Showing X of Y" text

Added translation keys:
- alerts.messages.noAlerts, noAlertsDescription
- alerts.actions.simulate, connectDataSource
- common.labels.columns, theme, rowStyle, actionTray

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add translations for severity values (critical, high, warning, etc.) in FacetValue component
- Add translations for status values (maintenance, pending, etc.) in FacetValue component
- Fix hardcoded "Refresh" button tooltip to use i18n translation
- Fix missing comma after noAlertsDescription in en.json

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…nTray translations

Add missing translation keys for alerts.labels.rowStyle and alerts.labels.actionTray in both en.json and zh-CN.json to resolve IntlError messages.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add renderOptionLabel for Status and Severity facets in incident-list.tsx to use i18n translations.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Translate the preset name 'feed' to use i18n translation in alert-table-server-side.tsx.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use toLowerCase() for translation keys to match the lowercase keys in translation files.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…lerts table

- Translate Severity labels using alerts.severity.* translation keys
- Add renderOptionLabel for Status facet to translate status values
- Translate Dismissed facet values using alerts.facets.dismissed/notDismissed
- Fix facet-value "All"/"Only" buttons to use translations
- Add t to useMemo dependencies for proper translation access

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
fadewalk and others added 2 commits March 22, 2026 18:32
Add alerts.status.maintenance translation key to both en.json and zh-CN.json

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use incidents.table.incident translation key for both Incident and
Linked incident facet names to ensure proper translation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@fadewalk
Copy link
Author

Closing this PR. We'll maintain our own forked version with Chinese localization going forward. Thanks for the great project!

@fadewalk fadewalk closed this Mar 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature A new feature javascript Pull requests that update Javascript code size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants