Repository navigation
fix: make locale updates source-aware - #15024
benceruleanlu wants to merge 1 commit into
Conversation
🎭 Playwright: ✅ 1800 passed, 0 failed · 3 flaky📊 Browser Reports
🎨 Storybook: ✅ Built — View Storybook📦 Bundle: 8.69 MB gzip 🔴 +495 BDetailsSummary
Category Glance App Entry Points — 3.67 kB (baseline 3.67 kB) • ⚪ 0 BMain entry bundles and manifests
Status: 1 added / 1 removed Graph Workspace — 1.36 MB (baseline 1.36 MB) • ⚪ 0 BGraph editor runtime, canvas, workflow orchestration
Status: 2 added / 2 removed / 1 unchanged Views & Navigation — 124 kB (baseline 124 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces
Status: 13 added / 13 removed / 4 unchanged Panels & Settings — 565 kB (baseline 565 kB) • ⚪ 0 BConfiguration panels, inspectors, and settings screens
Status: 10 added / 10 removed / 16 unchanged User & Accounts — 27 kB (baseline 27 kB) • ⚪ 0 BAuthentication, profile, and account management bundles
Status: 6 added / 6 removed / 4 unchanged Editors & Dialogs — 125 kB (baseline 125 kB) • ⚪ 0 BModals, dialogs, drawers, and in-app editors
Status: 7 added / 7 removed / 1 unchanged UI Components — 67.1 kB (baseline 67.1 kB) • ⚪ 0 BReusable component library chunks
Status: 6 added / 6 removed / 8 unchanged Data & Services — 3.5 MB (baseline 3.5 MB) • ⚪ 0 BStores, services, APIs, and repositories
Status: 14 added / 14 removed / 3 unchanged Utilities & Hooks — 550 kB (baseline 550 kB) • ⚪ 0 BHelpers, composables, and utility bundles
Status: 21 added / 21 removed / 17 unchanged Vendor & Third-Party — 16.3 MB (baseline 16.3 MB) • ⚪ 0 BExternal libraries and shared vendor chunks Status: 17 unchanged Other — 14 MB (baseline 14 MB) • 🔴 +2.44 kBBundles that do not match a named category
Status: 87 added / 87 removed / 199 unchanged ⚡ Performance Report
Show regressions
All metrics
Historical variance (last 15 runs)
Trend (last 15 commits on main)
Raw data{
"timestamp": "2026-08-11T01:12:09.317Z",
"gitSha": "ed42c7f6575bea75d99d7737b903275a8eb5b8fd",
"branch": "bl/fe-1499-i18n-source-provenance",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2033.2099999999969,
"styleRecalcs": 9,
"styleRecalcDurationMs": 9.184000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 503.50700000000006,
"heapDeltaBytes": 5878828,
"heapUsedBytes": 70171008,
"domNodes": 18,
"jsHeapTotalBytes": 24641536,
"scriptDurationMs": 19.683999999999997,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-idle",
"durationMs": 2044.6890000000053,
"styleRecalcs": 9,
"styleRecalcDurationMs": 7.8279999999999985,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 498.486,
"heapDeltaBytes": -17999868,
"heapUsedBytes": 46405272,
"domNodes": -281,
"jsHeapTotalBytes": 23306240,
"scriptDurationMs": 15.934000000000005,
"eventListeners": -153,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1958.4389999999985,
"styleRecalcs": 74,
"styleRecalcDurationMs": 36.074999999999996,
"layouts": 12,
"layoutDurationMs": 3.3759999999999994,
"taskDurationMs": 913.47,
"heapDeltaBytes": 373796,
"heapUsedBytes": 64570428,
"domNodes": 58,
"jsHeapTotalBytes": 25690112,
"scriptDurationMs": 123.04799999999999,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1806.2610000000063,
"styleRecalcs": 74,
"styleRecalcDurationMs": 32.755,
"layouts": 12,
"layoutDurationMs": 2.958,
"taskDurationMs": 851.755,
"heapDeltaBytes": -14170528,
"heapUsedBytes": 50201264,
"domNodes": -283,
"jsHeapTotalBytes": 23568384,
"scriptDurationMs": 120.169,
"eventListeners": -153,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1754.747000000009,
"styleRecalcs": 31,
"styleRecalcDurationMs": 16.527,
"layouts": 6,
"layoutDurationMs": 0.48799999999999993,
"taskDurationMs": 376.99899999999997,
"heapDeltaBytes": 8908140,
"heapUsedBytes": 73170860,
"domNodes": 78,
"jsHeapTotalBytes": 24117248,
"scriptDurationMs": 17.809,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1722.2570000000132,
"styleRecalcs": 32,
"styleRecalcDurationMs": 15.283999999999999,
"layouts": 6,
"layoutDurationMs": 0.5290000000000001,
"taskDurationMs": 370.502,
"heapDeltaBytes": 8858248,
"heapUsedBytes": 73160520,
"domNodes": 77,
"jsHeapTotalBytes": 24379392,
"scriptDurationMs": 17.93,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-clipping",
"durationMs": 681.7450000000349,
"styleRecalcs": 14,
"styleRecalcDurationMs": 10.39,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 421.684,
"heapDeltaBytes": -11147060,
"heapUsedBytes": 53178672,
"domNodes": 24,
"jsHeapTotalBytes": 25690112,
"scriptDurationMs": 62.721,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 572.7809999999636,
"styleRecalcs": 11,
"styleRecalcDurationMs": 7.259000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 370.304,
"heapDeltaBytes": -11239828,
"heapUsedBytes": 53138872,
"domNodes": 18,
"jsHeapTotalBytes": 25165824,
"scriptDurationMs": 57.301,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-idle",
"durationMs": 2040.982999999983,
"styleRecalcs": 9,
"styleRecalcDurationMs": 7.523999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 662.8479999999998,
"heapDeltaBytes": 6849136,
"heapUsedBytes": 66349352,
"domNodes": -282,
"jsHeapTotalBytes": 2723840,
"scriptDurationMs": 102.17999999999999,
"eventListeners": -179,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-idle",
"durationMs": 2048.1359999999995,
"styleRecalcs": 10,
"styleRecalcDurationMs": 8.840999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 682.9499999999999,
"heapDeltaBytes": 7247444,
"heapUsedBytes": 66198756,
"domNodes": -278,
"jsHeapTotalBytes": 2461696,
"scriptDurationMs": 109.233,
"eventListeners": -147,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "large-graph-pan",
"durationMs": 2152.7379999999994,
"styleRecalcs": 68,
"styleRecalcDurationMs": 12.045,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1249.596,
"heapDeltaBytes": 4545060,
"heapUsedBytes": 65656792,
"domNodes": -285,
"jsHeapTotalBytes": 3440640,
"scriptDurationMs": 433.201,
"eventListeners": -147,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2154.7440000000506,
"styleRecalcs": 69,
"styleRecalcDurationMs": 13.748999999999997,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1252.8539999999998,
"heapDeltaBytes": -5470868,
"heapUsedBytes": 55082452,
"domNodes": -287,
"jsHeapTotalBytes": 4296704,
"scriptDurationMs": 422.57099999999997,
"eventListeners": -179,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3200.078000000019,
"styleRecalcs": 66,
"styleRecalcDurationMs": 14.474,
"layouts": 60,
"layoutDurationMs": 7.021999999999999,
"taskDurationMs": 1476.564,
"heapDeltaBytes": -1542724,
"heapUsedBytes": 60321876,
"domNodes": -287,
"jsHeapTotalBytes": 5869568,
"scriptDurationMs": 516.332,
"eventListeners": -153,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3164.6220000000085,
"styleRecalcs": 65,
"styleRecalcDurationMs": 13.715000000000002,
"layouts": 60,
"layoutDurationMs": 7.164999999999999,
"taskDurationMs": 1465.539,
"heapDeltaBytes": 23341376,
"heapUsedBytes": 85530908,
"domNodes": 12,
"jsHeapTotalBytes": 8388608,
"scriptDurationMs": 515.085,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "minimap-idle",
"durationMs": 2034.955000000025,
"styleRecalcs": 9,
"styleRecalcDurationMs": 7.918999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 657.3390000000002,
"heapDeltaBytes": 6899132,
"heapUsedBytes": 68216440,
"domNodes": -284,
"jsHeapTotalBytes": 2199552,
"scriptDurationMs": 104.535,
"eventListeners": -149,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2021.5039999999362,
"styleRecalcs": 8,
"styleRecalcDurationMs": 7.93,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 689.5280000000001,
"heapDeltaBytes": 6279800,
"heapUsedBytes": 66543760,
"domNodes": -284,
"jsHeapTotalBytes": 4296704,
"scriptDurationMs": 105.42000000000002,
"eventListeners": -149,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 577.1879999999783,
"styleRecalcs": 46,
"styleRecalcDurationMs": 9.309000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 398.10999999999996,
"heapDeltaBytes": -10629084,
"heapUsedBytes": 53766680,
"domNodes": 18,
"jsHeapTotalBytes": 25952256,
"scriptDurationMs": 120.18200000000002,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 594.6240000000671,
"styleRecalcs": 47,
"styleRecalcDurationMs": 10.720999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 399.10400000000004,
"heapDeltaBytes": -10373556,
"heapUsedBytes": 54102880,
"domNodes": 20,
"jsHeapTotalBytes": 25427968,
"scriptDurationMs": 118.11099999999999,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "subgraph-idle",
"durationMs": 2003.4770000000321,
"styleRecalcs": 7,
"styleRecalcDurationMs": 6.699999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 454.237,
"heapDeltaBytes": 5663672,
"heapUsedBytes": 70147164,
"domNodes": 14,
"jsHeapTotalBytes": 24903680,
"scriptDurationMs": 14.055000000000001,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "subgraph-idle",
"durationMs": 2026.4150000000427,
"styleRecalcs": 9,
"styleRecalcDurationMs": 8.057,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 457.63899999999995,
"heapDeltaBytes": 5757396,
"heapUsedBytes": 70020740,
"domNodes": 18,
"jsHeapTotalBytes": 25165824,
"scriptDurationMs": 13.432999999999998,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66999999999998,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1709.1839999999934,
"styleRecalcs": 77,
"styleRecalcDurationMs": 33.891,
"layouts": 16,
"layoutDurationMs": 4.316,
"taskDurationMs": 782.317,
"heapDeltaBytes": -17159740,
"heapUsedBytes": 47278712,
"domNodes": -282,
"jsHeapTotalBytes": 23044096,
"scriptDurationMs": 87.20599999999999,
"eventListeners": -153,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1744.1310000000385,
"styleRecalcs": 80,
"styleRecalcDurationMs": 36.989000000000004,
"layouts": 16,
"layoutDurationMs": 3.8440000000000003,
"taskDurationMs": 787.0500000000001,
"heapDeltaBytes": -15717388,
"heapUsedBytes": 48682840,
"domNodes": -278,
"jsHeapTotalBytes": 23044096,
"scriptDurationMs": 87.488,
"eventListeners": -153,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-transition-enter",
"durationMs": 1383.704000000023,
"styleRecalcs": 17,
"styleRecalcDurationMs": 29.011000000000003,
"layouts": 13,
"layoutDurationMs": 12.275999999999998,
"taskDurationMs": 907.2369999999999,
"heapDeltaBytes": 30986580,
"heapUsedBytes": 99300212,
"domNodes": 13673,
"jsHeapTotalBytes": 14942208,
"scriptDurationMs": 31.944,
"eventListeners": 2375,
"totalBlockingTimeMs": 133,
"frameDurationMs": 16.66999999999998,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "viewport-pan-sweep",
"durationMs": 8330.50000000003,
"styleRecalcs": 250,
"styleRecalcDurationMs": 35.742,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4385.837,
"heapDeltaBytes": 11636220,
"heapUsedBytes": 71140340,
"domNodes": -282,
"jsHeapTotalBytes": 5275648,
"scriptDurationMs": 1378.291,
"eventListeners": -131,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8261.367000000064,
"styleRecalcs": 250,
"styleRecalcDurationMs": 35.153000000000006,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4395.832,
"heapDeltaBytes": 11645148,
"heapUsedBytes": 71485804,
"domNodes": -280,
"jsHeapTotalBytes": 5799936,
"scriptDurationMs": 1392.689,
"eventListeners": -133,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-idle",
"durationMs": 16700.743999999984,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 16659.778,
"heapDeltaBytes": -32053888,
"heapUsedBytes": 165757952,
"domNodes": -8312,
"jsHeapTotalBytes": -9379840,
"scriptDurationMs": 588.622,
"eventListeners": -16385,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-idle",
"durationMs": 16601.69700000006,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 16582.058,
"heapDeltaBytes": -39774724,
"heapUsedBytes": 181183224,
"domNodes": -8312,
"jsHeapTotalBytes": -7016448,
"scriptDurationMs": 567.801,
"eventListeners": -16387,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.219999999999953,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-pan",
"durationMs": 20254.291000000023,
"styleRecalcs": 137,
"styleRecalcDurationMs": 15.088999999999963,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 20201.771999999997,
"heapDeltaBytes": -44241976,
"heapUsedBytes": 180145592,
"domNodes": -8312,
"jsHeapTotalBytes": -8138752,
"scriptDurationMs": 884.768,
"eventListeners": -16381,
"totalBlockingTimeMs": 124,
"frameDurationMs": 17.780000000000047,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "vue-large-graph-pan",
"durationMs": 19827.733999999964,
"styleRecalcs": 131,
"styleRecalcDurationMs": 14.324000000000003,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 19780.178,
"heapDeltaBytes": -40944672,
"heapUsedBytes": 164579796,
"domNodes": -8312,
"jsHeapTotalBytes": -10948608,
"scriptDurationMs": 847.838,
"eventListeners": -16385,
"totalBlockingTimeMs": 59,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "workflow-execution",
"durationMs": 455.916000000002,
"styleRecalcs": 15,
"styleRecalcDurationMs": 20.138999999999996,
"layouts": 3,
"layoutDurationMs": 0.536,
"taskDurationMs": 117.137,
"heapDeltaBytes": 5064208,
"heapUsedBytes": 68568752,
"domNodes": 128,
"jsHeapTotalBytes": 4980736,
"scriptDurationMs": 11.328999999999999,
"eventListeners": 99,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "workflow-execution",
"durationMs": 461.31599999989703,
"styleRecalcs": 15,
"styleRecalcDurationMs": 20.124999999999996,
"layouts": 3,
"layoutDurationMs": 0.6230000000000001,
"taskDurationMs": 116.887,
"heapDeltaBytes": 5045788,
"heapUsedBytes": 68454032,
"domNodes": 125,
"jsHeapTotalBytes": 5767168,
"scriptDurationMs": 9.493,
"eventListeners": 97,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666682,
"p95FrameDurationMs": 16.700000000000728
}
]
} |
🌐 Website E2ETip All tests passed.
|
📝 WalkthroughWalkthroughThe locale workflow now plans updates from Git source snapshots, removes stale translations, preserves protected syntax, validates generated files, and records provenance. Tests cover planning and validation. Multiple localized node-definition files and one manager translation were refreshed. ChangesLocale update pipeline
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant Developer
participant LocaleScript
participant Git
participant LobeI18n
participant Validator
Developer->>LocaleScript: run locale script
LocaleScript->>Git: read source snapshot
LocaleScript->>LobeI18n: generate prepared locale files
LobeI18n-->>LocaleScript: return translations
LocaleScript->>Validator: validate keys and protected tokens
Validator-->>LocaleScript: return validation result
LocaleScript->>Git: write source manifest
Suggested labels: Suggested reviewers: Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 inconclusive)
✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 7
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@scripts/i18n/update-locales.test.ts`:
- Around line 24-67: Extend the test in the existing add/modify/delete flow
around diffLocaleSources, prepareLocale, and validateLocale with nested locale
objects covering added, modified, and deleted leaf paths plus unaffected sibling
fields. Assert the nested diff paths are reported correctly and that
prepareLocale removes or updates only the affected child paths, preserving
unrelated siblings; include the required empty, deletion, corruption, and
validation-failure edge cases in update-locales.test.ts.
- Around line 69-91: Extend the test coverage around validateLocale in the
existing stale/corruption test area: add a case where an added or modified
target leaf is absent and assert the “translation was not regenerated” failure,
and add an unchanged protected source entry whose target has corrupted syntax to
exercise unchanged-literal validation. Preserve the existing expectations while
covering empty, deletion, corruption, and validation-failure paths.
In `@scripts/i18n/update-locales.ts`:
- Around line 144-145: Update uniqueMatches and the validation logic using
includes around uniqueMatches so protected-token occurrence counts are preserved
rather than deduplicated. Compare token multisets between source and target,
reporting missing or added occurrences for repeated interpolation and opaque
tokens; add regression coverage for repeated tokens such as "{count} {count}".
- Around line 287-290: Update deleted-key validation in the changes.deleted loop
to use a path-presence helper implemented with Object.hasOwn(), so nested
LocaleObject paths are detected as remaining keys. Keep getLeaf() unchanged and
continue using it only for leaf-value comparisons.
- Around line 409-429: After processing the current source files, iterate over
filenames in manifest.files that are absent from files and remove the
corresponding output file for every config.outputLocales entry. Perform this
cleanup before writeManifest(), reusing outputDir and the existing path
conventions while leaving current-file preparation unchanged.
In `@src/locales/fa/nodeDefs.json`:
- Line 4248: Update the Persian tooltip value in the node definition to
explicitly state that the frame count rounds upward, matching the English
“snapped up” behavior; preserve the existing numeric ranges and explanatory
details.
In `@src/locales/tr/nodeDefs.json`:
- Line 5985: Update the Turkish description in nodeDefs.json to replace “hazır
ses referansları” with “ses referansları,” preserving the rest of the
translation unchanged.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: e3a24d8e-e3d2-4d3e-868a-27eee65d5965
📒 Files selected for processing (18)
.i18nrc.cjspackage.jsonscripts/i18n/update-locales.test.tsscripts/i18n/update-locales.tssrc/locales/.source-manifest.jsonsrc/locales/ar/nodeDefs.jsonsrc/locales/es/nodeDefs.jsonsrc/locales/fa/nodeDefs.jsonsrc/locales/fr/nodeDefs.jsonsrc/locales/he/nodeDefs.jsonsrc/locales/it/main.jsonsrc/locales/ja/nodeDefs.jsonsrc/locales/ko/nodeDefs.jsonsrc/locales/pt-BR/nodeDefs.jsonsrc/locales/ru/nodeDefs.jsonsrc/locales/tr/nodeDefs.jsonsrc/locales/zh-TW/nodeDefs.jsonsrc/locales/zh/nodeDefs.json
| it('handles add, modify, delete, protected tokens, and an idempotent rerun', () => { | ||
| const previous = { | ||
| changed: 'Old {plan}', | ||
| deleted: 'Delete me', | ||
| list: ['Old {plan}'], | ||
| stable: 'Keep me' | ||
| } | ||
| const current = { | ||
| added: 'New {from} and {to}', | ||
| changed: 'New {plan}', | ||
| list: ['New {plan}'], | ||
| protected: | ||
| "Use <Picture i>, <Video k>, and <Audio j> with 17k+5, 'match', or 'max'.", | ||
| stable: 'Keep me' | ||
| } | ||
| const changes = diffLocaleSources(previous, current) | ||
|
|
||
| expect(changes).toEqual({ | ||
| added: [['added'], ['protected']], | ||
| deleted: [['deleted']], | ||
| modified: [['changed'], ['list']] | ||
| }) | ||
|
|
||
| const locales = Array.from({ length: 12 }, (_, index) => ({ | ||
| changed: `stale ${index}`, | ||
| deleted: `old ${index}`, | ||
| list: [`stale ${index}`], | ||
| stable: `stable ${index}` | ||
| })) | ||
| const firstRun = locales.map((locale) => | ||
| translateMissing(current, prepareLocale(locale, changes)) | ||
| ) | ||
|
|
||
| for (const locale of firstRun) { | ||
| expect(validateLocale(current, locale, changes)).toEqual([]) | ||
| expect(locale).not.toHaveProperty('deleted') | ||
| } | ||
|
|
||
| const secondChanges = diffLocaleSources(current, current) | ||
| expect(secondChanges).toEqual({ added: [], deleted: [], modified: [] }) | ||
| expect( | ||
| firstRun.map((locale) => prepareLocale(locale, secondChanges)) | ||
| ).toEqual(firstRun) | ||
| }) |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Cover nested locale paths.
This fixture uses only top-level paths. A traversal defect can leave a nested deleted leaf or remove an unaffected sibling without failing this test. Add nested added, modified, and deleted paths. Assert that prepareLocale removes only the affected child paths.
As per path instructions, update-locales.test.ts must cover “all new behavior and important edge cases, including empty, deletion, corruption, and validation failures.”
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@scripts/i18n/update-locales.test.ts` around lines 24 - 67, Extend the test in
the existing add/modify/delete flow around diffLocaleSources, prepareLocale, and
validateLocale with nested locale objects covering added, modified, and deleted
leaf paths plus unaffected sibling fields. Assert the nested diff paths are
reported correctly and that prepareLocale removes or updates only the affected
child paths, preserving unrelated siblings; include the required empty,
deletion, corruption, and validation-failure edge cases in
update-locales.test.ts.
Source: Path instructions
| it('rejects stale modified strings and corrupted protected syntax', () => { | ||
| const previous = { changed: 'Old {plan}' } | ||
| const current = { | ||
| changed: 'New {plan}', | ||
| protected: 'Use <Picture i> on the 17k+5 grid' | ||
| } | ||
| const changes = diffLocaleSources(previous, current) | ||
| const corrupted = { | ||
| ...prepareLocale( | ||
| { | ||
| changed: 'Old translation', | ||
| protected: 'Use <Localized i> on the 17000+5 grid' | ||
| }, | ||
| changes | ||
| ), | ||
| changed: 'New plan', | ||
| protected: 'Use <Localized i> on the 17000+5 grid' | ||
| } | ||
|
|
||
| expect(validateLocale(current, corrupted, changes)).toEqual([ | ||
| 'protected: missing 17k+5, <Picture i>', | ||
| 'changed: missing {plan}' | ||
| ]) |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Cover the remaining validation failure paths.
This test keeps every affected path present. Add a case where an added or modified target leaf remains absent and expect translation was not regenerated. Also add an unchanged protected source string with corrupted syntax. The current protected path is added, so it does not execute the unchanged-literal validation path in validateLocale.
As per path instructions, update-locales.test.ts must cover “all new behavior and important edge cases, including empty, deletion, corruption, and validation failures.”
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@scripts/i18n/update-locales.test.ts` around lines 69 - 91, Extend the test
coverage around validateLocale in the existing stale/corruption test area: add a
case where an added or modified target leaf is absent and assert the
“translation was not regenerated” failure, and add an unchanged protected source
entry whose target has corrupted syntax to exercise unchanged-literal
validation. Preserve the existing expectations while covering empty, deletion,
corruption, and validation-failure paths.
Source: Path instructions
| function uniqueMatches(value: string, pattern: RegExp): string[] { | ||
| return [...new Set(value.match(pattern) ?? [])].sort() |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Preserve protected-token multiplicity.
Lines 144-145 remove repeated token matches. Lines 166-172 then use includes, which also ignores occurrence count. A source value of "{count} {count}" and a target value of "{count}" pass validation.
Compare token multisets so each missing or added occurrence produces an error. Add a regression test for repeated interpolation and opaque tokens.
Also applies to: 166-172
🧰 Tools
🪛 ast-grep (0.45.0)
[warning] Importing child_process exposes a command-execution surface; ensure any command/argument built from input is validated, and prefer execFile/spawn with an argument array over exec.
Context: import { execFileSync, spawnSync } from 'node:child_process'
Note: [CWE-78] Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').
(detect-child-process-typescript)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@scripts/i18n/update-locales.ts` around lines 144 - 145, Update uniqueMatches
and the validation logic using includes around uniqueMatches so protected-token
occurrence counts are preserved rather than deduplicated. Compare token
multisets between source and target, reporting missing or added occurrences for
repeated interpolation and opaque tokens; add regression coverage for repeated
tokens such as "{count} {count}".
| for (const path of changes.deleted) { | ||
| if (getLeaf(locale, path) !== undefined) { | ||
| errors.push(`${path.join('.')}: deleted source key remains`) | ||
| } |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win
Check deleted paths by presence.
getLeaf() returns undefined when the path resolves to a LocaleObject. A deleted leaf path can therefore remain as a nested object in the generated locale without an error.
Use a path-presence helper based on Object.hasOwn() for deleted-key validation. Keep getLeaf() for leaf-value comparisons.
🧰 Tools
🪛 ast-grep (0.45.0)
[warning] Importing child_process exposes a command-execution surface; ensure any command/argument built from input is validated, and prefer execFile/spawn with an argument array over exec.
Context: import { execFileSync, spawnSync } from 'node:child_process'
Note: [CWE-78] Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').
(detect-child-process-typescript)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@scripts/i18n/update-locales.ts` around lines 287 - 290, Update deleted-key
validation in the changes.deleted loop to use a path-presence helper implemented
with Object.hasOwn(), so nested LocaleObject paths are detected as remaining
keys. Keep getLeaf() unchanged and continue using it only for leaf-value
comparisons.
| const files = sourceFiles(entryDir) | ||
| const changesByFile = new Map<string, LocaleChanges>() | ||
|
|
||
| for (const filename of files) { | ||
| const current = readLocale(join(entryDir, filename)) | ||
| const hash = manifest.files[filename] | ||
| const previous = hash | ||
| ? readManifestSource(repoRoot, filename, hash) | ||
| : ({} satisfies LocaleObject) | ||
| const changes = diffLocaleSources(previous, current) | ||
| changesByFile.set(filename, changes) | ||
|
|
||
| for (const locale of config.outputLocales) { | ||
| const outputFile = join(outputDir, locale, filename) | ||
| const output = existsSync(outputFile) ? readLocale(outputFile) : {} | ||
| const prepared = prepareLocale(output, changes) | ||
| if (JSON.stringify(prepared) !== JSON.stringify(output)) { | ||
| writeLocale(outputFile, prepared) | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🌐 Web query:
Does @lobehub/i18n-cli locale delete existing output locale JSON files when the corresponding source entry JSON file is deleted?
💡 Result:
Based on the official documentation for @lobehub/i18n-cli, the tool is designed to support incremental updates by automatically extracting new content from entry files [1][2]. There is no documented feature indicating that the tool automatically deletes output locale JSON files when a corresponding source entry file is deleted [1][3]. In typical usage of @lobehub/i18n-cli, the tool focuses on translating and synchronizing content from the defined entry (source) to the output locales [4][1]. If you delete a source file, the associated output files will likely remain in your output directory as orphaned files, as the tool does not explicitly manage or prune these output files based on the deletion of source files [1][2]. You would need to manually remove these orphaned files if they are no longer required.
Citations:
- 1: https://github.com/lobehub/lobe-cli-toolbox/blob/master/packages/lobe-i18n/README.md
- 2: https://cdn.jsdelivr.net/npm/@lobehub/i18n-cli@1.27.0/README.md
- 3: https://github.com/lobehub/lobe-cli-toolbox/tree/master/packages/lobe-i18n
- 4: https://npmjs.com/package/@lobehub/i18n-cli
🏁 Script executed:
#!/bin/bash
set -e
printf '%s\n' '--- candidate files ---'
fd -i 'update-locales|package.json|pnpm-lock|yarn.lock|package-lock' . | head -200
printf '%s\n' '--- locale command references ---'
rg -n --hidden -S 'i18n-cli|lobe-i18n|locale\b|writeManifest|sourceFiles|manifest\.files' \
--glob '!node_modules/**' --glob '!dist/**' --glob '!build/**' .Repository: Comfy-Org/ComfyUI_frontend
Length of output: 50383
🏁 Script executed:
#!/bin/bash
set -e
printf '%s\n' '--- update-locales implementation ---'
sed -n '330,475p' scripts/i18n/update-locales.ts
printf '%s\n' '--- i18n configuration ---'
cat .i18nrc.cjs
printf '%s\n' '--- dependency and script declarations ---'
sed -n '35,55p;135,150p' package.json
printf '%s\n' '--- relevant lockfile entries ---'
sed -n '2570,2600p;11300,11335p' pnpm-lock.yaml
printf '%s\n' '--- locale updater tests ---'
cat scripts/i18n/update-locales.test.tsRepository: Comfy-Org/ComfyUI_frontend
Length of output: 14975
🏁 Script executed:
#!/bin/bash
set -euo pipefail
tmpdir="$(mktemp -d)"
trap 'rm -rf "$tmpdir"' EXIT
tarball="$(
curl -fsSL 'https://registry.npmjs.org/@lobehub%2fi18n-cli/1.27.0' |
jq -r '.dist.tarball'
)"
curl -fsSL "$tarball" -o "$tmpdir/package.tgz"
printf '%s\n' '--- package files related to locale processing ---'
tar -tzf "$tmpdir/package.tgz" | grep -Ei 'locale|command|config' | head -100
tar -xzf "$tmpdir/package.tgz" -C "$tmpdir"
printf '%s\n' '--- delete/remove/unlink references ---'
rg -n -i 'unlink|remove|delete|rmSync|outputLocales|entryLocale|glob' "$tmpdir/package" \
--glob '!*.map' | head -200
printf '%s\n' '--- locale command references ---'
rg -n -i 'locale' "$tmpdir/package" --glob '!*.map' | head -200Repository: Comfy-Org/ComfyUI_frontend
Length of output: 215
🏁 Script executed:
#!/bin/bash
set -u
printf '%s\n' '--- registry metadata status ---'
curl -L --max-time 20 -sS -o /tmp/i18n-cli-metadata.json \
-w 'HTTP %{http_code}\n' \
'https://registry.npmjs.org/@lobehub%2fi18n-cli/1.27.0' || true
if [ -s /tmp/i18n-cli-metadata.json ]; then
jq -r '.version, .dist.tarball, .dist.integrity' /tmp/i18n-cli-metadata.json
else
printf '%s\n' 'No registry metadata returned'
fi
printf '%s\n' '--- failed request log ---'
sed -n '1,120p' /tmp/coderabbit-shell-logs/shell-output-61zDPXRepository: Comfy-Org/ComfyUI_frontend
Length of output: 449
🏁 Script executed:
#!/bin/bash
set -euo pipefail
tmpdir="$(mktemp -d)"
trap 'rm -rf "$tmpdir"' EXIT
curl -fsSL \
'https://registry.npmjs.org/@lobehub/i18n-cli/-/i18n-cli-1.27.0.tgz' \
-o "$tmpdir/package.tgz"
printf '%s\n' '--- package files related to locale processing ---'
tar -tzf "$tmpdir/package.tgz" | grep -Ei 'locale|command|config' | head -100
tar -xzf "$tmpdir/package.tgz" -C "$tmpdir"
printf '%s\n' '--- delete/remove/unlink references ---'
rg -n -i 'unlink|remove|delete|rmSync|outputLocales|entryLocale|glob' "$tmpdir/package" \
--glob '!*.map' | head -200
printf '%s\n' '--- locale command references ---'
rg -n -i 'locale' "$tmpdir/package" --glob '!*.map' | head -200Repository: Comfy-Org/ComfyUI_frontend
Length of output: 215
🏁 Script executed:
#!/bin/bash
set -euo pipefail
api='https://api.github.com/repos/lobehub/lobe-cli-toolbox/contents/packages/lobe-i18n'
printf '%s\n' '--- package directory listing ---'
curl -fsSL "$api" | jq -r '.[] | [.type, .path, .download_url] | `@tsv`'
printf '%s\n' '--- locale implementation matches ---'
curl -fsSL 'https://api.github.com/repos/lobehub/lobe-cli-toolbox/git/trees/master?recursive=1' |
jq -r '.tree[].path' |
grep -Ei 'packages/lobe-i18n/.+(locale|command|config)' |
head -100Repository: Comfy-Org/ComfyUI_frontend
Length of output: 249
🏁 Script executed:
#!/bin/bash
set -euo pipefail
tmpdir="$(mktemp -d)"
trap 'rm -rf "$tmpdir"' EXIT
printf '%s\n' '--- CDN package file listing ---'
curl -fsSL \
'https://data.jsdelivr.com/v1/package/npm/@lobehub/i18n-cli@1.27.0' |
jq -r '.files[].name' | head -200
printf '%s\n' '--- CDN source matches ---'
curl -fsSL \
'https://data.jsdelivr.com/v1/package/npm/@lobehub/i18n-cli@1.27.0' |
jq -r '.files[].name' |
grep -Ei 'locale|command|config|index' |
while IFS= read -r path; do
url="https://cdn.jsdelivr.net/npm/@lobehub/i18n-cli@1.27.0/$path"
body="$tmpdir/$(printf '%s' "$path" | tr '/' '_')"
curl -fsSL "$url" -o "$body" || continue
if grep -Eqi 'unlink|remove|delete|rmSync|outputLocales|entryLocale|glob' "$body"; then
printf '%s\n' "--- $path ---"
grep -Ein 'unlink|remove|delete|rmSync|outputLocales|entryLocale|glob' "$body" | head -80
fi
doneRepository: Comfy-Org/ComfyUI_frontend
Length of output: 268
🏁 Script executed:
#!/bin/bash
set -euo pipefail
curl -fsSL \
'https://data.jsdelivr.com/v1/package/npm/@lobehub/i18n-cli@1.27.0' |
jq -r '
.. | objects
| select(has("name"))
| .name
' | grep -Ei 'dist|locale|command|config|index|\.js$' | head -300Repository: Comfy-Org/ComfyUI_frontend
Length of output: 220
🏁 Script executed:
#!/bin/bash
set -euo pipefail
tmpdir="$(mktemp -d)"
trap 'rm -rf "$tmpdir"' EXIT
for file in dist/cli.js dist/index.cjs dist/index.mjs; do
curl -fsSL "https://cdn.jsdelivr.net/npm/@lobehub/i18n-cli@1.27.0/$file" \
-o "$tmpdir/$(basename "$file")"
done
printf '%s\n' '--- package source sizes ---'
wc -c "$tmpdir"/*
printf '%s\n' '--- deletion and file-discovery logic ---'
rg -n -i 'unlink|remove|delete|rmSync|readdir|glob|entryLocale|outputLocales|entry|output' \
"$tmpdir" | head -300Repository: Comfy-Org/ComfyUI_frontend
Length of output: 50383
🏁 Script executed:
#!/bin/bash
set -euo pipefail
tmp="$(mktemp)"
trap 'rm -f "$tmp"' EXIT
curl -fsSL \
'https://cdn.jsdelivr.net/npm/@lobehub/i18n-cli@1.27.0/dist/cli.js' \
-o "$tmp"
python3 - "$tmp" <<'PY'
import sys
text = open(sys.argv[1], encoding='utf-8').read()
terms = [
'globSync',
'outputLocales',
'entryLocale',
'unlink',
'rmSync',
'existsSync',
'writeFileSync',
'locale'
]
for term in terms:
print(f'--- {term} ---')
start = 0
count = 0
while True:
pos = text.find(term, start)
if pos < 0 or count >= 12:
break
print(text[max(0, pos - 350):pos + len(term) + 500])
print()
start = pos + len(term)
count += 1
PYRepository: Comfy-Org/ComfyUI_frontend
Length of output: 26206
Remove outputs for deleted source files. lobe-i18n locale does not delete obsolete output files. If a filename exists in manifest.files but not in files, delete its output for each locale before writeManifest().
🧰 Tools
🪛 ast-grep (0.45.0)
[warning] Importing child_process exposes a command-execution surface; ensure any command/argument built from input is validated, and prefer execFile/spawn with an argument array over exec.
Context: import { execFileSync, spawnSync } from 'node:child_process'
Note: [CWE-78] Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').
(detect-child-process-typescript)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@scripts/i18n/update-locales.ts` around lines 409 - 429, After processing the
current source files, iterate over filenames in manifest.files that are absent
from files and remove the corresponding output file for every
config.outputLocales entry. Perform this cleanup before writeManifest(), reusing
outputDir and the existing path conventions while leaving current-file
preparation unchanged.
| "length": { | ||
| "name": "طول", | ||
| "tooltip": "تعداد فریم در ۲۴ فریم بر ثانیه، به شبکه ۱۷۰۰۰+۵ مدل گرد میشود (۱۲۴ = تقریباً ۵ ثانیه؛ بازه آموزش تقریباً ۱۲۴ تا ۳۶۲، مقادیر بالاتر تست نشده است)" | ||
| "tooltip": "تعداد فریم در ۲۴ فریم بر ثانیه، به شبکه 17k+5 مدل گرد میشود (۱۲۴ = تقریباً ۵ ثانیه؛ بازه آموزش تقریباً ۱۲۴ تا ۳۶۲، مقادیر بالاتر تست نشده است)" |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -e
printf '%s\n' '--- target lines ---'
sed -n '4238,4255p;11548,11565p' src/locales/fa/nodeDefs.json
printf '%s\n' '--- matching Persian and English strings ---'
rg -n -C 3 '17k\+5|snap|rounded|round|فریم|گرد' src/locales/fa/nodeDefs.json src/locales/en/nodeDefs.json
printf '%s\n' '--- JSON validity and exact values ---'
python3 - <<'PY'
import json
from pathlib import Path
for name in ('src/locales/fa/nodeDefs.json', 'src/locales/en/nodeDefs.json'):
data = json.loads(Path(name).read_text())
print(name, 'valid JSON')
for i, line in enumerate(Path(name).read_text().splitlines(), 1):
if i in (4248, 11557):
print(i, line)
PYRepository: Comfy-Org/ComfyUI_frontend
Length of output: 50383
State that the frame count rounds upward.
The English tooltip says “snapped up,” but both Persian tooltips only say “rounded.” Use wording that explicitly means rounding upward.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/locales/fa/nodeDefs.json` at line 4248, Update the Persian tooltip value
in the node definition to explicitly state that the frame count rounds upward,
matching the English “snapped up” behavior; preserve the existing numeric ranges
and explanatory details.
| }, | ||
| "GrokVideoReferenceNode": { | ||
| "description": "Stil ve içerik referansı olarak referans görsellerle yönlendirilen video oluşturun.", | ||
| "description": "Referans görsellerle yönlendirilen ve isteğe bağlı hazır ses referansları içeren video oluşturun.", |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Remove the extra “ready” meaning from this translation.
hazır ses referansları means “ready/prepared voice references.” The source behavior describes optional voice references, not ready-made references. Use ses referansları instead.
Proposed fix
- "description": "Referans görsellerle yönlendirilen ve isteğe bağlı hazır ses referansları içeren video oluşturun.",
+ "description": "Referans görsellerle yönlendirilen ve isteğe bağlı ses referansları içeren video oluşturun.",📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| "description": "Referans görsellerle yönlendirilen ve isteğe bağlı hazır ses referansları içeren video oluşturun.", | |
| "description": "Referans görsellerle yönlendirilen ve isteğe bağlı ses referansları içeren video oluşturun.", |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/locales/tr/nodeDefs.json` at line 5985, Update the Turkish description in
nodeDefs.json to replace “hazır ses referansları” with “ses referansları,”
preserving the rest of the translation unchanged.
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #15024 +/- ##
==========================================
- Coverage 81.05% 81.04% -0.02%
==========================================
Files 1872 1872
Lines 123289 123311 +22
Branches 38438 37991 -447
==========================================
+ Hits 99931 99935 +4
- Misses 22807 22811 +4
- Partials 551 565 +14
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
Superceded by #15062 |
…mfy-Org#15062) ## Summary Replace the `@lobehub/i18n-cli` translation step with an in-house pipeline (`scripts/i18n/`) so changed English source strings are retranslated, removed keys are pruned, and protected syntax survives translation byte-for-byte. The user-facing and correctness repairs were split into Comfy-Org#15137 (merged). This PR is strictly the framework migration. ## Changes - `pnpm locale` now runs `scripts/i18n/update-locales.ts`. It records the English sources of the last successful run as git blob hashes in `src/locales/.source-manifest.json`, diffs them against the current `src/locales/en/*.json` to invalidate changed and deleted keys, and rebuilds every output locale from the English structure. - Validates interpolation placeholders and protected literals (`<Picture N>`, `17k+5`, quoted `match` and `max`), retries corrupted translations, and aborts without writing if corruption persists. - `pnpm locale:check` reports pending work offline. - Normalizes English entry files to the committed serialization before hashing so manifest hashes match workflow commits regardless of `collect-i18n` and formatting order. - Removes `@lobehub/i18n-cli` and `.i18nrc.cjs`; configuration now lives in `scripts/i18n/config.ts`. - Translation requests go through the official `openai` SDK (the one new dependency, dev-only with no transitive dependencies), which owns transport retries, timeouts, and typed completion parsing; the pipeline keeps only domain-level retries for truncated or malformed completions. - Uses a blobless full-history checkout in the i18n workflows so recorded English source blobs can be fetched on demand. ## Review Focus Manifest advancement only after full validation; rebuild-from-source semantics; translation retry and validation behavior; and source-provenance handling. Depends on Comfy-Org#15137 (merged). Supersedes Comfy-Org#15024. [FE-1499](https://linear.app/comfyorg/issue/FE-1499/fix-i18n-release-workflow-changed-source-strings-stay-stale-and)
Summary
Fix release locale generation so changes to existing English strings are retranslated and deleted keys are pruned.
Changes
lobe-i18n, validate regenerated placeholders and opaque MiniMax syntax before advancing provenance, and repair the known stale/corrupted outputs.pnpm localerun.Review Focus
Source-provenance advancement and failure behavior around partial translations and deletions.
FE-1499