[i18n] Split settings locale to separate json files (#1986)

Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
Chenlei Hu
2024-12-18 14:57:05 -08:00
committed by GitHub
parent abeafd5625
commit b1d02c6a7b
14 changed files with 1756 additions and 1749 deletions

View File

@@ -11,6 +11,7 @@ import type { ComfyApi } from '../src/scripts/api'
const localePath = './src/locales/en/main.json'
const nodeDefsPath = './src/locales/en/nodeDefs.json'
const commandsPath = './src/locales/en/commands.json'
const settingsPath = './src/locales/en/settings.json'
const extractMenuCommandLocaleStrings = (): Set<string> => {
const labels = new Set<string>()
@@ -231,7 +232,6 @@ test('collect-i18n', async ({ comfyPage }) => {
{
...locale,
menuLabels: allLabelsLocale,
settingsDialog: allSettingsLocale,
// Do merge for settingsCategories as there are some manual translations
// for special panels like "About" and "Keybinding".
settingsCategories: {
@@ -250,4 +250,5 @@ test('collect-i18n', async ({ comfyPage }) => {
fs.writeFileSync(nodeDefsPath, JSON.stringify(allNodeDefsLocale, null, 2))
fs.writeFileSync(commandsPath, JSON.stringify(allCommandsLocale, null, 2))
fs.writeFileSync(settingsPath, JSON.stringify(allSettingsLocale, null, 2))
})