Skip to content

feat(i18n): globalization pipeline — frontend i18n with backend locale support#12933

Open
RamGopalSrikar wants to merge 13 commits intorelease-1.10.0from
feat/gp-i18n-clean
Open

feat(i18n): globalization pipeline — frontend i18n with backend locale support#12933
RamGopalSrikar wants to merge 13 commits intorelease-1.10.0from
feat/gp-i18n-clean

Conversation

@RamGopalSrikar
Copy link
Copy Markdown
Contributor

@RamGopalSrikar RamGopalSrikar commented Apr 29, 2026

Summary

Full i18n (globalization pipeline) implementation for Langflow.

Frontend (109 files):

  • react-i18next setup with 7 language support (en, fr, ja, es, de, pt, zh-Hans)
  • Lazy-load non-English locale files via Vite dynamic imports
  • Language selector in Settings > General page
  • Translate canvas node field labels, outputs, and templates on language change
  • Preserve user-customized node `display_name`/`description` on language switch — only default names translate, user-renamed nodes stay unchanged
  • Translate note nodes via dedicated `/flows/{id}/note_translations` endpoint
  • Translate UI strings across modals and pages (MCP, Knowledge Base, Settings, Model Providers, playground, etc.)
  • Content-hash component keys for stable GP translations

Backend (7 files):

  • 6 locale JSON files (fr, es, ja, de, pt, zh-Hans) with translated component metadata
  • `build_component_display_names()` in `i18n.py` — bundles all known display_name/description translations across locales into the `/api/v1/all` response so the frontend can distinguish default names from user-customized ones

Test plan

  • Language switch in Settings > General translates UI strings
  • Canvas node field labels translate on language change
  • Default-named nodes translate; user-renamed nodes stay unchanged
  • Note nodes in starter flows translate
  • TypeScript build: `cd src/frontend && npx tsc --noEmit`
  • Backend tests: `python -m pytest src/backend/tests/unit/test_i18n.py -v`

Squash of PR #12825 (feat/gp-frontend-i18n-batch-c) onto release-1.10.0.

