mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-05-01 03:31:58 +00:00
fix(i18n): use import attributes for JSON to support Node/Playwright in i18n workflow
This commit is contained in:
72
src/i18n.ts
72
src/i18n.ts
@@ -1,41 +1,41 @@
|
|||||||
import { createI18n } from 'vue-i18n'
|
import { createI18n } from 'vue-i18n'
|
||||||
|
|
||||||
import arCommands from './locales/ar/commands.json'
|
import arCommands from './locales/ar/commands.json' with { type: 'json' }
|
||||||
import ar from './locales/ar/main.json'
|
import ar from './locales/ar/main.json' with { type: 'json' }
|
||||||
import arNodes from './locales/ar/nodeDefs.json'
|
import arNodes from './locales/ar/nodeDefs.json' with { type: 'json' }
|
||||||
import arSettings from './locales/ar/settings.json'
|
import arSettings from './locales/ar/settings.json' with { type: 'json' }
|
||||||
import enCommands from './locales/en/commands.json'
|
import enCommands from './locales/en/commands.json' with { type: 'json' }
|
||||||
import en from './locales/en/main.json'
|
import en from './locales/en/main.json' with { type: 'json' }
|
||||||
import enNodes from './locales/en/nodeDefs.json'
|
import enNodes from './locales/en/nodeDefs.json' with { type: 'json' }
|
||||||
import enSettings from './locales/en/settings.json'
|
import enSettings from './locales/en/settings.json' with { type: 'json' }
|
||||||
import esCommands from './locales/es/commands.json'
|
import esCommands from './locales/es/commands.json' with { type: 'json' }
|
||||||
import es from './locales/es/main.json'
|
import es from './locales/es/main.json' with { type: 'json' }
|
||||||
import esNodes from './locales/es/nodeDefs.json'
|
import esNodes from './locales/es/nodeDefs.json' with { type: 'json' }
|
||||||
import esSettings from './locales/es/settings.json'
|
import esSettings from './locales/es/settings.json' with { type: 'json' }
|
||||||
import frCommands from './locales/fr/commands.json'
|
import frCommands from './locales/fr/commands.json' with { type: 'json' }
|
||||||
import fr from './locales/fr/main.json'
|
import fr from './locales/fr/main.json' with { type: 'json' }
|
||||||
import frNodes from './locales/fr/nodeDefs.json'
|
import frNodes from './locales/fr/nodeDefs.json' with { type: 'json' }
|
||||||
import frSettings from './locales/fr/settings.json'
|
import frSettings from './locales/fr/settings.json' with { type: 'json' }
|
||||||
import jaCommands from './locales/ja/commands.json'
|
import jaCommands from './locales/ja/commands.json' with { type: 'json' }
|
||||||
import ja from './locales/ja/main.json'
|
import ja from './locales/ja/main.json' with { type: 'json' }
|
||||||
import jaNodes from './locales/ja/nodeDefs.json'
|
import jaNodes from './locales/ja/nodeDefs.json' with { type: 'json' }
|
||||||
import jaSettings from './locales/ja/settings.json'
|
import jaSettings from './locales/ja/settings.json' with { type: 'json' }
|
||||||
import koCommands from './locales/ko/commands.json'
|
import koCommands from './locales/ko/commands.json' with { type: 'json' }
|
||||||
import ko from './locales/ko/main.json'
|
import ko from './locales/ko/main.json' with { type: 'json' }
|
||||||
import koNodes from './locales/ko/nodeDefs.json'
|
import koNodes from './locales/ko/nodeDefs.json' with { type: 'json' }
|
||||||
import koSettings from './locales/ko/settings.json'
|
import koSettings from './locales/ko/settings.json' with { type: 'json' }
|
||||||
import ruCommands from './locales/ru/commands.json'
|
import ruCommands from './locales/ru/commands.json' with { type: 'json' }
|
||||||
import ru from './locales/ru/main.json'
|
import ru from './locales/ru/main.json' with { type: 'json' }
|
||||||
import ruNodes from './locales/ru/nodeDefs.json'
|
import ruNodes from './locales/ru/nodeDefs.json' with { type: 'json' }
|
||||||
import ruSettings from './locales/ru/settings.json'
|
import ruSettings from './locales/ru/settings.json' with { type: 'json' }
|
||||||
import zhTWCommands from './locales/zh-TW/commands.json'
|
import zhTWCommands from './locales/zh-TW/commands.json' with { type: 'json' }
|
||||||
import zhTW from './locales/zh-TW/main.json'
|
import zhTW from './locales/zh-TW/main.json' with { type: 'json' }
|
||||||
import zhTWNodes from './locales/zh-TW/nodeDefs.json'
|
import zhTWNodes from './locales/zh-TW/nodeDefs.json' with { type: 'json' }
|
||||||
import zhTWSettings from './locales/zh-TW/settings.json'
|
import zhTWSettings from './locales/zh-TW/settings.json' with { type: 'json' }
|
||||||
import zhCommands from './locales/zh/commands.json'
|
import zhCommands from './locales/zh/commands.json' with { type: 'json' }
|
||||||
import zh from './locales/zh/main.json'
|
import zh from './locales/zh/main.json' with { type: 'json' }
|
||||||
import zhNodes from './locales/zh/nodeDefs.json'
|
import zhNodes from './locales/zh/nodeDefs.json' with { type: 'json' }
|
||||||
import zhSettings from './locales/zh/settings.json'
|
import zhSettings from './locales/zh/settings.json' with { type: 'json' }
|
||||||
|
|
||||||
function buildLocale<M, N, C, S>(main: M, nodes: N, commands: C, settings: S) {
|
function buildLocale<M, N, C, S>(main: M, nodes: N, commands: C, settings: S) {
|
||||||
return {
|
return {
|
||||||
|
|||||||
Reference in New Issue
Block a user