Files
langflow/scripts
RamGopalSrikar 316afd9719 refactor(i18n): bake i18n_key into template noteNodes, remove runtime stamping
Replaces fragile positional indexing with keys baked directly into the source
JSON files, so keys are stable regardless of node order changes.

- scripts/gp/bake_note_keys.py: new script that stamps template_notes.{flow}.{n}
  onto each noteNode missing an i18n_key; idempotent and --dry-run safe
- scripts/gp/extract_backend_strings.py: Tier 4 reads i18n_key from node data
  instead of positional index; warns if any noteNode is missing a key
- utils/i18n.py: translate_flow_notes() simplified — reads baked key, translates,
  no more flow_name param or index counter or stamping logic
- api/v1/flows.py, starter_projects.py: drop flow_name arg from call sites
- test_i18n_note_translation.py: tests updated for key-read behavior
- starter_projects/*.json: 64 noteNodes across 32 templates stamped with i18n_key

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-15 14:05:26 -04:00
..
2025-09-02 17:45:53 +00:00
2025-09-02 17:45:53 +00:00