From 425232e75602b18211d48067d1d7e5ee401bcdeb Mon Sep 17 00:00:00 2001 From: Glary-Bot Date: Sat, 3 Oct 2026 22:20:05 +0000 Subject: [PATCH 1/3] feat(i18n): enable @intlify/vue-i18n/no-missing-keys A key referenced by code but absent from the locale catalog surfaced only as vue-i18n echoing the raw key path in the UI (FE-3166). src/i18n.catalog.test.ts covers the four keys that caused it; this generalises the check to static `t()` call sites in src, apps/billing-web and apps/website. Each of those trees is checked against its own catalog, pinned to its English source so a key present only in a translated locale cannot pass while rendering raw under the English fallback. One entry per tree, over the extensions the blocks above already parse, so none of them needs to restate a parser. localeDir resolves from this file's directory, since it is otherwise relative to ESLint's cwd and a workspace-local lint run would match no catalog and report nothing. src/i18n.ts nests the collect-i18n outputs under commands, settings and nodeDefs, which the plugin cannot express, so a module re-exports them in that shape. main.json stays a plain JSON entry beside it rather than being folded in, so editing it still refreshes a running ESLint server; only regeneration needs a restart. That leaves the two catalogs unioned where the runtime overwrites, so the dead commands block main.json carried is removed -- buildLocale replaced that namespace wholesale and nothing referenced it -- and a test now pins main.json to never reintroduce any of the three generated namespaces. Two limits are recorded in the config rather than papered over: the rule checks that a path exists, not that it reaches a string, and ESLint's --cache never sees catalog content, so a key removed without touching its call sites can survive a cache hit. Also pins the active locale in the paste-label assertion, which resolves through `t()`, and prunes the same dead commands block from the fourteen translated catalogs. Co-authored-by: Alexander Brown --- eslint.config.ts | 62 +++++++++++++++++++++-- scripts/i18n/eslint-generated-messages.js | 13 +++++ src/composables/useCoreCommands.test.ts | 10 ++-- src/i18n.catalog.test.ts | 15 ++++++ src/locales/ar/main.json | 19 ------- src/locales/de/main.json | 19 ------- src/locales/en/main.json | 19 ------- src/locales/es/main.json | 19 ------- src/locales/fa/main.json | 19 ------- src/locales/fr/main.json | 19 ------- src/locales/he/main.json | 19 ------- src/locales/it/main.json | 19 ------- src/locales/ja/main.json | 19 ------- src/locales/ko/main.json | 19 ------- src/locales/pt-BR/main.json | 19 ------- src/locales/ru/main.json | 19 ------- src/locales/tr/main.json | 19 ------- src/locales/zh-TW/main.json | 19 ------- src/locales/zh/main.json | 19 ------- 19 files changed, 94 insertions(+), 291 deletions(-) create mode 100644 scripts/i18n/eslint-generated-messages.js diff --git a/eslint.config.ts b/eslint.config.ts index d260ca65050..1ac53df33d9 100644 --- a/eslint.config.ts +++ b/eslint.config.ts @@ -135,14 +135,53 @@ const settings = { }) ], 'vue-i18n': { + // The rule checks that a path exists, not that it reaches a string, so + // t('g') is accepted. packages/** is left out because a shared package is + // consumed against all three catalogs, so there is no single one to pin. + // + // ESLint's --cache keys on file content and config, never on catalog + // content, so removing a key without touching its call sites can survive a + // cache hit. localeDir: [ + { pattern: './src/locales/en/main.json', localeKey: 'path' }, { - pattern: './src/locales/**/*.json', + pattern: './scripts/i18n/eslint-generated-messages.js', + localeKey: 'key' + } + ], + // localeDir is relative to ESLint's cwd, so a workspace-local lint run + // would resolve it to nothing and silently report no missing keys. + cwd: import.meta.dirname, + messageSyntaxVersion: '^9.0.0' + } +} as const + +const billingWebI18nSettings = { + 'vue-i18n': { + localeDir: [ + { + pattern: './apps/billing-web/src/locales/en/main.json', localeKey: 'path', localePattern: - /^\.?\/?src\/locales\/(?[A-Za-z0-9-]+)\/.+\.json$/ + /^\.?\/?apps\/billing-web\/src\/locales\/(?[A-Za-z0-9-]+)\/.+\.json$/ } ], + cwd: import.meta.dirname, + messageSyntaxVersion: '^9.0.0' + } +} as const + +const websiteI18nSettings = { + 'vue-i18n': { + localeDir: [ + { + pattern: './apps/website/src/locales/en/main.json', + localeKey: 'path', + localePattern: + /^\.?\/?apps\/website\/src\/locales\/(?[A-Za-z0-9-]+)\/.+\.json$/ + } + ], + cwd: import.meta.dirname, messageSyntaxVersion: '^9.0.0' } } as const @@ -430,5 +469,22 @@ export default defineConfig([ } } ] - } + }, + // Every tree checked against its own catalog. These entries add only the + // catalog and the rule, so the extensions must be ones the blocks above + // already parse: tailwindScriptFiles for .ts, templateFiles for .vue and + // .astro. Adding .mts here would lint it with espree and fail on syntax. + ...( + [ + ['src', settings], + ['apps/billing-web', billingWebI18nSettings], + ['apps/website', websiteI18nSettings] + ] as const + ).map(([root, treeSettings]) => ({ + files: [`${root}/**/*.{ts,vue,astro}`], + ignores: tailwindScriptIgnores, + settings: treeSettings, + plugins: { '@intlify/vue-i18n': i18nPlugin }, + rules: { '@intlify/vue-i18n/no-missing-keys': 'error' as const } + })) ]) diff --git a/scripts/i18n/eslint-generated-messages.js b/scripts/i18n/eslint-generated-messages.js new file mode 100644 index 00000000000..9213590732d --- /dev/null +++ b/scripts/i18n/eslint-generated-messages.js @@ -0,0 +1,13 @@ +// The generated half of the lint catalog for no-missing-keys, shaped the way +// buildLocale() in src/i18n.ts nests it. main.json stays a plain JSON entry in +// localeDir so editing it refreshes live; the plugin caches this module by its +// own mtime, which never changes when the JSON it imports does, so regenerating +// with `pnpm collect-i18n` needs an ESLint server restart to take effect. +// +// Must stay .js: the plugin's localeDir loader only handles .js, .json and +// .yaml, and renaming this crashes ESLint instead of erroring. +import commands from '../../src/locales/en/commands.json' with { type: 'json' } +import nodeDefs from '../../src/locales/en/nodeDefs.json' with { type: 'json' } +import settings from '../../src/locales/en/settings.json' with { type: 'json' } + +export const en = { commands, nodeDefs, settings } diff --git a/src/composables/useCoreCommands.test.ts b/src/composables/useCoreCommands.test.ts index 716f6bc597b..6dfcc2b8ec4 100644 --- a/src/composables/useCoreCommands.test.ts +++ b/src/composables/useCoreCommands.test.ts @@ -311,11 +311,14 @@ describe('useCoreCommands', () => { Record > const original = messages[menuLabels][key] - i18n.global.mergeLocaleMessage('en', { - [menuLabels]: { [key]: 'Sentinel paste label' } - }) + const previousLocale = i18n.global.locale.value try { + i18n.global.locale.value = 'en' + i18n.global.mergeLocaleMessage('en', { + [menuLabels]: { [key]: 'Sentinel paste label' } + }) + const command = useCoreCommands().find( (cmd) => cmd.id === 'Comfy.Canvas.PasteFromClipboardWithConnect' )! @@ -328,6 +331,7 @@ describe('useCoreCommands', () => { i18n.global.mergeLocaleMessage('en', { [menuLabels]: { [key]: original } }) + i18n.global.locale.value = previousLocale } }) }) diff --git a/src/i18n.catalog.test.ts b/src/i18n.catalog.test.ts index 34791a2b9ea..5c1a83d596d 100644 --- a/src/i18n.catalog.test.ts +++ b/src/i18n.catalog.test.ts @@ -1,5 +1,7 @@ import { beforeEach, describe, expect, it } from 'vitest' +import mainMessages from './locales/en/main.json' with { type: 'json' } + import { i18n, t, te } from './i18n' // Deliberately unmocked, unlike i18n.test.ts: these assertions are only @@ -26,3 +28,16 @@ describe('locale keys referenced from source', () => { ).toContain('sd_xl_base.safetensors') }) }) + +// buildLocale overwrites these namespaces with the generated catalogs, while +// eslint.config.ts reads main.json and those catalogs as separate localeDir +// entries and unions them. A key here would therefore pass lint and resolve to +// nothing at runtime. +describe('main.json', () => { + it.for([['commands'], ['nodeDefs'], ['settings']])( + 'leaves %s to the generated catalog', + ([namespace]) => { + expect(mainMessages).not.toHaveProperty(namespace) + } + ) +}) diff --git a/src/locales/ar/main.json b/src/locales/ar/main.json index fad258d94e7..8a2a60fb432 100644 --- a/src/locales/ar/main.json +++ b/src/locales/ar/main.json @@ -963,25 +963,6 @@ "workflowName": "اسم سير العمل", "workflowNamePlaceholder": "نصيحة: أدخل اسمًا وصفيًا يسهل البحث عنه" }, - "commands": { - "clear": "مسح سير العمل", - "clipspace": "فتح مساحة القص", - "dark": "داكن", - "execute": "تنفيذ", - "help": "مساعدة", - "interrupt": "إلغاء التشغيل الحالي", - "light": "فاتح", - "manageExtensions": "إدارة الإضافات", - "queue": "لوحة قائمة الانتظار", - "refresh": "تحديث تعريفات العقد", - "resetView": "إعادة تعيين عرض اللوحة", - "run": "تشغيل", - "runWorkflow": "تشغيل سير العمل", - "runWorkflowFront": "تشغيل سير العمل (إضافة في المقدمة)", - "settings": "الإعدادات", - "theme": "المظهر", - "toggleBottomPanel": "تبديل اللوحة السفلية" - }, "compositor": { "downloadPsd": "تحميل PSD", "empty": "شغّل سير العمل لإنشاء تركيب", diff --git a/src/locales/de/main.json b/src/locales/de/main.json index 0c45285db99..9aaf953cce6 100644 --- a/src/locales/de/main.json +++ b/src/locales/de/main.json @@ -963,25 +963,6 @@ "workflowName": "Titel", "workflowNamePlaceholder": "Tipp: Geben Sie einen aussagekräftigen, leicht auffindbaren Namen ein" }, - "commands": { - "clear": "Workflow leeren", - "clipspace": "Clipspace öffnen", - "dark": "Dunkel", - "execute": "Ausführen", - "help": "Hilfe", - "interrupt": "Aktuelle Ausführung abbrechen", - "light": "Hell", - "manageExtensions": "Erweiterungen", - "queue": "Warteschlangenbereich", - "refresh": "Node-Definitionen aktualisieren", - "resetView": "Canvas-Ansicht zurücksetzen", - "run": "Ausführen", - "runWorkflow": "Workflow ausführen", - "runWorkflowFront": "Workflow ausführen (Vorne einreihen)", - "settings": "Einstellungen", - "theme": "Design", - "toggleBottomPanel": "Unteres Bedienfeld ein-/ausblenden" - }, "compositor": { "downloadPsd": "PSD herunterladen", "empty": "Führen Sie den Workflow aus, um eine Komposition zu erstellen", diff --git a/src/locales/en/main.json b/src/locales/en/main.json index eb5abffd906..607b7d74886 100644 --- a/src/locales/en/main.json +++ b/src/locales/en/main.json @@ -1445,25 +1445,6 @@ "white": "White", "negative": "Negative" }, - "commands": { - "runWorkflow": "Run workflow", - "runWorkflowFront": "Run workflow (Queue at front)", - "run": "Run", - "execute": "Execute", - "interrupt": "Cancel current run", - "refresh": "Refresh node definitions", - "clipspace": "Open Clipspace", - "resetView": "Reset canvas view", - "clear": "Clear workflow", - "toggleBottomPanel": "Toggle Bottom Panel", - "theme": "Theme", - "dark": "Dark", - "light": "Light", - "manageExtensions": "Extensions", - "settings": "Settings", - "help": "Help", - "queue": "Queue Panel" - }, "queue": { "initializingAlmostReady": "Initializing - Almost ready", "inQueue": "In queue...", diff --git a/src/locales/es/main.json b/src/locales/es/main.json index f0f29c5da1a..55ecb809dd1 100644 --- a/src/locales/es/main.json +++ b/src/locales/es/main.json @@ -963,25 +963,6 @@ "workflowName": "Nombre del flujo de trabajo", "workflowNamePlaceholder": "Consejo: ingresa un nombre descriptivo y fácil de buscar" }, - "commands": { - "clear": "Limpiar flujo de trabajo", - "clipspace": "Abrir Clipspace", - "dark": "Oscuro", - "execute": "Ejecutar", - "help": "Ayuda", - "interrupt": "Cancelar ejecución actual", - "light": "Claro", - "manageExtensions": "Gestionar extensiones", - "queue": "Panel de cola", - "refresh": "Actualizar definiciones de nodos", - "resetView": "Restablecer vista del lienzo", - "run": "Ejecutar", - "runWorkflow": "Ejecutar flujo de trabajo", - "runWorkflowFront": "Ejecutar flujo de trabajo (Encolar al principio)", - "settings": "Configuración", - "theme": "Tema", - "toggleBottomPanel": "Alternar panel inferior" - }, "compositor": { "downloadPsd": "Descargar PSD", "empty": "Ejecuta el flujo de trabajo para generar un compuesto", diff --git a/src/locales/fa/main.json b/src/locales/fa/main.json index 20184efc8de..60dd23abcde 100644 --- a/src/locales/fa/main.json +++ b/src/locales/fa/main.json @@ -963,25 +963,6 @@ "workflowName": "نام جریان‌کار", "workflowNamePlaceholder": "نکته: یک نام توصیفی وارد کنید که به راحتی قابل جستجو باشد" }, - "commands": { - "clear": "پاک‌سازی workflow", - "clipspace": "باز کردن Clipspace", - "dark": "تاریک", - "execute": "اجرا", - "help": "راهنما", - "interrupt": "لغو اجرای فعلی", - "light": "روشن", - "manageExtensions": "مدیریت افزونه‌ها", - "queue": "پنل صف", - "refresh": "به‌روزرسانی تعاریف node", - "resetView": "بازنشانی نمای canvas", - "run": "اجرا", - "runWorkflow": "اجرای workflow", - "runWorkflowFront": "اجرای workflow (صف در ابتدا)", - "settings": "تنظیمات", - "theme": "پوسته", - "toggleBottomPanel": "نمایش/مخفی‌سازی پنل پایین" - }, "compositor": { "downloadPsd": "دانلود PSD", "empty": "برای ایجاد ترکیب، ورک‌فلو را اجرا کنید", diff --git a/src/locales/fr/main.json b/src/locales/fr/main.json index 8fd396755dc..cecb2f729cd 100644 --- a/src/locales/fr/main.json +++ b/src/locales/fr/main.json @@ -963,25 +963,6 @@ "workflowName": "Nom du workflow", "workflowNamePlaceholder": "Astuce : saisissez un nom descriptif facile à rechercher" }, - "commands": { - "clear": "Effacer le workflow", - "clipspace": "Ouvrir Clipspace", - "dark": "Sombre", - "execute": "Exécuter", - "help": "Aide", - "interrupt": "Annuler l'exécution en cours", - "light": "Clair", - "manageExtensions": "Gérer les extensions", - "queue": "Panneau de file d'attente", - "refresh": "Actualiser les définitions de nœud", - "resetView": "Réinitialiser la vue du canevas", - "run": "Exécuter", - "runWorkflow": "Exécuter le workflow", - "runWorkflowFront": "Exécuter le workflow (Mettre en file d'attente en premier)", - "settings": "Paramètres", - "theme": "Thème", - "toggleBottomPanel": "Basculer le panneau inférieur" - }, "compositor": { "downloadPsd": "Télécharger le PSD", "empty": "Exécutez le workflow pour générer un composite", diff --git a/src/locales/he/main.json b/src/locales/he/main.json index 641848556e4..ffe432f009b 100644 --- a/src/locales/he/main.json +++ b/src/locales/he/main.json @@ -963,25 +963,6 @@ "workflowName": "שם תהליך העבודה", "workflowNamePlaceholder": "טיפ: הזן שם תיאורי שקל לחפש" }, - "commands": { - "clear": "ניקוי תהליך העבודה", - "clipspace": "פתיחת Clipspace", - "dark": "כהה", - "execute": "ביצוע", - "help": "עזרה", - "interrupt": "ביטול ההרצה הנוכחית", - "light": "בהיר", - "manageExtensions": "הרחבות", - "queue": "פאנל התור", - "refresh": "רענון הגדרות הצמתים", - "resetView": "איפוס תצוגת הקנבס", - "run": "הרצה", - "runWorkflow": "הרצת תהליך העבודה", - "runWorkflowFront": "הרצת תהליך העבודה (הוספה לראש התור)", - "settings": "הגדרות", - "theme": "ערכת נושא", - "toggleBottomPanel": "הצגה/הסתרה של הפאנל התחתון" - }, "compositor": { "downloadPsd": "הורד PSD", "empty": "הרץ את תהליך העבודה כדי ליצור קומפוזיט", diff --git a/src/locales/it/main.json b/src/locales/it/main.json index 2f54baa1b17..76fb7c3fe07 100644 --- a/src/locales/it/main.json +++ b/src/locales/it/main.json @@ -963,25 +963,6 @@ "workflowName": "Titolo", "workflowNamePlaceholder": "Suggerimento: inserisci un nome descrittivo facile da cercare" }, - "commands": { - "clear": "Cancella workflow", - "clipspace": "Apri Clipspace", - "dark": "Scuro", - "execute": "Esegui", - "help": "Aiuto", - "interrupt": "Annulla esecuzione corrente", - "light": "Chiaro", - "manageExtensions": "Estensioni", - "queue": "Pannello Coda", - "refresh": "Aggiorna definizioni nodo", - "resetView": "Reimposta vista canvas", - "run": "Esegui", - "runWorkflow": "Esegui workflow", - "runWorkflowFront": "Esegui workflow (Metti in cima alla coda)", - "settings": "Impostazioni", - "theme": "Tema", - "toggleBottomPanel": "Mostra/Nascondi Pannello Inferiore" - }, "compositor": { "downloadPsd": "Scarica PSD", "empty": "Esegui il workflow per generare una composizione", diff --git a/src/locales/ja/main.json b/src/locales/ja/main.json index 24884558299..507b9096a02 100644 --- a/src/locales/ja/main.json +++ b/src/locales/ja/main.json @@ -963,25 +963,6 @@ "workflowName": "ワークフロー名", "workflowNamePlaceholder": "ヒント:検索しやすい説明的な名前を入力してください" }, - "commands": { - "clear": "ワークフローをクリア", - "clipspace": "Clipspaceを開く", - "dark": "ダーク", - "execute": "実行", - "help": "ヘルプ", - "interrupt": "現在の実行をキャンセル", - "light": "ライト", - "manageExtensions": "拡張機能を管理", - "queue": "キューパネル", - "refresh": "ノード定義を更新", - "resetView": "キャンバスビューをリセット", - "run": "実行", - "runWorkflow": "ワークフローを実行", - "runWorkflowFront": "ワークフローを実行(先頭に追加)", - "settings": "設定", - "theme": "テーマ", - "toggleBottomPanel": "下部パネルの切り替え" - }, "compositor": { "downloadPsd": "PSDをダウンロード", "empty": "ワークフローを実行して合成画像を生成してください", diff --git a/src/locales/ko/main.json b/src/locales/ko/main.json index f8ca1a45ac3..9c21b9ba778 100644 --- a/src/locales/ko/main.json +++ b/src/locales/ko/main.json @@ -963,25 +963,6 @@ "workflowName": "워크플로우 이름", "workflowNamePlaceholder": "팁: 검색하기 쉬운 설명적인 이름을 입력하세요" }, - "commands": { - "clear": "워크플로 지우기", - "clipspace": "클립스페이스 열기", - "dark": "어두운", - "execute": "실행", - "help": "도움말", - "interrupt": "현재 실행 취소", - "light": "밝은", - "manageExtensions": "확장 관리", - "queue": "큐 패널", - "refresh": "노드 정의 새로고침", - "resetView": "캔버스 보기 재설정", - "run": "실행", - "runWorkflow": "워크플로 실행", - "runWorkflowFront": "워크플로 실행 (맨 앞에 대기열 추가)", - "settings": "설정", - "theme": "테마", - "toggleBottomPanel": "하단 패널 전환" - }, "compositor": { "downloadPsd": "PSD 다운로드", "empty": "워크플로우를 실행하여 합성 이미지를 생성하세요", diff --git a/src/locales/pt-BR/main.json b/src/locales/pt-BR/main.json index ada1fc2279a..3ff3cb02f27 100644 --- a/src/locales/pt-BR/main.json +++ b/src/locales/pt-BR/main.json @@ -963,25 +963,6 @@ "workflowName": "Nome do fluxo de trabalho", "workflowNamePlaceholder": "Dica: insira um nome descritivo e fácil de pesquisar" }, - "commands": { - "clear": "Limpar fluxo de trabalho", - "clipspace": "Abrir Clipspace", - "dark": "Escuro", - "execute": "Executar", - "help": "Ajuda", - "interrupt": "Cancelar execução atual", - "light": "Claro", - "manageExtensions": "Gerenciar extensões", - "queue": "Painel de fila", - "refresh": "Atualizar definições de nó", - "resetView": "Redefinir visualização da tela", - "run": "Executar", - "runWorkflow": "Executar fluxo de trabalho", - "runWorkflowFront": "Executar fluxo de trabalho (Fila na frente)", - "settings": "Configurações", - "theme": "Tema", - "toggleBottomPanel": "Alternar painel inferior" - }, "compositor": { "downloadPsd": "Baixar PSD", "empty": "Execute o fluxo de trabalho para gerar uma composição", diff --git a/src/locales/ru/main.json b/src/locales/ru/main.json index b34b8b164c7..aae59ea3e42 100644 --- a/src/locales/ru/main.json +++ b/src/locales/ru/main.json @@ -963,25 +963,6 @@ "workflowName": "Название workflow", "workflowNamePlaceholder": "Совет: введите описательное название, которое легко найти" }, - "commands": { - "clear": "Очистить рабочий процесс", - "clipspace": "Открыть Clipspace", - "dark": "Тёмная", - "execute": "Выполнить", - "help": "Помощь", - "interrupt": "Отменить текущий запуск", - "light": "Светлая", - "manageExtensions": "Управление расширениями", - "queue": "Панель очереди", - "refresh": "Обновить определения узлов", - "resetView": "Сбросить вид холста", - "run": "Запустить", - "runWorkflow": "Запустить рабочий процесс", - "runWorkflowFront": "Запустить рабочий процесс (в начало очереди)", - "settings": "Настройки", - "theme": "Тема", - "toggleBottomPanel": "Показать/скрыть нижнюю панель" - }, "compositor": { "downloadPsd": "Скачать PSD", "empty": "Запустите рабочий процесс для создания композиции", diff --git a/src/locales/tr/main.json b/src/locales/tr/main.json index 8ade79aa2f6..a22e9275c03 100644 --- a/src/locales/tr/main.json +++ b/src/locales/tr/main.json @@ -963,25 +963,6 @@ "workflowName": "Çalışma akışı adı", "workflowNamePlaceholder": "İpucu: Araması kolay, açıklayıcı bir isim girin" }, - "commands": { - "clear": "İş akışını temizle", - "clipspace": "Clipspace'i Aç", - "dark": "Karanlık", - "execute": "Yürüt", - "help": "Yardım", - "interrupt": "Mevcut çalışmayı iptal et", - "light": "Açık", - "manageExtensions": "Uzantıları Yönet", - "queue": "Kuyruk Paneli", - "refresh": "Düğüm tanımlarını yenile", - "resetView": "Tuval görünümünü sıfırla", - "run": "Çalıştır", - "runWorkflow": "İş akışını çalıştır", - "runWorkflowFront": "İş akışını çalıştır (Öne kuyrukla)", - "settings": "Ayarlar", - "theme": "Tema", - "toggleBottomPanel": "Alt Paneli Aç/Kapat" - }, "compositor": { "downloadPsd": "PSD indir", "empty": "Birleştirilmiş görüntü oluşturmak için iş akışını çalıştırın", diff --git a/src/locales/zh-TW/main.json b/src/locales/zh-TW/main.json index 9f11e790515..8610f8a0416 100644 --- a/src/locales/zh-TW/main.json +++ b/src/locales/zh-TW/main.json @@ -963,25 +963,6 @@ "workflowName": "工作流程名稱", "workflowNamePlaceholder": "提示:輸入容易搜尋且具描述性的名稱" }, - "commands": { - "clear": "清除工作流程", - "clipspace": "開啟 Clipspace", - "dark": "深色", - "execute": "執行", - "help": "說明", - "interrupt": "取消目前執行", - "light": "淺色", - "manageExtensions": "管理擴充功能", - "queue": "佇列面板", - "refresh": "重新整理節點定義", - "resetView": "重設畫布視圖", - "run": "執行", - "runWorkflow": "執行工作流程", - "runWorkflowFront": "執行工作流程(在前方排隊)", - "settings": "設定", - "theme": "主題", - "toggleBottomPanel": "切換底部面板" - }, "compositor": { "downloadPsd": "下載 PSD", "empty": "請執行工作流程以產生合成圖", diff --git a/src/locales/zh/main.json b/src/locales/zh/main.json index 7b112a4debd..1e542bfdaad 100644 --- a/src/locales/zh/main.json +++ b/src/locales/zh/main.json @@ -963,25 +963,6 @@ "workflowName": "工作流名称", "workflowNamePlaceholder": "提示:输入一个易于搜索的描述性名称" }, - "commands": { - "clear": "清空工作流", - "clipspace": "打开 Clipspace", - "dark": "深色", - "execute": "执行", - "help": "帮助", - "interrupt": "取消当前运行", - "light": "浅色", - "manageExtensions": "管理扩展", - "queue": "队列面板", - "refresh": "刷新节点定义", - "resetView": "重置画布视图", - "run": "运行", - "runWorkflow": "运行工作流", - "runWorkflowFront": "运行工作流(队列前端)", - "settings": "设置", - "theme": "主题", - "toggleBottomPanel": "切换底部面板" - }, "compositor": { "downloadPsd": "下载 PSD", "empty": "运行工作流以生成合成图像", From 5593458f75054853b8cf6c702848026f5e250493 Mon Sep 17 00:00:00 2001 From: bymyself Date: Sun, 4 Oct 2026 04:14:47 +0000 Subject: [PATCH 2/3] fix(i18n): remove dead billing locale pattern Addresses review feedback: https://github.com/Comfy-Org/ComfyUI_frontend/pull/19939#discussion_r4176051457 --- eslint.config.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/eslint.config.ts b/eslint.config.ts index 1ac53df33d9..66e649cbb7d 100644 --- a/eslint.config.ts +++ b/eslint.config.ts @@ -161,9 +161,7 @@ const billingWebI18nSettings = { localeDir: [ { pattern: './apps/billing-web/src/locales/en/main.json', - localeKey: 'path', - localePattern: - /^\.?\/?apps\/billing-web\/src\/locales\/(?[A-Za-z0-9-]+)\/.+\.json$/ + localeKey: 'path' } ], cwd: import.meta.dirname, From fef535d6093e04a5d8d41283e6b4bfece7373d20 Mon Sep 17 00:00:00 2001 From: bymyself Date: Sun, 4 Oct 2026 04:15:04 +0000 Subject: [PATCH 3/3] fix(i18n): remove dead website locale pattern Addresses review feedback: https://github.com/Comfy-Org/ComfyUI_frontend/pull/19939#discussion_r4176051461 --- eslint.config.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/eslint.config.ts b/eslint.config.ts index 66e649cbb7d..d2a6ad7e431 100644 --- a/eslint.config.ts +++ b/eslint.config.ts @@ -174,9 +174,7 @@ const websiteI18nSettings = { localeDir: [ { pattern: './apps/website/src/locales/en/main.json', - localeKey: 'path', - localePattern: - /^\.?\/?apps\/website\/src\/locales\/(?[A-Za-z0-9-]+)\/.+\.json$/ + localeKey: 'path' } ], cwd: import.meta.dirname,