mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-10 01:50:08 +00:00
fix: add post-processing script to fix i18n nodeDefs array corruption (#8718)
## Summary
@lobehub/i18n-cli (GPT-4.1) converts numeric-keyed objects like {"0":
{...}, "1": {...}} into JSON arrays with null gaps, which
crashes vue-i18n path resolution.
Add a post-processing step that converts arrays back to objects after
translation.
## Screenshots (if applicable)
before
https://github.com/user-attachments/assets/44e81790-feae-405b-b2c4-098b06a98785
after
https://github.com/user-attachments/assets/5d1bd836-c923-437a-aca0-7ebd4d8acb89
<img width="2703" height="1083" alt="image"
src="https://github.com/user-attachments/assets/370a2eb0-c46d-4901-a23a-ab3002a9660d"
/>
┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-8718-fix-add-post-processing-script-to-fix-i18n-nodeDefs-array-corruption-3006d73d365081dab020fea997ec4c0a)
by [Unito](https://www.unito.io)
This commit is contained in:
2
.github/workflows/i18n-update-core.yaml
vendored
2
.github/workflows/i18n-update-core.yaml
vendored
@@ -43,7 +43,7 @@ jobs:
|
||||
env:
|
||||
PLAYWRIGHT_TEST_URL: http://localhost:5173
|
||||
- name: Update translations
|
||||
run: pnpm locale && pnpm format
|
||||
run: pnpm locale && pnpm fix-i18n-node-defs && pnpm format
|
||||
env:
|
||||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
||||
- name: Commit updated locales
|
||||
|
||||
@@ -67,7 +67,7 @@ jobs:
|
||||
env:
|
||||
PLAYWRIGHT_TEST_URL: http://localhost:5173
|
||||
- name: Update translations
|
||||
run: pnpm locale
|
||||
run: pnpm locale && pnpm fix-i18n-node-defs
|
||||
env:
|
||||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
||||
- name: Diff base vs updated i18n
|
||||
|
||||
2
.github/workflows/i18n-update-nodes.yaml
vendored
2
.github/workflows/i18n-update-nodes.yaml
vendored
@@ -36,7 +36,7 @@ jobs:
|
||||
env:
|
||||
PLAYWRIGHT_TEST_URL: http://localhost:5173
|
||||
- name: Update translations
|
||||
run: pnpm locale
|
||||
run: pnpm locale && pnpm fix-i18n-node-defs
|
||||
env:
|
||||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
||||
- name: Create Pull Request
|
||||
|
||||
Reference in New Issue
Block a user