From 6eb5ee99d80ecd4887eee474fab2fce701c1cdeb Mon Sep 17 00:00:00 2001 From: Yuki Shindo Date: Sat, 7 Dec 2024 10:19:01 +0900 Subject: [PATCH] feat: use friendly language names for Comfy.Locale setting options (#1828) --- README.md | 16 +++++++++++----- src/constants/coreSettings.ts | 7 ++++++- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 8cec97d08..ec8c87790 100644 --- a/README.md +++ b/README.md @@ -487,10 +487,10 @@ Our project supports multiple languages using `vue-i18n`. This allows users arou ### Supported Languages - - en - - zh - - ru - - ja + - en (English) + - zh (中文) + - ru (Русский) + - ja (日本語) ### How to Add a New Language @@ -540,7 +540,13 @@ Add the newly added language to the following item in `src/constants/coreSetting id: 'Comfy.Locale', name: 'Locale', type: 'combo', - options: ['en', 'zh', 'ru', 'ja'], // Add the new language(s) here + // Add the new language(s) here + options: [ + { value: 'en', text: 'English' }, + { value: 'zh', text: '中文' }, + { value: 'ru', text: 'Русский' }, + { value: 'ja', text: '日本語' } + ], defaultValue: navigator.language.split('-')[0] || 'en' }, ``` diff --git a/src/constants/coreSettings.ts b/src/constants/coreSettings.ts index 4b866c8cb..0385cee99 100644 --- a/src/constants/coreSettings.ts +++ b/src/constants/coreSettings.ts @@ -262,7 +262,12 @@ export const CORE_SETTINGS: SettingParams[] = [ id: 'Comfy.Locale', name: 'Language', type: 'combo', - options: ['en', 'zh', 'ru', 'ja'], + options: [ + { value: 'en', text: 'English' }, + { value: 'zh', text: '中文' }, + { value: 'ru', text: 'Русский' }, + { value: 'ja', text: '日本語' } + ], defaultValue: () => navigator.language.split('-')[0] || 'en' }, {