- IBM Globalization Pipeline integration with GP REST API client
- react-i18next setup with 7 language support (en, fr, ja, es, de, pt, zh-Hans)
- Lazy-load non-English locale files via Vite dynamic imports
- Language selector in Settings > General page
- Backend: serve translated component metadata via Accept-Language header
- Translate canvas node field labels, outputs, templates on language change
- Translate note nodes via dedicated endpoint
- Translate all UI modals and pages (MCP, Knowledge Base, Settings, etc.)
- CI: GP upload/download workflows, auto-bake note keys
- Content-hash component keys for stable GP translations
- Preserve user-customized node display_name/description on language switch
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 29, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 156bebb2-d999-4358-8de5-1d31c31e23a6

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/gp-i18n-clean

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added the enhancement New feature or request label Apr 29, 2026
@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Apr 29, 2026
package-lock.json: npm noise, not part of this feature
flows_helpers.py: unrelated blank-line change
@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Apr 29, 2026
- starter_projects/*.json: trivial trailing newline only, not i18n content
- api/v1/flows.py: unrelated deployment guard removal and flow update refactor
- tests/unit/test_i18n_note_translation.py: minor non-functional changes
@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Apr 29, 2026
…8n.py

Resolves ruff F401 (content_hash imported but unused) and PLW2901
(for-loop variable `node` overwritten by assignment).
@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Apr 29, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 29, 2026

Codecov Report

❌ Patch coverage is 60.31390% with 177 lines in your changes missing coverage. Please review.
✅ Project coverage is 53.91%. Comparing base (6b7703c) to head (0267029).

Files with missing lines Patch % Lines
...ontend/src/components/core/jsonEditor/menuUtils.ts 41.37% 17 Missing ⚠️
...s/deploymentsPage/components/providers-content.tsx 10.00% 9 Missing ⚠️
...omponents/core/editFlowSettingsComponent/index.tsx 66.66% 8 Missing ⚠️
...eBarFolderButtons/components/mcp-server-notice.tsx 12.50% 7 Missing ⚠️
...components/core/jsonEditor/useMenuCustomization.ts 58.82% 7 Missing ⚠️
src/frontend/src/pages/DeleteAccountPage/index.tsx 0.00% 6 Missing ⚠️
...s/tableComponent/components/TableOptions/index.tsx 37.50% 5 Missing ⚠️
...iew/chat-header/components/chat-header-actions.tsx 28.57% 5 Missing ⚠️
src/frontend/src/hooks/flows/use-save-flow.ts 28.57% 5 Missing ⚠️
...nericNode/components/NodeDialogComponent/index.tsx 20.00% 4 Missing ⚠️
... and 45 more
Additional details and impacted files

Impacted file tree graph

@@                Coverage Diff                 @@
##           release-1.10.0   #12933      +/-   ##
==================================================
+ Coverage           53.82%   53.91%   +0.08%     
==================================================
  Files                2051     2051              
  Lines              187304   187559     +255     
  Branches            28150    28145       -5     
==================================================
+ Hits               100817   101121     +304     
+ Misses              85377    85327      -50     
- Partials             1110     1111       +1     
Flag Coverage Δ
backend 57.13% <100.00%> (+0.03%) ⬆️
frontend 54.11% <59.95%> (+0.12%) ⬆️
lfx 49.74% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/backend/base/langflow/utils/i18n.py 63.63% <100.00%> (ø)
...Nodes/GenericNode/components/outputModal/index.tsx 38.58% <100.00%> (+0.18%) ⬆️
...e/appHeaderComponent/components/FlowMenu/index.tsx 93.93% <100.00%> (ø)
...core/assistantPanel/components/assistant-input.tsx 90.29% <100.00%> (+0.07%) ⬆️
...istantPanel/components/assistant-loading-state.tsx 96.93% <100.00%> (+0.05%) ⬆️
...ts/core/canvasControlsComponent/CanvasControls.tsx 90.00% <100.00%> (+0.11%) ⬆️
...omponent/components/sideBarFolderButtons/index.tsx 42.41% <100.00%> (ø)
...omponent/components/inputGlobalComponent/index.tsx 91.93% <100.00%> (+0.08%) ⬆️
.../chat-view/chat-input/components/input-wrapper.tsx 77.71% <100.00%> (+1.60%) ⬆️
...rc/frontend/src/hooks/flows/use-restore-version.ts 98.71% <100.00%> (+0.03%) ⬆️
... and 76 more

... and 44 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Apr 29, 2026
@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Apr 29, 2026
@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Apr 29, 2026
@RamGopalSrikar RamGopalSrikar changed the title feat(i18n): globalization pipeline — frontend + backend i18n support feat(i18n): globalization pipeline — frontend i18n with backend locale support Apr 29, 2026
@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Apr 29, 2026
@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Apr 29, 2026
…x i18n test mock

The squash merge brought in older versions of deployment page components,
stripping functionality added by PRs that landed on release-1.10.0 after
our feature branch diverged (duplicate tool name validation, deploy choice
dialog update flow, step-type/step-attach-flows logic).

Restored 14 files to their release-1.10.0 state. Also added __esModule: true
to the i18n mock in flowStore.test.ts to fix the i18n_1.default.t TypeError.
@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Apr 29, 2026
…adModal to release-1.10.0

These files had functionality stripped by the squash merge (buildKeyPairPayload/
buildArgsPayload helpers, save version dialog logic, modal height/validation
constants). Restored to release-1.10.0 state.
@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Apr 29, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Frontend Unit Test Coverage Report

Coverage Summary

Lines Statements Branches Functions
Coverage: 36%
36.23% (42225/116547) 67.83% (5785/8528) 36.26% (970/2675)

Unit Test Results

Tests Skipped Failures Errors Time
4095 0 💤 0 ❌ 0 🔥 9m 27s ⏱️

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant