mirror of
https://github.com/Comfy-Org/embedded-docs.git
synced 2026-11-05 00:17:31 +00:00
[PR #205] [MERGED] docs-generation: use the frontend's localized node name for sidebarTitle #203
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Comfy-Org/embedded-docs#203
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Comfy-Org/embedded-docs/pull/205
Author: @lin-bot23
Created: 10/25/2026
Status: ✅ Merged
Merged: 10/25/2026
Merged by: @comfyui-wiki
Base:
main← Head:docs/localized-node-titles📝 Commits (1)
fc575a8docs-generation: use the frontend's localized node name for sidebarTitle📊 Changes
1 file changed (+58 additions, -4 deletions)
View changed files
📝
docs-generation/scripts/sync_to_comfy_docs.py(+58 -4)📄 Description
Every localized node page currently shows an English name in the sidebar, because
build_frontmatter()writes the API node type intosidebarTitle(and into thetitleprefix) for every locale:The frontend already ships a translated
display_namefor these nodes (ComfyUI_frontend/src/locales/<lang>/nodeDefs.json), andsync_frontend_translations.pyalready reads it for parameter/output translations. This PR uses the same source for the page label.Changes
localized_node_label(node_type, lang_code)returns the frontenddisplay_name, falling back to the English node type._frontend_display_names()caches per locale, prefersFRONTEND_LOCALES_PATH(a localComfyUI_frontend/src/localescheckout, same convention as the docs glossary sync) and otherwise fetchesComfyUI_frontend/main/src/locales/<lang>/nodeDefs.json. A locale withoutnodeDefs.json, a network error or an unparsable file only prints a warning and keeps the English name, so a sync run never fails on this.build_frontmatter(node_name, description, label)puts the localized label insidebarTitleand in thetitleprefix; the- ComfyUI Built-in Node Documentationsuffix stays English, as it is today for every locale.Effect (generated against a docs checkout,
--node CheckpointLoaderSimple)pytest docs-generation/tests: 110 passed, 1 failed (test_translation_fixes.py::DryRunTests::test_persian_outputs_section_detected), and that failure reproduces onorigin/main.en/zh/ja/kowould change on their next full sync, which is a separate pull request because it rewrites ~3200 existing pages.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.