Files
langflow/scripts
Ram Gopal Srikar Katakam 9cb49c2c7d fix(i18n): backend locale translation fixes — custom component nodes, Toolset output, RAG template notes, UI banner strings (#13296)
* fix(i18n): translate custom component nodes and fix missing RAG template notes in ja/fr

- Add translate_component_node() helper to i18n.py and call it from
  custom_component and custom_component_update endpoints so canvas
  interactions (tool mode toggle, field edits) no longer revert node
  labels to English when a non-English locale is active.
- Sync ja.json and fr.json from GP: both locales were missing
  template_notes.vector_store_rag.* keys, causing the Vector Store RAG
  README note to always render in English.

* fix(i18n): translate Toolset output and UpdateAllComponents banner strings

- Extract the shared tool-mode output ("Toolset") via a sentinel norm
  "_toolmode" in extract_backend_strings.py so the dynamic output
  injected on every component when tool mode is enabled is covered by
  a single shared translation key instead of being silently skipped.
- Update translate_component_node() to use the "_toolmode" norm when
  the output name is "component_as_tool", resolving the key correctly
  for all components.
- Wrap all hardcoded strings in UpdateAllComponents/index.tsx with t()
  (summary banner, Dismiss/Dismiss All, Review All/Update All buttons).
- Add 15 new updateComponents.* keys to frontend en.json with i18next
  _one/_other plural variants; upload and download all locale files.
- Sync all backend and frontend locale files from GP.

* fix(i18n): sync backend locale files with Toolset translations from GP

* fix(i18n): translate Retry button in server connection error dialog

* [autofix.ci] apply automated fixes

* fix(i18n): inline lfx.base constants in extract_backend_strings to fix CI

The GP script test environment mocks lfx.components but does not install
the full lfx package, so `from lfx.base.tools.constants import ...` raised
ModuleNotFoundError. Inline the two constants directly, matching the pattern
already used in bake_note_keys.py.

* [autofix.ci] apply automated fixes

* fix(i18n): address PR review — blockedPlural scheme, TOOL_OUTPUT_NAME constant, translation error isolation

- I1: Replace {{blockedPlural}} English-suffix hack in UpdateAllComponents with two
  separate t() calls (blockedCannotRun + andMustBeUpdated), each driven by its own
  count parameter, giving proper _one/_other pluralization for both counts independently.
  Remove broken blockedAndMustUpdate_one/other keys from all 6 non-English locales
  (de/es/fr/ja/pt/zh-Hans) so they fall back cleanly to English until re-translated
  via the GP pipeline.
- I3: Replace magic string "component_as_tool" in i18n.py with TOOL_OUTPUT_NAME
  imported from lfx.base.tools.constants — the canonical source of truth.
- I4: Move translate_component_node() calls outside the main try/except in both
  custom_component and custom_component_update endpoints; wrap each in a narrow
  try/except that logs and falls through to the untranslated node, so an i18n bug
  can no longer fail a successful component update with HTTP 400.

* fix(i18n): translate update-components modal strings and preserve custom field display_names

- Translate hardcoded strings in UpdateComponentModal (title, column
  headers "Component"/"Update Type", "Breaking" label) — adds 5 new
  keys under updateComponent.* and downloads translations for all locales

- Fix custom component field display_names reverting on reload: extend
  build_component_display_names to collect all known locale translations
  per input field; syncNodeTranslations now checks the known-translation
  set before overwriting a field's display_name — user-customized values
  (not present in any locale file) are left untouched while standard
  translatable values continue to update correctly on locale switch

- Update ComponentDisplayNamesType to include per-field translation sets

* fix(i18n): correct updateComponent.breaking translation key

Change English source from "Breaking" to "Breaking Change" so GP
produces correct translations (all locales were getting "Breaking News"
variants). zh-Hans now correctly shows 重大变更, consistent with the
existing breakingUpdateDesc body text.

* chore(i18n): re-download frontend translations after reverting breaking key to "Breaking"

* fix(i18n): extract and translate FileComponent description

The extraction script silently skipped @property descriptors when reading
description from component classes. Add a fallback to _base_description
for components that use a dynamic @property description.

Unify _base_description with the string used inside get_tool_description()
so there is a single source of truth, then re-run extract/upload/download
to add the missing translations for FileComponent description and Knowledge
component strings across all locales.

* fix(ui): redesign outdated-components banner with title + list layout

Replace long sentence-style summary with bold "Flow needs review" title
and short per-condition bullet lines. Change Dismiss All button from
link to outline variant. Add 3 new i18n keys and sync all locale translations.

* fix(i18n): add missing backend locale translations for de, es, pt, zh-Hans

Regenerated via GP download script after merging release-1.10.0 changes.

* [autofix.ci] apply automated fixes

* fix(i18n): resolve ruff lint errors in i18n utils and endpoints

* fix(lint): suppress SLF001 for internal class attribute access in FileComponent

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* [autofix.ci] apply automated fixes

* starter templates

* fix(tests): update outdated-banner assertions to match redesigned layout

* [autofix.ci] apply automated fixes

* fix(docs): restore accidentally deleted memory-base docs from release-1.10.0

* fix(credentials): restore DB-first API key resolution and tests from release-1.10.0

* [autofix.ci] apply automated fixes

* fix(i18n): revert fetchErrorComponent key to common.retry (out of scope)

* [autofix.ci] apply automated fixes

* chore(i18n): sync backend and frontend locale files from GP

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Antônio Alexandre Borges Lima <104531655+AntonioABLima@users.noreply.github.com>
2026-05-29 20:23:49 +00:00
..
2025-09-02 17:45:53 +00:00
2025-09-02 17:45:53 +00:00