mirror of
https://github.com/langflow-ai/langflow.git
synced 2026-07-24 21:39:50 +08:00
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>