Translate core setting name & tooltip (#1765)

* lazy eval default value

* Add setting translation

* Adjust hooks

* Add all translations

* nit

* Normalized setting id

* Update locales

* Fallback

* Locale => Language

* Locale => Language

* Update translations
This commit is contained in:
Chenlei Hu
2024-12-02 14:34:21 -08:00
committed by GitHub
parent 646bcf595b
commit a56462fc7c
11 changed files with 1008 additions and 11 deletions

View File

@@ -83,7 +83,7 @@ export const CORE_SETTINGS: SettingParams[] = [
name: 'Sidebar size',
type: 'combo',
options: ['normal', 'small'],
defaultValue: window.innerWidth < 1600 ? 'small' : 'normal'
defaultValue: () => (window.innerWidth < 1600 ? 'small' : 'normal')
},
{
id: 'Comfy.TextareaWidget.FontSize',
@@ -259,10 +259,10 @@ export const CORE_SETTINGS: SettingParams[] = [
},
{
id: 'Comfy.Locale',
name: 'Locale',
name: 'Language',
type: 'combo',
options: ['en', 'zh', 'ru', 'ja'],
defaultValue: navigator.language.split('-')[0] || 'en'
defaultValue: () => navigator.language.split('-')[0] || 'en'
},
{
id: 'Comfy.NodeBadge.NodeSourceBadgeMode',