From 16c3a9541c22fd78940fca98a67583ccefea9c73 Mon Sep 17 00:00:00 2001 From: rdmclin2 Date: Tue, 9 Jul 2024 22:57:44 +0800 Subject: [PATCH 1/2] :ambulance: feat: add llm i18n --- locales/bg-BG/common.json | 2 +- locales/bg-BG/panel.json | 22 +++++++++++--- locales/de-DE/common.json | 2 +- locales/de-DE/panel.json | 22 +++++++++++--- locales/en-US/common.json | 2 +- locales/en-US/panel.json | 22 +++++++++++--- locales/es-ES/common.json | 2 +- locales/es-ES/panel.json | 22 +++++++++++--- locales/fr-FR/common.json | 2 +- locales/fr-FR/panel.json | 22 +++++++++++--- locales/it-IT/common.json | 2 +- locales/it-IT/panel.json | 22 +++++++++++--- locales/ja-JP/common.json | 2 +- locales/ja-JP/panel.json | 22 +++++++++++--- locales/ko-KR/common.json | 2 +- locales/ko-KR/panel.json | 22 +++++++++++--- locales/nl-NL/common.json | 2 +- locales/nl-NL/panel.json | 22 +++++++++++--- locales/pl-PL/common.json | 2 +- locales/pl-PL/panel.json | 22 +++++++++++--- locales/pt-BR/common.json | 2 +- locales/pt-BR/panel.json | 22 +++++++++++--- locales/ru-RU/common.json | 2 +- locales/ru-RU/panel.json | 22 +++++++++++--- locales/tr-TR/common.json | 2 +- locales/tr-TR/panel.json | 22 +++++++++++--- locales/vi-VN/common.json | 2 +- locales/vi-VN/panel.json | 22 +++++++++++--- locales/zh-CN/common.json | 10 +++---- locales/zh-CN/panel.json | 29 ++++++++++++++----- locales/zh-TW/common.json | 2 +- locales/zh-TW/panel.json | 22 +++++++++++--- src/locales/default/panel.ts | 14 ++++++++- .../RolePanel/RoleEdit/LangModel/index.tsx | 23 ++++++++------- .../RoleEdit/Voice/TTSPlay/index.tsx | 2 +- 35 files changed, 338 insertions(+), 100 deletions(-) diff --git a/locales/bg-BG/common.json b/locales/bg-BG/common.json index e60b5e95..9e60000d 100644 --- a/locales/bg-BG/common.json +++ b/locales/bg-BG/common.json @@ -88,12 +88,12 @@ "chatSetting": "Настройки за чат", "clearAllSession": "Изчистване на всички сесии", "clearAllSessionDesc": "Ще бъдат изчистени всички сесии и данни за ролите, включително списъкът със сесии, списъкът с роли, съобщенията на сесиите и т.н.", + "languageSetting": "Настройки за език", "midColor": "Среден цвят", "nickname": "Прякор", "resetSystemSetting": "Нулиране на системните настройки", "resetSystemSettingDesc": "Ще бъдат нулирани всички системни настройки, включително настройките за тема, настройките за чат, настройките на езиков модел и т.н.", "systemSetting": "Системни настройки", - "languageSetting": "Настройки за език", "topicColor": "Цвят на тема", "topicSetting": "Настройки за тема" } diff --git a/locales/bg-BG/panel.json b/locales/bg-BG/panel.json index 3e825ad3..74853e23 100644 --- a/locales/bg-BG/panel.json +++ b/locales/bg-BG/panel.json @@ -11,6 +11,8 @@ "info": { "avatarDescription": "Персонализиране на аватара. Кликнете, за да качите собствен аватар", "avatarLabel": "Аватар", + "categoryDescription": "Категория на персонажа, използвана за класификация", + "categoryLabel": "Категория", "coverDescription": "Използвана за представяне на страницата с открити персонажи. Препоръчителни размери {{width}} x {{height}} пиксела", "coverLabel": "Обложка", "descDescription": "Описание на персонажа, използвано за кратко представяне на персонажа", @@ -28,17 +30,29 @@ "readmeDescription": "Файл с инструкции за персонажа, използван за детайлно представяне на страницата с открити персонажи", "readmeLabel": "Инструкции за персонажа", "textDescription": "Персонализиран отговорен текст", - "textLabel": "Текст", - "categoryLabel": "Категория", - "categoryDescription": "Категория на персонажа, използвана за класификация" + "textLabel": "Текст" + }, + "llm": { + "frequencyPenaltyDescription": "По-голямата стойност намалява вероятността за повторение на думи", + "frequencyPenaltyLabel": "Честотно наказание", + "modelDescription": "Изберете езикова модел, различните модели влияят на отговорите на ролята", + "modelLabel": "Модел", + "presencePenaltyDescription": "По-голямата стойност увеличава вероятността за разширяване на нови теми", + "presencePenaltyLabel": "Свежест на темата", + "temperatureDescription": "По-голямата стойност означава по-голяма случайност в отговорите", + "temperatureLabel": "Случайност", + "topPDescription": "Подобно на случайността, но не променяйте заедно с нея", + "topPLabel": "Вероятностно извличане" }, "market": { "findVidol": "Намерете своя любим идол" }, "nav": { "info": "Основна информация", + "llm": "Езиков модел", "model": "3D модел", "role": "Настройка на персонажа", + "touch": "Докосване", "voice": "Глас" }, "role": { @@ -73,7 +87,7 @@ "selectVoice": "Моля, първо изберете глас", "speedDescription": "Контрол на скоростта на говора, стойностите са от 0 до 3, по подразбиране е 1", "speedLabel": "Скорост на говора", - "transfromSuccess": "Преобразуването е успешно", + "transformSuccess": "Преобразуването е успешно", "voiceDescription": "Варира според гласовия двигател и езика", "voiceLabel": "Глас" }, diff --git a/locales/de-DE/common.json b/locales/de-DE/common.json index dfaf1901..402d1b3a 100644 --- a/locales/de-DE/common.json +++ b/locales/de-DE/common.json @@ -88,12 +88,12 @@ "chatSetting": "Chat-Einstellungen", "clearAllSession": "Alle Sitzungsnachrichten löschen", "clearAllSessionDesc": "Alle Sitzungen und Rollendaten werden gelöscht, einschließlich Sitzungsliste, Rollenliste und Sitzungsnachrichten", + "languageSetting": "Spracheinstellungen", "midColor": "Mittlere Farbe", "nickname": "Spitzname", "resetSystemSetting": "Systemeinstellungen zurücksetzen", "resetSystemSettingDesc": "Alle Systemeinstellungen werden zurückgesetzt, einschließlich Themen-, Chat- und Sprachmodell-Einstellungen", "systemSetting": "Systemeinstellungen", - "languageSetting": "Spracheinstellungen", "topicColor": "Themenfarbe", "topicSetting": "Themen-Einstellungen" } diff --git a/locales/de-DE/panel.json b/locales/de-DE/panel.json index 8d09d2a3..613e4d04 100644 --- a/locales/de-DE/panel.json +++ b/locales/de-DE/panel.json @@ -11,6 +11,8 @@ "info": { "avatarDescription": "Benutzerdefiniertes Profilbild, klicken Sie auf das Bild, um es hochzuladen", "avatarLabel": "Profilbild", + "categoryDescription": "Charakterkategorie, zur Klassifizierung", + "categoryLabel": "Kategorie", "coverDescription": "Zur Präsentation des Charakters auf der Entdeckungsseite, empfohlene Größe {{width}} x {{height}}", "coverLabel": "Cover", "descDescription": "Charakterbeschreibung, zur einfachen Vorstellung des Charakters", @@ -28,17 +30,29 @@ "readmeDescription": "Anleitungsdatei des Charakters, zur detaillierten Vorstellung des Charakters auf der Entdeckungsseite", "readmeLabel": "Charakteranleitung", "textDescription": "Benutzerdefinierter Antworttext", - "textLabel": "Text", - "categoryLabel": "Kategorie", - "categoryDescription": "Charakterkategorie, zur Klassifizierung" + "textLabel": "Text" + }, + "llm": { + "frequencyPenaltyDescription": "Je höher der Wert, desto wahrscheinlicher ist es, dass sich wiederholende Wörter reduziert werden.", + "frequencyPenaltyLabel": "Frequenzstrafe", + "modelDescription": "Wählen Sie ein Sprachmodell aus. Unterschiedliche Modelle beeinflussen die Antworten der Charaktere.", + "modelLabel": "Modell", + "presencePenaltyDescription": "Je höher der Wert, desto wahrscheinlicher ist es, dass neue Themen erweitert werden.", + "presencePenaltyLabel": "Themenfrische", + "temperatureDescription": "Je höher der Wert, desto zufälliger die Antwort.", + "temperatureLabel": "Zufälligkeit", + "topPDescription": "Ähnlich wie Zufälligkeit, aber nicht zusammen mit Zufälligkeit ändern.", + "topPLabel": "Top-P-Sampling" }, "market": { "findVidol": "Finde deinen Lieblingsidol" }, "nav": { "info": "Grundinformationen", + "llm": "Sprachmodell", "model": "3D-Modell", "role": "Charaktereinstellungen", + "touch": "Berühren", "voice": "Stimme" }, "role": { @@ -73,7 +87,7 @@ "selectVoice": "Bitte wählen Sie zuerst die Stimme aus", "speedDescription": "Steuerung der Sprechgeschwindigkeit, Werte von 0 bis 3, Standardwert ist 1", "speedLabel": "Geschwindigkeit", - "transfromSuccess": "Erfolgreich umgewandelt", + "transformSuccess": "Erfolgreich umgewandelt", "voiceDescription": "Je nach Engine und Sprache unterschiedlich", "voiceLabel": "Stimme" }, diff --git a/locales/en-US/common.json b/locales/en-US/common.json index b252b45a..1842de68 100644 --- a/locales/en-US/common.json +++ b/locales/en-US/common.json @@ -88,12 +88,12 @@ "chatSetting": "Chat Settings", "clearAllSession": "Clear All Session Messages", "clearAllSessionDesc": "This will clear all session and role data, including session list, role list, session messages, etc.", + "languageSetting": "Language Settings", "midColor": "Neutral Color", "nickname": "Nickname", "resetSystemSetting": "Reset System Settings", "resetSystemSettingDesc": "This will reset all system settings, including theme settings, chat settings, language model settings, etc.", "systemSetting": "System Settings", - "languageSetting": "Language Settings", "topicColor": "Theme Color", "topicSetting": "Topic Settings" } diff --git a/locales/en-US/panel.json b/locales/en-US/panel.json index ab172210..b13d2dd0 100644 --- a/locales/en-US/panel.json +++ b/locales/en-US/panel.json @@ -11,6 +11,8 @@ "info": { "avatarDescription": "Customize your avatar. Click to upload", "avatarLabel": "Avatar", + "categoryDescription": "Character category, used for classification", + "categoryLabel": "Category", "coverDescription": "Used for displaying the character on the discovery page. Recommended size {{width}} x {{height}}", "coverLabel": "Cover", "descDescription": "Character description, used for a brief introduction", @@ -28,17 +30,29 @@ "readmeDescription": "Character's description file, used for detailed introduction on the discovery page", "readmeLabel": "Character Description", "textDescription": "Custom response text", - "textLabel": "Text", - "categoryLabel": "Category", - "categoryDescription": "Character category, used for classification" + "textLabel": "Text" + }, + "llm": { + "frequencyPenaltyDescription": "The higher the value, the more likely to reduce repeated words", + "frequencyPenaltyLabel": "Frequency Penalty", + "modelDescription": "Select a language model, different models will affect the responses of the character", + "modelLabel": "Model", + "presencePenaltyDescription": "The higher the value, the more likely to expand to new topics", + "presencePenaltyLabel": "Topic Freshness", + "temperatureDescription": "The higher the value, the more random the responses", + "temperatureLabel": "Randomness", + "topPDescription": "Similar to randomness, but do not change together with randomness", + "topPLabel": "Top P Sampling" }, "market": { "findVidol": "Find your favorite idol" }, "nav": { "info": "Basic Information", + "llm": "Language Model", "model": "3D Model", "role": "Character Settings", + "touch": "Touch", "voice": "Voice" }, "role": { @@ -73,7 +87,7 @@ "selectVoice": "Please select a voice first", "speedDescription": "Control the speed, range is 0 ~ 3, default is 1", "speedLabel": "Speed", - "transfromSuccess": "Conversion successful", + "transformSuccess": "Conversion successful", "voiceDescription": "Different depending on the engine and language", "voiceLabel": "Voice" }, diff --git a/locales/es-ES/common.json b/locales/es-ES/common.json index fa13f5b6..0c94d38e 100644 --- a/locales/es-ES/common.json +++ b/locales/es-ES/common.json @@ -88,12 +88,12 @@ "chatSetting": "Configuración de chat", "clearAllSession": "Limpiar todas las conversaciones", "clearAllSessionDesc": "Esto eliminará todas las conversaciones y datos de rol, incluidas las listas de conversaciones, roles y mensajes de conversación.", + "languageSetting": "Configuración de idioma", "midColor": "Color neutro", "nickname": "Apodo", "resetSystemSetting": "Restablecer configuración del sistema", "resetSystemSettingDesc": "Esto restablecerá todas las configuraciones del sistema, incluidas las de tema, chat, modelo de lenguaje, etc.", "systemSetting": "Configuración del sistema", - "languageSetting": "Configuración de idioma", "topicColor": "Color de tema", "topicSetting": "Configuración de tema" } diff --git a/locales/es-ES/panel.json b/locales/es-ES/panel.json index 510e4e8f..592bbeaa 100644 --- a/locales/es-ES/panel.json +++ b/locales/es-ES/panel.json @@ -11,6 +11,8 @@ "info": { "avatarDescription": "Avatar personalizado, haz clic en el avatar para cargar una imagen personalizada", "avatarLabel": "Avatar", + "categoryDescription": "Categoría del personaje, utilizada para la clasificación", + "categoryLabel": "Categoría", "coverDescription": "Utilizado para mostrar al personaje en la página de descubrimiento, tamaño recomendado {{width}} x {{height}}", "coverLabel": "Portada", "descDescription": "Descripción del personaje, utilizada para una breve presentación del personaje", @@ -28,17 +30,29 @@ "readmeDescription": "Archivo de instrucciones del personaje, utilizado para mostrar una descripción detallada del personaje en la página de descubrimiento", "readmeLabel": "Instrucciones del personaje", "textDescription": "Texto de respuesta personalizado", - "textLabel": "Texto", - "categoryLabel": "Categoría", - "categoryDescription": "Categoría del personaje, utilizada para la clasificación" + "textLabel": "Texto" + }, + "llm": { + "frequencyPenaltyDescription": "Cuanto mayor sea el valor, más probable será reducir la repetición de palabras", + "frequencyPenaltyLabel": "Penalización de frecuencia", + "modelDescription": "Selecciona el modelo de lenguaje, diferentes modelos afectarán las respuestas del personaje", + "modelLabel": "Modelo", + "presencePenaltyDescription": "Cuanto mayor sea el valor, más probable será que se amplíe a nuevos temas", + "presencePenaltyLabel": "Frescura del tema", + "temperatureDescription": "Cuanto mayor sea el valor, más aleatoria será la respuesta", + "temperatureLabel": "Aleatoriedad", + "topPDescription": "Similar a la aleatoriedad, pero no se debe cambiar junto con la aleatoriedad", + "topPLabel": "Muestreo de núcleo" }, "market": { "findVidol": "Encuentra tu ídolo favorito" }, "nav": { "info": "Información básica", + "llm": "Modelo de lenguaje", "model": "Modelo 3D", "role": "Configuración del personaje", + "touch": "Toque", "voice": "Voz" }, "role": { @@ -73,7 +87,7 @@ "selectVoice": "Por favor, selecciona una voz primero", "speedDescription": "Controla la velocidad de la voz, valores entre 0 y 3, por defecto es 1", "speedLabel": "Velocidad", - "transfromSuccess": "Transformación exitosa", + "transformSuccess": "Transformación exitosa", "voiceDescription": "Varía según el motor y el idioma", "voiceLabel": "Voz" }, diff --git a/locales/fr-FR/common.json b/locales/fr-FR/common.json index 79de0710..e432d1ac 100644 --- a/locales/fr-FR/common.json +++ b/locales/fr-FR/common.json @@ -88,12 +88,12 @@ "chatSetting": "Paramètres de conversation", "clearAllSession": "Effacer toutes les sessions", "clearAllSessionDesc": "Cela effacera toutes les données de session et de rôle, y compris la liste des sessions, la liste des rôles, les messages de session, etc.", + "languageSetting": "Paramètres de langue", "midColor": "Couleur neutre", "nickname": "Pseudo", "resetSystemSetting": "Réinitialiser les paramètres système", "resetSystemSettingDesc": "Cela réinitialisera tous les paramètres système, y compris les paramètres de sujet, les paramètres de conversation, les paramètres du modèle de langue, etc.", "systemSetting": "Paramètres système", - "languageSetting": "Paramètres de langue", "topicColor": "Couleur de sujet", "topicSetting": "Paramètres de sujet" } diff --git a/locales/fr-FR/panel.json b/locales/fr-FR/panel.json index 73c021cd..2b2526a0 100644 --- a/locales/fr-FR/panel.json +++ b/locales/fr-FR/panel.json @@ -11,6 +11,8 @@ "info": { "avatarDescription": "Avatar personnalisé, cliquez sur l'avatar pour télécharger", "avatarLabel": "Avatar", + "categoryDescription": "Catégorie du personnage, utilisée pour la classification", + "categoryLabel": "Catégorie", "coverDescription": "Utilisé pour afficher le personnage sur la page de découverte, taille recommandée {{width}} x {{height}}", "coverLabel": "Couverture", "descDescription": "Description du personnage, utilisée pour une brève introduction", @@ -28,17 +30,29 @@ "readmeDescription": "Fichier de description du personnage, utilisé pour afficher une description détaillée sur la page de découverte", "readmeLabel": "Description du personnage", "textDescription": "Réponse personnalisée", - "textLabel": "Texte", - "categoryLabel": "Catégorie", - "categoryDescription": "Catégorie du personnage, utilisée pour la classification" + "textLabel": "Texte" + }, + "llm": { + "frequencyPenaltyDescription": "Plus la valeur est grande, plus il est probable de réduire les mots répétés", + "frequencyPenaltyLabel": "Pénalité de fréquence", + "modelDescription": "Choisissez un modèle de langue, différents modèles affecteront les réponses du personnage", + "modelLabel": "Modèle", + "presencePenaltyDescription": "Plus la valeur est grande, plus il est probable d'explorer de nouveaux sujets", + "presencePenaltyLabel": "Frais de nouveauté", + "temperatureDescription": "Plus la valeur est grande, plus la réponse est aléatoire", + "temperatureLabel": "Aléatoire", + "topPDescription": "Similaire à l'aléatoire, mais ne modifiez pas en même temps que l'aléatoire", + "topPLabel": "Échantillonnage topP" }, "market": { "findVidol": "Trouvez votre idole préférée" }, "nav": { "info": "Informations de base", + "llm": "Modèle de langue", "model": "Modèle 3D", "role": "Paramètres du personnage", + "touch": "Toucher", "voice": "Voix" }, "role": { @@ -73,7 +87,7 @@ "selectVoice": "Veuillez sélectionner la voix", "speedDescription": "Contrôle la vitesse de synthèse vocale, plage de valeurs 0 ~ 3, valeur par défaut 1", "speedLabel": "Vitesse", - "transfromSuccess": "Conversion réussie", + "transformSuccess": "Conversion réussie", "voiceDescription": "Différentes voix sont disponibles en fonction du moteur et de la langue", "voiceLabel": "Voix" }, diff --git a/locales/it-IT/common.json b/locales/it-IT/common.json index b615a204..06ccd566 100644 --- a/locales/it-IT/common.json +++ b/locales/it-IT/common.json @@ -88,12 +88,12 @@ "chatSetting": "Impostazioni chat", "clearAllSession": "Cancella tutte le sessioni", "clearAllSessionDesc": "Cancella tutti i dati delle sessioni e dei ruoli, inclusi elenchi di sessioni, elenchi di ruoli, messaggi di sessione, ecc.", + "languageSetting": "Impostazioni lingua", "midColor": "Colore neutro", "nickname": "Soprannome", "resetSystemSetting": "Ripristina impostazioni di sistema", "resetSystemSettingDesc": "Ripristina tutte le impostazioni di sistema, inclusi le impostazioni dell'argomento, della chat, del modello linguistico, ecc.", "systemSetting": "Impostazioni di sistema", - "languageSetting": "Impostazioni lingua", "topicColor": "Colore dell'argomento", "topicSetting": "Impostazioni argomento" } diff --git a/locales/it-IT/panel.json b/locales/it-IT/panel.json index 9de556b9..421ebdea 100644 --- a/locales/it-IT/panel.json +++ b/locales/it-IT/panel.json @@ -11,6 +11,8 @@ "info": { "avatarDescription": "Personalizza l'avatar, fai clic sull'avatar per caricare personalizzazioni", "avatarLabel": "Avatar", + "categoryDescription": "Categoria del personaggio, utilizzata per la classificazione", + "categoryLabel": "Categoria", "coverDescription": "Utilizzato per mostrare il personaggio nella pagina di scoperta, dimensioni consigliate {{width}} x {{height}}", "coverLabel": "Copertina", "descDescription": "Descrizione del personaggio, utilizzata per una breve presentazione del personaggio", @@ -28,17 +30,29 @@ "readmeDescription": "File di istruzioni del personaggio, utilizzato per mostrare una descrizione dettagliata del personaggio nella pagina di scoperta", "readmeLabel": "Istruzioni del personaggio", "textDescription": "Testo di risposta personalizzato", - "textLabel": "Testo", - "categoryLabel": "Categoria", - "categoryDescription": "Categoria del personaggio, utilizzata per la classificazione" + "textLabel": "Testo" + }, + "llm": { + "frequencyPenaltyDescription": "Più alto è il valore, più probabile sarà la riduzione delle ripetizioni di parole", + "frequencyPenaltyLabel": "Penalità di frequenza", + "modelDescription": "Scegli il modello linguistico, modelli diversi influenzeranno le risposte del personaggio", + "modelLabel": "Modello", + "presencePenaltyDescription": "Più alto è il valore, più probabile sarà l'espansione verso nuovi argomenti", + "presencePenaltyLabel": "Freschezza dell'argomento", + "temperatureDescription": "Più alto è il valore, più casuale sarà la risposta", + "temperatureLabel": "Casualità", + "topPDescription": "Simile alla casualità, ma non modificare insieme alla casualità", + "topPLabel": "Campionamento principale" }, "market": { "findVidol": "Trova il tuo idolo preferito" }, "nav": { "info": "Informazioni di base", + "llm": "Modello linguistico", "model": "Modello 3D", "role": "Impostazioni del personaggio", + "touch": "Tocco", "voice": "Voce" }, "role": { @@ -73,7 +87,7 @@ "selectVoice": "Seleziona prima la voce", "speedDescription": "Controlla la velocità, compresa tra 0 e 3, predefinito 1", "speedLabel": "Velocità", - "transfromSuccess": "Trasformazione riuscita", + "transformSuccess": "Trasformazione riuscita", "voiceDescription": "Varia a seconda del motore e della lingua", "voiceLabel": "Voce" }, diff --git a/locales/ja-JP/common.json b/locales/ja-JP/common.json index d6c371da..35c78d9c 100644 --- a/locales/ja-JP/common.json +++ b/locales/ja-JP/common.json @@ -88,12 +88,12 @@ "chatSetting": "チャット設定", "clearAllSession": "すべてのセッションをクリア", "clearAllSessionDesc": "会話リスト、役割リスト、セッションメッセージなどを含むすべてのセッションと役割データを削除します", + "languageSetting": "言語設定", "midColor": "中間色", "nickname": "ニックネーム", "resetSystemSetting": "システム設定をリセット", "resetSystemSettingDesc": "トピック設定、チャット設定、言語モデル設定などを含むすべてのシステム設定をリセットします", "systemSetting": "システム設定", - "languageSetting": "言語設定", "topicColor": "トピックカラー", "topicSetting": "トピック設定" } diff --git a/locales/ja-JP/panel.json b/locales/ja-JP/panel.json index 86d3073f..caf814c3 100644 --- a/locales/ja-JP/panel.json +++ b/locales/ja-JP/panel.json @@ -11,6 +11,8 @@ "info": { "avatarDescription": "カスタムアバター、アバターをクリックしてカスタムアップロード", "avatarLabel": "アバター", + "categoryDescription": "キャラクターカテゴリ、分類に使用される", + "categoryLabel": "カテゴリ", "coverDescription": "キャラクターを発見ページに表示するために使用される、推奨サイズ {{width}} x {{height}} ", "coverLabel": "カバー", "descDescription": "キャラクターの説明、キャラクターの簡単な紹介に使用される", @@ -28,17 +30,29 @@ "readmeDescription": "キャラクターの説明ファイル、発見ページでキャラクターの詳細な説明を表示するために使用される", "readmeLabel": "キャラクター説明", "textDescription": "カスタム応答文案", - "textLabel": "文案", - "categoryLabel": "カテゴリ", - "categoryDescription": "キャラクターカテゴリ、分類に使用される" + "textLabel": "文案" + }, + "llm": { + "frequencyPenaltyDescription": "値が大きいほど、単語の繰り返しを減らす可能性が高くなります", + "frequencyPenaltyLabel": "頻度ペナルティ", + "modelDescription": "言語モデルを選択します。異なるモデルはキャラクターの回答に影響を与えます", + "modelLabel": "モデル", + "presencePenaltyDescription": "値が大きいほど、新しいトピックに展開する可能性が高くなります", + "presencePenaltyLabel": "トピックの新鮮さ", + "temperatureDescription": "値が大きいほど、返信がよりランダムになります", + "temperatureLabel": "ランダム性", + "topPDescription": "ランダム性と同様ですが、一緒に変更しないでください", + "topPLabel": "トップPサンプリング" }, "market": { "findVidol": "お気に入りのアイドルを見つける" }, "nav": { "info": "基本情報", + "llm": "言語モデル", "model": "3Dモデル", "role": "キャラクター設定", + "touch": "タッチ", "voice": "音声" }, "role": { @@ -73,7 +87,7 @@ "selectVoice": "音声を選択してください", "speedDescription": "速度を制御します、値の範囲は0〜3、デフォルトは1です", "speedLabel": "速度", - "transfromSuccess": "変換成功", + "transformSuccess": "変換成功", "voiceDescription": "エンジンと言語によって異なります", "voiceLabel": "音声" }, diff --git a/locales/ko-KR/common.json b/locales/ko-KR/common.json index 2caf3c24..979d26ed 100644 --- a/locales/ko-KR/common.json +++ b/locales/ko-KR/common.json @@ -88,12 +88,12 @@ "chatSetting": "채팅 설정", "clearAllSession": "모든 대화 메시지 지우기", "clearAllSessionDesc": "대화 목록, 역할 목록, 대화 메시지 등 모든 대화와 역할 데이터를 지웁니다.", + "languageSetting": "언어 설정", "midColor": "중간 색상", "nickname": "닉네임", "resetSystemSetting": "시스템 설정 재설정", "resetSystemSettingDesc": "주제 설정, 채팅 설정, 언어 모델 설정 등 모든 시스템 설정을 재설정합니다.", "systemSetting": "시스템 설정", - "languageSetting": "언어 설정", "topicColor": "주제 색상", "topicSetting": "주제 설정" } diff --git a/locales/ko-KR/panel.json b/locales/ko-KR/panel.json index f3606247..e331d193 100644 --- a/locales/ko-KR/panel.json +++ b/locales/ko-KR/panel.json @@ -11,6 +11,8 @@ "info": { "avatarDescription": "사용자 정의 아바타, 클릭하여 업로드", "avatarLabel": "아바타", + "categoryDescription": "캐릭터 카테고리, 분류에 사용됩니다", + "categoryLabel": "카테고리", "coverDescription": "캐릭터를 발견 페이지에서 표시하는 데 사용되는 커버, 권장 크기 {{width}} x {{height}} ", "coverLabel": "커버", "descDescription": "캐릭터 설명, 캐릭터의 간단한 소개에 사용됩니다", @@ -28,17 +30,29 @@ "readmeDescription": "캐릭터 설명서, 발견 페이지에서 캐릭터의 자세한 설명을 표시하는 데 사용됩니다", "readmeLabel": "캐릭터 설명서", "textDescription": "사용자 정의 응답 문구", - "textLabel": "문구", - "categoryLabel": "카테고리", - "categoryDescription": "캐릭터 카테고리, 분류에 사용됩니다" + "textLabel": "문구" + }, + "llm": { + "frequencyPenaltyDescription": "값이 클수록 반복 단어가 줄어듭니다", + "frequencyPenaltyLabel": "빈도 패널티", + "modelDescription": "언어 모델을 선택하면 역할의 응답에 영향을 줄 수 있습니다", + "modelLabel": "모델", + "presencePenaltyDescription": "값이 클수록 새로운 주제로 확장될 가능성이 높아집니다", + "presencePenaltyLabel": "주제 신선도", + "temperatureDescription": "값이 클수록 더 랜덤한 응답이 생성됩니다", + "temperatureLabel": "랜덤성", + "topPDescription": "랜덤성과 유사하지만 함께 변경하지 마세요", + "topPLabel": "상위 P 샘플링" }, "market": { "findVidol": "좋아하는 아이돌을 찾아보세요" }, "nav": { "info": "기본 정보", + "llm": "언어 모델", "model": "3D 모델", "role": "캐릭터 설정", + "touch": "터치", "voice": "음성" }, "role": { @@ -73,7 +87,7 @@ "selectVoice": "먼저 음성을 선택하세요", "speedDescription": "속도를 제어하고 0 ~ 3의 값을 취합니다. 기본값은 1입니다", "speedLabel": "속도", - "transfromSuccess": "변환 성공", + "transformSuccess": "변환 성공", "voiceDescription": "엔진 및 언어에 따라 다릅니다", "voiceLabel": "음성" }, diff --git a/locales/nl-NL/common.json b/locales/nl-NL/common.json index 2ceef760..0d8c7db0 100644 --- a/locales/nl-NL/common.json +++ b/locales/nl-NL/common.json @@ -88,12 +88,12 @@ "chatSetting": "Chatinstellingen", "clearAllSession": "Verwijder alle gespreksberichten", "clearAllSessionDesc": "Zal alle gesprekken en rolgegevens wissen, inclusief gesprekslijst, rollijst, gespreksberichten, enz.", + "languageSetting": "Taalinstellingen", "midColor": "Middenkleur", "nickname": "Bijnaam", "resetSystemSetting": "Reset systeeminstellingen", "resetSystemSettingDesc": "Zal alle systeeminstellingen resetten, inclusief thema-instellingen, chatinstellingen, taalmodelinstellingen, enz.", "systemSetting": "Systeeminstellingen", - "languageSetting": "Taalinstellingen", "topicColor": "Themakleur", "topicSetting": "Thema-instellingen" } diff --git a/locales/nl-NL/panel.json b/locales/nl-NL/panel.json index 0b97eb1f..15ff0220 100644 --- a/locales/nl-NL/panel.json +++ b/locales/nl-NL/panel.json @@ -11,6 +11,8 @@ "info": { "avatarDescription": "Aangepast avatar, klik op het avatar om een aangepaste upload te selecteren", "avatarLabel": "Avatar", + "categoryDescription": "Rolcategorie, voor classificatie", + "categoryLabel": "Categorie", "coverDescription": "Wordt gebruikt voor het presenteren van de rol op de ontdek-pagina, aanbevolen formaat {{width}} x {{height}}", "coverLabel": "Omslag", "descDescription": "Rolbeschrijving, voor een eenvoudige inleiding van de rol", @@ -28,17 +30,29 @@ "readmeDescription": "De handleiding van de rol, voor het presenteren van de rol op de ontdek-pagina", "readmeLabel": "Rolhandleiding", "textDescription": "Aangepaste responstekst", - "textLabel": "Tekst", - "categoryLabel": "Categorie", - "categoryDescription": "Rolcategorie, voor classificatie" + "textLabel": "Tekst" + }, + "llm": { + "frequencyPenaltyDescription": "The higher the value, the more likely to reduce repeated words", + "frequencyPenaltyLabel": "Frequency Penalty", + "modelDescription": "Choose a language model, different models will affect the character's responses", + "modelLabel": "Model", + "presencePenaltyDescription": "The higher the value, the more likely to expand to new topics", + "presencePenaltyLabel": "Topic Freshness", + "temperatureDescription": "The higher the value, the more random the replies", + "temperatureLabel": "Randomness", + "topPDescription": "Similar to randomness, but do not change together with randomness", + "topPLabel": "Top P Sampling" }, "market": { "findVidol": "Vind je favoriete idool" }, "nav": { "info": "Basisinformatie", + "llm": "taalmodel", "model": "3D Model", "role": "Rolinstelling", + "touch": "aanraken", "voice": "Stem" }, "role": { @@ -73,7 +87,7 @@ "selectVoice": "Selecteer eerst de stem", "speedDescription": "Bewaar spraaksnelheid, waardebereik 0 ~ 3, standaard is 1", "speedLabel": "Spraaksnelheid", - "transfromSuccess": "Converteren succesvol", + "transformSuccess": "Converteren succesvol", "voiceDescription": "Kan verschillen afhankelijk van de engine en taal", "voiceLabel": "Stem" }, diff --git a/locales/pl-PL/common.json b/locales/pl-PL/common.json index 44ac3511..49358d08 100644 --- a/locales/pl-PL/common.json +++ b/locales/pl-PL/common.json @@ -88,12 +88,12 @@ "chatSetting": "Ustawienia czatu", "clearAllSession": "Wyczyść wszystkie wiadomości sesji", "clearAllSessionDesc": "Spowoduje usunięcie wszystkich danych sesji i postaci, w tym listy rozmów, listy postaci, wiadomości sesji itp.", + "languageSetting": "Ustawienia języka", "midColor": "Kolor średni", "nickname": "Nazwa użytkownika", "resetSystemSetting": "Resetuj ustawienia systemowe", "resetSystemSettingDesc": "Spowoduje zresetowanie wszystkich ustawień systemowych, w tym ustawień motywów, czat, modeli językowych itp.", "systemSetting": "Ustawienia systemowe", - "languageSetting": "Ustawienia języka", "topicColor": "Kolor tematu", "topicSetting": "Ustawienia tematu" } diff --git a/locales/pl-PL/panel.json b/locales/pl-PL/panel.json index 2c049c70..6c3f1ffd 100644 --- a/locales/pl-PL/panel.json +++ b/locales/pl-PL/panel.json @@ -11,6 +11,8 @@ "info": { "avatarDescription": "Niestandardowe zdjęcie profilowe, kliknij zdjęcie profilowe, aby przesłać własne", "avatarLabel": "Zdjęcie profilowe", + "categoryDescription": "Kategoria postaci, używana do klasyfikacji", + "categoryLabel": "Kategoria", "coverDescription": "Używane do prezentacji postaci na stronie odkrywania, zalecany rozmiar {{width}} x {{height}}", "coverLabel": "Okładka", "descDescription": "Opis postaci, używany do prostego przedstawienia postaci", @@ -28,17 +30,29 @@ "readmeDescription": "Plik z opisem postaci, używany do prezentacji szczegółowego opisu postaci na stronie odkrywania", "readmeLabel": "Opis postaci", "textDescription": "Niestandardowe tło odpowiedzi", - "textLabel": "Treść", - "categoryLabel": "Kategoria", - "categoryDescription": "Kategoria postaci, używana do klasyfikacji" + "textLabel": "Treść" + }, + "llm": { + "frequencyPenaltyDescription": "The higher the value, the more likely to reduce repeated words", + "frequencyPenaltyLabel": "Frequency Penalty", + "modelDescription": "Choose a language model, different models will affect the responses of the character", + "modelLabel": "Model", + "presencePenaltyDescription": "The higher the value, the more likely to expand to new topics", + "presencePenaltyLabel": "Topic Freshness", + "temperatureDescription": "The higher the value, the more random the response", + "temperatureLabel": "Randomness", + "topPDescription": "Similar to randomness, but do not change it together with randomness", + "topPLabel": "Top P Sampling" }, "market": { "findVidol": "Znajdź swojego ulubionego idola" }, "nav": { "info": "Podstawowe informacje", + "llm": "Model językowy", "model": "Model 3D", "role": "Ustawienia postaci", + "touch": "Dotyk", "voice": "Głos" }, "role": { @@ -73,7 +87,7 @@ "selectVoice": "Najpierw wybierz głos", "speedDescription": "Kontrola szybkości mówienia, zakres 0 ~ 3, domyślnie 1", "speedLabel": "Prędkość mówienia", - "transfromSuccess": "Konwersja powiodła się", + "transformSuccess": "Konwersja powiodła się", "voiceDescription": "Zależy od silnika i języka", "voiceLabel": "Głos" }, diff --git a/locales/pt-BR/common.json b/locales/pt-BR/common.json index daf525c9..a9b3f635 100644 --- a/locales/pt-BR/common.json +++ b/locales/pt-BR/common.json @@ -88,12 +88,12 @@ "chatSetting": "Configuração de chat", "clearAllSession": "Limpar todas as mensagens da sessão", "clearAllSessionDesc": "Isso limpará todas as conversas e dados de papel, incluindo listas de conversas, listas de papéis, mensagens de conversa, etc.", + "languageSetting": "Configuração de idioma", "midColor": "Cor neutra", "nickname": "Apelido", "resetSystemSetting": "Redefinir configurações do sistema", "resetSystemSettingDesc": "Isso redefinirá todas as configurações do sistema, incluindo configurações de tópicos, chat, modelos de idioma, etc.", "systemSetting": "Configuração do sistema", - "languageSetting": "Configuração de idioma", "topicColor": "Cor do tópico", "topicSetting": "Configuração de tópico" } diff --git a/locales/pt-BR/panel.json b/locales/pt-BR/panel.json index 8e0412de..ee907854 100644 --- a/locales/pt-BR/panel.json +++ b/locales/pt-BR/panel.json @@ -11,6 +11,8 @@ "info": { "avatarDescription": "Avatar personalizado, clique no avatar para fazer upload personalizado", "avatarLabel": "Avatar", + "categoryDescription": "Categoria do personagem, usada para classificação", + "categoryLabel": "Categoria", "coverDescription": "Usado para mostrar o personagem na página de descoberta, tamanho recomendado {{width}} x {{height}}", "coverLabel": "Capa", "descDescription": "Descrição do personagem, usada para uma breve introdução do personagem", @@ -28,17 +30,29 @@ "readmeDescription": "Arquivo de instruções do personagem, usado para mostrar uma descrição detalhada do personagem na página de descoberta", "readmeLabel": "Instruções do personagem", "textDescription": "Texto de resposta personalizado", - "textLabel": "Texto", - "categoryLabel": "Categoria", - "categoryDescription": "Categoria do personagem, usada para classificação" + "textLabel": "Texto" + }, + "llm": { + "frequencyPenaltyDescription": "Quanto maior o valor, maior a probabilidade de reduzir palavras repetidas", + "frequencyPenaltyLabel": "Penalidade de frequência", + "modelDescription": "Escolha o modelo de linguagem, modelos diferentes afetarão as respostas do personagem", + "modelLabel": "Modelo", + "presencePenaltyDescription": "Quanto maior o valor, maior a probabilidade de expandir para novos tópicos", + "presencePenaltyLabel": "Frescor do tópico", + "temperatureDescription": "Quanto maior o valor, mais aleatória será a resposta", + "temperatureLabel": "Aleatoriedade", + "topPDescription": "Semelhante à aleatoriedade, mas não deve ser alterado junto com a aleatoriedade", + "topPLabel": "Amostragem principal" }, "market": { "findVidol": "Encontre seu ídolo favorito" }, "nav": { "info": "Informações Básicas", + "llm": "Modelo de Linguagem", "model": "Modelo 3D", "role": "Configuração do Personagem", + "touch": "Toque", "voice": "Voz" }, "role": { @@ -73,7 +87,7 @@ "selectVoice": "Por favor, selecione a voz primeiro", "speedDescription": "Controla a velocidade, varia de 0 a 3, padrão é 1", "speedLabel": "Velocidade", - "transfromSuccess": "Transformação bem-sucedida", + "transformSuccess": "Transformação bem-sucedida", "voiceDescription": "Varia de acordo com o motor e idioma", "voiceLabel": "Voz" }, diff --git a/locales/ru-RU/common.json b/locales/ru-RU/common.json index bc1afde9..3c20356a 100644 --- a/locales/ru-RU/common.json +++ b/locales/ru-RU/common.json @@ -88,12 +88,12 @@ "chatSetting": "Настройки чата", "clearAllSession": "Очистить все сессии", "clearAllSessionDesc": "Это очистит все данные сессий и ролей, включая список сессий, список ролей и сообщения сессий.", + "languageSetting": "Настройки языка", "midColor": "Средний цвет", "nickname": "Никнейм", "resetSystemSetting": "Сбросить системные настройки", "resetSystemSettingDesc": "Это сбросит все системные настройки, включая настройки темы, настройки чата, настройки языковой модели и т. д.", "systemSetting": "Системные настройки", - "languageSetting": "Настройки языка", "topicColor": "Цвет темы", "topicSetting": "Настройки темы" } diff --git a/locales/ru-RU/panel.json b/locales/ru-RU/panel.json index 4c62ddb2..0ea97b96 100644 --- a/locales/ru-RU/panel.json +++ b/locales/ru-RU/panel.json @@ -11,6 +11,8 @@ "info": { "avatarDescription": "настройте свой аватар, нажмите на аватар, чтобы загрузить свой собственный", "avatarLabel": "аватар", + "categoryDescription": "категория персонажа, используется для классификации", + "categoryLabel": "категория", "coverDescription": "используется для отображения персонажа на странице обнаружения, рекомендуемый размер {{width}} x {{height}} ", "coverLabel": "обложка", "descDescription": "описание персонажа, используется для краткого описания персонажа", @@ -28,17 +30,29 @@ "readmeDescription": "инструкция по персонажу, используется для подробного описания персонажа на странице обнаружения", "readmeLabel": "инструкция по персонажу", "textDescription": "настройте ответный текст", - "textLabel": "текст", - "categoryLabel": "категория", - "categoryDescription": "категория персонажа, используется для классификации" + "textLabel": "текст" + }, + "llm": { + "frequencyPenaltyDescription": "Чем выше значение, тем больше вероятность снижения повторяющихся слов", + "frequencyPenaltyLabel": "Частотное наказание", + "modelDescription": "Выберите языковую модель, различные модели влияют на ответ персонажа", + "modelLabel": "Модель", + "presencePenaltyDescription": "Чем выше значение, тем больше вероятность расширения на новые темы", + "presencePenaltyLabel": "Свежесть темы", + "temperatureDescription": "Чем выше значение, тем более случайный ответ", + "temperatureLabel": "Случайность", + "topPDescription": "Похоже на случайность, но не изменяйте вместе с параметром случайности", + "topPLabel": "Верхняя P-граница" }, "market": { "findVidol": "найдите своего любимого идола" }, "nav": { "info": "основная информация", + "llm": "Языковая модель", "model": "3D-модель", "role": "настройка персонажа", + "touch": "Сенсорный", "voice": "голос" }, "role": { @@ -73,7 +87,7 @@ "selectVoice": "выберите голос", "speedDescription": "контролирует скорость речи, диапазон значений 0 ~ 3, по умолчанию 1", "speedLabel": "скорость речи", - "transfromSuccess": "преобразование успешно", + "transformSuccess": "преобразование успешно", "voiceDescription": "выберите голос в зависимости от движка и языка", "voiceLabel": "голос" }, diff --git a/locales/tr-TR/common.json b/locales/tr-TR/common.json index aeedf526..1b1ec694 100644 --- a/locales/tr-TR/common.json +++ b/locales/tr-TR/common.json @@ -88,12 +88,12 @@ "chatSetting": "Sohbet Ayarları", "clearAllSession": "Tüm Oturumları Temizle", "clearAllSessionDesc": "Tüm oturumları ve rol verilerini, oturum listelerini, rol listelerini, oturum mesajlarını vb. temizleyecektir", + "languageSetting": "Dil Ayarları", "midColor": "Orta Renk", "nickname": "Takma Ad", "resetSystemSetting": "Sistem Ayarlarını Sıfırla", "resetSystemSettingDesc": "Tüm sistem ayarlarını, konu ayarlarını, sohbet ayarlarını, dil modeli ayarlarını vb. sıfırlayacaktır", "systemSetting": "Sistem Ayarları", - "languageSetting": "Dil Ayarları", "topicColor": "Konu Rengi", "topicSetting": "Konu Ayarları" } diff --git a/locales/tr-TR/panel.json b/locales/tr-TR/panel.json index 15bafc0c..47e6724c 100644 --- a/locales/tr-TR/panel.json +++ b/locales/tr-TR/panel.json @@ -11,6 +11,8 @@ "info": { "avatarDescription": "Özel avatar, avatar'a tıklayarak özelleştirme yapın", "avatarLabel": "Avatar", + "categoryDescription": "Karakter kategorisi, sınıflandırmada kullanılır", + "categoryLabel": "Kategori", "coverDescription": "Keşfetme sayfasında karakterin gösterilmesi için önerilen boyut {{width}} x {{height}} ", "coverLabel": "Kapak", "descDescription": "Karakter açıklaması, karakterin basit tanıtımı için kullanılır", @@ -28,17 +30,29 @@ "readmeDescription": "Karakterin ayrıntılı açıklamasını keşfetme sayfasında göster", "readmeLabel": "Karakter Açıklaması", "textDescription": "Özel yanıt metni", - "textLabel": "Metin", - "categoryLabel": "Kategori", - "categoryDescription": "Karakter kategorisi, sınıflandırmada kullanılır" + "textLabel": "Metin" + }, + "llm": { + "frequencyPenaltyDescription": "The higher the value, the more likely to reduce repeated words", + "frequencyPenaltyLabel": "Frequency Penalty", + "modelDescription": "Select a language model, different models will affect the responses of the character", + "modelLabel": "Model", + "presencePenaltyDescription": "The higher the value, the more likely to expand to new topics", + "presencePenaltyLabel": "Topic Freshness", + "temperatureDescription": "The higher the value, the more random the response", + "temperatureLabel": "Randomness", + "topPDescription": "Similar to randomness, but do not change it together with randomness", + "topPLabel": "Top P Sampling" }, "market": { "findVidol": "Favori idolünü bul" }, "nav": { "info": "Temel Bilgiler", + "llm": "Dil Modeli", "model": "3D Model", "role": "Karakter Ayarları", + "touch": "Dokunma", "voice": "Ses" }, "role": { @@ -73,7 +87,7 @@ "selectVoice": "Lütfen önce ses seçin", "speedDescription": "Hızı kontrol eder, değer aralığı 0 ~ 3, varsayılan 1", "speedLabel": "Hız", - "transfromSuccess": "Dönüşüm başarılı", + "transformSuccess": "Dönüşüm başarılı", "voiceDescription": "Motor ve dilin birleşimine göre değişir", "voiceLabel": "Ses" }, diff --git a/locales/vi-VN/common.json b/locales/vi-VN/common.json index a61a4c0d..256d7e25 100644 --- a/locales/vi-VN/common.json +++ b/locales/vi-VN/common.json @@ -88,12 +88,12 @@ "chatSetting": "Cài đặt trò chuyện", "clearAllSession": "Xóa tất cả phiên trò chuyện", "clearAllSessionDesc": "Sẽ xóa tất cả dữ liệu phiên và vai trò, bao gồm danh sách phiên, danh sách vai trò, tin nhắn phiên, v.v.", + "languageSetting": "Cài đặt ngôn ngữ", "midColor": "Màu trung tính", "nickname": "Biệt danh", "resetSystemSetting": "Đặt lại cài đặt hệ thống", "resetSystemSettingDesc": "Sẽ đặt lại tất cả cài đặt hệ thống, bao gồm cài đặt chủ đề, cài đặt trò chuyện, cài đặt mô hình ngôn ngữ, v.v.", "systemSetting": "Cài đặt hệ thống", - "languageSetting": "Cài đặt ngôn ngữ", "topicColor": "Màu chủ đề", "topicSetting": "Cài đặt chủ đề" } diff --git a/locales/vi-VN/panel.json b/locales/vi-VN/panel.json index eed3e0f1..6454a217 100644 --- a/locales/vi-VN/panel.json +++ b/locales/vi-VN/panel.json @@ -11,6 +11,8 @@ "info": { "avatarDescription": "Tùy chỉnh hình đại diện, nhấn vào hình đại diện để tải lên", "avatarLabel": "Hình đại diện", + "categoryDescription": "Danh mục nhân vật, dùng để phân loại", + "categoryLabel": "Danh mục", "coverDescription": "Dùng để hiển thị nhân vật trên trang khám phá, kích thước đề xuất {{width}} x {{height}}", "coverLabel": "Bìa", "descDescription": "Mô tả nhân vật, dùng để giới thiệu ngắn gọn về nhân vật", @@ -28,17 +30,29 @@ "readmeDescription": "Tài liệu hướng dẫn về nhân vật, dùng để hiển thị thông tin chi tiết về nhân vật trên trang khám phá", "readmeLabel": "Hướng dẫn nhân vật", "textDescription": "Tùy chỉnh văn bản phản hồi", - "textLabel": "Văn bản", - "categoryLabel": "Danh mục", - "categoryDescription": "Danh mục nhân vật, dùng để phân loại" + "textLabel": "Văn bản" + }, + "llm": { + "frequencyPenaltyDescription": "Giá trị càng lớn, càng có khả năng giảm sự lặp lại của từ ngữ", + "frequencyPenaltyLabel": "Mức phạt tần suất", + "modelDescription": "Chọn mô hình ngôn ngữ, các mô hình khác nhau sẽ ảnh hưởng đến câu trả lời của nhân vật", + "modelLabel": "Mô hình", + "presencePenaltyDescription": "Giá trị càng lớn, càng có khả năng mở rộng sang chủ đề mới", + "presencePenaltyLabel": "Độ mới lạ của chủ đề", + "temperatureDescription": "Giá trị càng lớn, câu trả lời càng ngẫu nhiên", + "temperatureLabel": "Độ ngẫu nhiên", + "topPDescription": "Tương tự như độ ngẫu nhiên, nhưng không nên thay đổi cùng lúc với độ ngẫu nhiên", + "topPLabel": "Lấy mẫu hàng đầu" }, "market": { "findVidol": "Tìm thấy ngôi sao mà bạn yêu thích nhất" }, "nav": { "info": "Thông tin cơ bản", + "llm": "Mô hình ngôn ngữ", "model": "Mô hình 3D", "role": "Thiết lập nhân vật", + "touch": "Chạm", "voice": "Giọng nói" }, "role": { @@ -73,7 +87,7 @@ "selectVoice": "Vui lòng chọn giọng", "speedDescription": "Điều chỉnh tốc độ, giá trị từ 0 đến 3, mặc định là 1", "speedLabel": "Tốc độ", - "transfromSuccess": "Chuyển đổi thành công", + "transformSuccess": "Chuyển đổi thành công", "voiceDescription": "Tùy theo bộ công cụ và ngôn ngữ", "voiceLabel": "Giọng" }, diff --git a/locales/zh-CN/common.json b/locales/zh-CN/common.json index 87e38cd7..0e13b450 100644 --- a/locales/zh-CN/common.json +++ b/locales/zh-CN/common.json @@ -31,11 +31,11 @@ "clearNow": "立即清除", "clearContext": "清除上下文", "clearTip": "操作无法撤销,清除后数据将无法恢复,请慎重操作", - "clearHistoryTip": "该操作不可逆,请谨慎操作", + "clearHistoryTip": "该操作不可逆,请谨慎操作", "clearSuccess": "清除成功", "clearTitle": "确认清除所有会话消息?", "clearHistoryTitle": "确定删除历史消息?", - "resetTip": "操作无法撤销,重置后数据将无法恢复,请慎重操作", + "resetTip": "操作无法撤销,重置后数据将无法恢复,请慎重操作", "resetSuccess": "重置成功", "resetTitle": "确认重置所有系统设置?", "goBottom": "返回底部", @@ -43,7 +43,7 @@ "downloadAvatar": "下载头像", "downloadModel": "下载模型" }, - "aiAlert": "请谨记:智能体所说的一切都是由 AI 生成的", + "aiAlert": "请谨记:智能体所说的一切都是由 AI 生成的", "cancel": "取消", "commonSetting": "通用设置", "confirm": "确定", @@ -51,7 +51,7 @@ "delAlert": "确认删除角色以及相关联的会话消息吗?删除后无法恢复, 请谨慎操作!", "delRole": "删除角色", "delSession": "删除会话", - "delSessionAlert": "确认删除对话吗?删除后无法恢复,请谨慎操作!", + "delSessionAlert": "确认删除对话吗?删除后无法恢复, 请谨慎操作!", "inputStartChat": "请输入内容开始聊天", "languageModel": "语言模型", "loading": "加载中...", @@ -72,7 +72,7 @@ "search": "搜索", "selectInDanceList": "请从舞蹈列表中选取", "selectModel": "请选择模型", - "setLocalStorage": "设置本地存储", + "setLocalStorage": "设置 LocalStorage", "startChat": "开始聊天", "ttsCombine": "语音合成", "ttsTip": "语音识别(需科学上网)", diff --git a/locales/zh-CN/panel.json b/locales/zh-CN/panel.json index a30dfb98..64cf2cb1 100644 --- a/locales/zh-CN/panel.json +++ b/locales/zh-CN/panel.json @@ -22,7 +22,7 @@ "readmeLabel": "角色说明", "readmeDescription": "角色的说明文件,用于发现页展示角色的详细说明", "coverLabel": "封面", - "coverDescription": "用于发现页展示角色,推荐尺寸 {{width}} x {{height}} ", + "coverDescription": "用于发现页展示角色,推荐尺寸 {{width}} * {{height}} ", "textLabel": "文案", "textDescription": "自定义响应文案", "emotionLabel": "表情与情绪", @@ -32,6 +32,18 @@ "categoryLabel": "类别", "categoryDescription": "角色类别,用于展示分类" }, + "llm": { + "modelLabel": "模型", + "modelDescription": "选择语言模型,不同模型会影响角色的回答", + "temperatureLabel": "随机性", + "temperatureDescription": "值越大,回复越随机", + "topPLabel": "核采样", + "topPDescription": "与随机性类型,但不要和随机性一起更改", + "presencePenaltyLabel": "话题新鲜度", + "presencePenaltyDescription": "值越大,越有可能拓展到新话题", + "frequencyPenaltyLabel": "频率惩罚度", + "frequencyPenaltyDescription": "值越大,越有可能降低重复字词" + }, "market": { "findVidol": "找到你最爱的偶像" }, @@ -39,11 +51,12 @@ "info": "基本信息", "role": "角色设定", "voice": "语音", - "model": "3D模型", - "touch": "触摸" + "touch": "触摸", + "llm": "语言模型", + "model": "3D模型" }, "role": { - "uploadSize": "支持单个文件上传,推荐尺寸为 {{width}} x {{height}} 的倍数", + "uploadSize": "支持单个文件上传,推荐尺寸为 {{width}} * {{height}} 的倍数", "greetTip": "请输入角色与你打招呼时的用语", "roleReadmeTip": "请输入角色说明", "roleDescriptionTip": "请输入角色描述", @@ -62,7 +75,7 @@ "touchArea": "触摸区域" }, "tts": { - "transfromSuccess": "转换成功", + "transformSuccess": "转换成功", "selectLanguage": "请先选择语言", "selectVoice": "请先选择语音", "audition": "试听", @@ -73,12 +86,12 @@ "voiceLabel": "语音", "voiceDescription": "根据引擎和语种不同", "speedLabel": "语速", - "speedDescription": "控制语速,取值范围 0 ~ 3,默认为 1", + "speedDescription": "控制语速,取值范围 0 ~ 3,默认为 1", "pitchLabel": "音调", - "pitchDescription": "控制音调,取值范围 0 ~ 2,默认为 1", + "pitchDescription": "控制音调,取值范围 0 ~ 2,默认为 1", "auditionDescription": "试听文案根据语言不同" }, "upload": { - "support": "支持单个文件上传,当前仅支持 vrm 格式文件" + "support": "支持单个文件上传,当前仅支持 .vrm 格式文件" } } diff --git a/locales/zh-TW/common.json b/locales/zh-TW/common.json index 0e5ccbf0..f5aa0bd3 100644 --- a/locales/zh-TW/common.json +++ b/locales/zh-TW/common.json @@ -88,12 +88,12 @@ "chatSetting": "聊天設置", "clearAllSession": "清除所有會話消息", "clearAllSessionDesc": "將會清除所有會話與角色數據,包括會話列表,角色列表、會話消息等", + "languageSetting": "語言設置", "midColor": "中性色", "nickname": "暱稱", "resetSystemSetting": "重置系統設置", "resetSystemSettingDesc": "將會重置所有系統設置,包括主題設置、聊天設置、語言模型設置等", "systemSetting": "系統設置", - "languageSetting": "語言設置", "topicColor": "主題色", "topicSetting": "主題設置" } diff --git a/locales/zh-TW/panel.json b/locales/zh-TW/panel.json index e5fe5383..7ee19da5 100644 --- a/locales/zh-TW/panel.json +++ b/locales/zh-TW/panel.json @@ -11,6 +11,8 @@ "info": { "avatarDescription": "自訂頭像,點擊頭像自訂上傳", "avatarLabel": "頭像", + "categoryDescription": "角色類別,用於展示分類", + "categoryLabel": "類別", "coverDescription": "用於發現頁展示角色,推薦尺寸 {{width}} x {{height}} ", "coverLabel": "封面", "descDescription": "角色描述,用於角色的簡單介紹", @@ -28,17 +30,29 @@ "readmeDescription": "角色的說明文件,用於發現頁展示角色的詳細說明", "readmeLabel": "角色說明", "textDescription": "自定義回應文案", - "textLabel": "文案", - "categoryLabel": "類別", - "categoryDescription": "角色類別,用於展示分類" + "textLabel": "文案" + }, + "llm": { + "frequencyPenaltyDescription": "值越大,越有可能降低重複字詞", + "frequencyPenaltyLabel": "頻率懲罰度", + "modelDescription": "選擇語言模型,不同模型會影響角色的回答", + "modelLabel": "模型", + "presencePenaltyDescription": "值越大,越有可能拓展到新話題", + "presencePenaltyLabel": "話題新鮮度", + "temperatureDescription": "值越大,回覆越隨機", + "temperatureLabel": "隨機性", + "topPDescription": "與隨機性類型,但不要和隨機性一起更改", + "topPLabel": "核採樣" }, "market": { "findVidol": "找到您最愛的偶像" }, "nav": { "info": "基本資訊", + "llm": "語言模型", "model": "3D模型", "role": "角色設定", + "touch": "觸摸", "voice": "語音" }, "role": { @@ -73,7 +87,7 @@ "selectVoice": "請先選擇語音", "speedDescription": "控制語速,取值範圍 0 ~ 3,默認為 1", "speedLabel": "語速", - "transfromSuccess": "轉換成功", + "transformSuccess": "轉換成功", "voiceDescription": "根據引擎和語種不同", "voiceLabel": "語音" }, diff --git a/src/locales/default/panel.ts b/src/locales/default/panel.ts index 7fc08778..f9416f86 100644 --- a/src/locales/default/panel.ts +++ b/src/locales/default/panel.ts @@ -58,7 +58,7 @@ export default { support: '支持单个文件上传,当前仅支持 .vrm 格式文件', }, tts: { - transfromSuccess: '转换成功', + transformSuccess: '转换成功', selectLanguage: '请先选择语言', selectVoice: '请先选择语音', audition: '试听', @@ -74,6 +74,18 @@ export default { pitchDescription: '控制音调,取值范围 0 ~ 2,默认为 1', auditionDescription: '试听文案根据语言不同', }, + llm: { + modelLabel: '模型', + modelDescription: '选择语言模型,不同模型会影响角色的回答', + temperatureLabel: '随机性', + temperatureDescription: '值越大,回复越随机', + topPLabel: '核采样', + topPDescription: '与随机性类型,但不要和随机性一起更改', + presencePenaltyLabel: '话题新鲜度', + presencePenaltyDescription: '值越大,越有可能拓展到新话题', + frequencyPenaltyLabel: '频率惩罚度', + frequencyPenaltyDescription: '值越大,越有可能降低重复字词', + }, nav: { info: '基本信息', role: '角色设定', diff --git a/src/panels/RolePanel/RoleEdit/LangModel/index.tsx b/src/panels/RolePanel/RoleEdit/LangModel/index.tsx index d4899216..09e80736 100644 --- a/src/panels/RolePanel/RoleEdit/LangModel/index.tsx +++ b/src/panels/RolePanel/RoleEdit/LangModel/index.tsx @@ -2,6 +2,7 @@ import { Form, FormProps, SliderWithInput } from '@lobehub/ui'; import React, { memo, useEffect } from 'react'; +import { useTranslation } from 'react-i18next'; import { FORM_STYLE } from '@/constants/token'; import { agentSelectors, useAgentStore } from '@/store/agent'; @@ -11,6 +12,8 @@ import ModelSelect from './ModelSelect'; const LangModel = memo(() => { const [form] = Form.useForm(); + const { t } = useTranslation('panel'); + const { updateAgentConfig } = useAgentStore(); const agent = agentSelectors.currentAgentItem(useAgentStore()); @@ -22,36 +25,36 @@ const LangModel = memo(() => { const model: FormProps['items'] = [ { children: , - desc: 'ChatGPT 模型', - label: '模型', + desc: t('llm.modelDescription'), + label: t('llm.modelLabel'), name: 'model', tag: 'model', }, { children: , - desc: '值越大,回复越随机', - label: '随机性', + desc: t('llm.temperatureDescription'), + label: t('llm.temperatureLabel'), name: ['params', 'temperature'], tag: 'temperature', }, { children: , - desc: '与随机性类型,但不要和随机性一起更改', - label: '核采样', + desc: t('llm.topPDescription'), + label: t('llm.topPLabel'), name: ['params', 'top_p'], tag: 'top_p', }, { children: , - desc: '值越大,越有可能拓展到新话题', - label: '话题新鲜度', + desc: t('llm.presencePenaltyDescription'), + label: t('llm.presencePenaltyLabel'), name: ['params', 'presence_penalty'], tag: 'presence_penalty', }, { children: , - desc: '值越大,越有可能降低重复字词', - label: '频率惩罚度', + desc: t('llm.frequencyPenaltyDescription'), + label: t('llm.frequencyPenaltyLabel'), name: ['params', 'frequency_penalty'], tag: 'frequency_penalty', }, diff --git a/src/panels/RolePanel/RoleEdit/Voice/TTSPlay/index.tsx b/src/panels/RolePanel/RoleEdit/Voice/TTSPlay/index.tsx index 92c63644..545d4b3e 100644 --- a/src/panels/RolePanel/RoleEdit/Voice/TTSPlay/index.tsx +++ b/src/panels/RolePanel/RoleEdit/Voice/TTSPlay/index.tsx @@ -32,7 +32,7 @@ export default memo((props) => { } }, onSuccess: (res) => { - message.success(t('tts.transfromSuccess')); + message.success(t('tts.transformSuccess')); const adUrl = URL.createObjectURL(new Blob([res])); if (ref.current) { ref.current.src = adUrl; From 48ae8258eac1e7626d79cbc95e6e3a5737f8fdc4 Mon Sep 17 00:00:00 2001 From: rdmclin2 Date: Tue, 9 Jul 2024 23:46:34 +0800 Subject: [PATCH 2/2] =?UTF-8?q?:ambulance:=20feat:=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E8=AF=AD=E8=A8=80=E8=AE=BE=E7=BD=AE=E5=AD=98=E5=82=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- locales/bg-BG/common.json | 2 +- locales/de-DE/common.json | 2 +- locales/en-US/common.json | 2 +- locales/es-ES/common.json | 2 +- locales/fr-FR/common.json | 2 +- locales/it-IT/common.json | 2 +- locales/ja-JP/common.json | 2 +- locales/ko-KR/common.json | 2 +- locales/nl-NL/common.json | 2 +- locales/pl-PL/common.json | 2 +- locales/pt-BR/common.json | 2 +- locales/ru-RU/common.json | 2 +- locales/tr-TR/common.json | 2 +- locales/vi-VN/common.json | 2 +- locales/zh-CN/common.json | 2 +- locales/zh-TW/common.json | 2 +- src/features/Settings/common.tsx | 12 ++++++------ .../{LanguageSetting => LocaleSetting}/index.tsx | 15 +++++++++++++-- src/locales/default/common.ts | 2 +- src/store/setting/index.ts | 13 ++++++++++++- src/store/setting/initialState.ts | 1 + src/types/config.ts | 6 ++++++ 22 files changed, 55 insertions(+), 26 deletions(-) rename src/features/Settings/features/{LanguageSetting => LocaleSetting}/index.tsx (55%) diff --git a/locales/bg-BG/common.json b/locales/bg-BG/common.json index 9e60000d..cb5c40d6 100644 --- a/locales/bg-BG/common.json +++ b/locales/bg-BG/common.json @@ -88,7 +88,7 @@ "chatSetting": "Настройки за чат", "clearAllSession": "Изчистване на всички сесии", "clearAllSessionDesc": "Ще бъдат изчистени всички сесии и данни за ролите, включително списъкът със сесии, списъкът с роли, съобщенията на сесиите и т.н.", - "languageSetting": "Настройки за език", + "localeSetting": "Настройки за език", "midColor": "Среден цвят", "nickname": "Прякор", "resetSystemSetting": "Нулиране на системните настройки", diff --git a/locales/de-DE/common.json b/locales/de-DE/common.json index 402d1b3a..07c8a391 100644 --- a/locales/de-DE/common.json +++ b/locales/de-DE/common.json @@ -88,7 +88,7 @@ "chatSetting": "Chat-Einstellungen", "clearAllSession": "Alle Sitzungsnachrichten löschen", "clearAllSessionDesc": "Alle Sitzungen und Rollendaten werden gelöscht, einschließlich Sitzungsliste, Rollenliste und Sitzungsnachrichten", - "languageSetting": "Spracheinstellungen", + "localeSetting": "Spracheinstellungen", "midColor": "Mittlere Farbe", "nickname": "Spitzname", "resetSystemSetting": "Systemeinstellungen zurücksetzen", diff --git a/locales/en-US/common.json b/locales/en-US/common.json index 1842de68..322457c7 100644 --- a/locales/en-US/common.json +++ b/locales/en-US/common.json @@ -88,7 +88,7 @@ "chatSetting": "Chat Settings", "clearAllSession": "Clear All Session Messages", "clearAllSessionDesc": "This will clear all session and role data, including session list, role list, session messages, etc.", - "languageSetting": "Language Settings", + "localeSetting": "Language Settings", "midColor": "Neutral Color", "nickname": "Nickname", "resetSystemSetting": "Reset System Settings", diff --git a/locales/es-ES/common.json b/locales/es-ES/common.json index 0c94d38e..29d5a1d9 100644 --- a/locales/es-ES/common.json +++ b/locales/es-ES/common.json @@ -88,7 +88,7 @@ "chatSetting": "Configuración de chat", "clearAllSession": "Limpiar todas las conversaciones", "clearAllSessionDesc": "Esto eliminará todas las conversaciones y datos de rol, incluidas las listas de conversaciones, roles y mensajes de conversación.", - "languageSetting": "Configuración de idioma", + "localeSetting": "Configuración de idioma", "midColor": "Color neutro", "nickname": "Apodo", "resetSystemSetting": "Restablecer configuración del sistema", diff --git a/locales/fr-FR/common.json b/locales/fr-FR/common.json index e432d1ac..a1498930 100644 --- a/locales/fr-FR/common.json +++ b/locales/fr-FR/common.json @@ -88,7 +88,7 @@ "chatSetting": "Paramètres de conversation", "clearAllSession": "Effacer toutes les sessions", "clearAllSessionDesc": "Cela effacera toutes les données de session et de rôle, y compris la liste des sessions, la liste des rôles, les messages de session, etc.", - "languageSetting": "Paramètres de langue", + "localeSetting": "Paramètres de langue", "midColor": "Couleur neutre", "nickname": "Pseudo", "resetSystemSetting": "Réinitialiser les paramètres système", diff --git a/locales/it-IT/common.json b/locales/it-IT/common.json index 06ccd566..a31f7d15 100644 --- a/locales/it-IT/common.json +++ b/locales/it-IT/common.json @@ -88,7 +88,7 @@ "chatSetting": "Impostazioni chat", "clearAllSession": "Cancella tutte le sessioni", "clearAllSessionDesc": "Cancella tutti i dati delle sessioni e dei ruoli, inclusi elenchi di sessioni, elenchi di ruoli, messaggi di sessione, ecc.", - "languageSetting": "Impostazioni lingua", + "localeSetting": "Impostazioni lingua", "midColor": "Colore neutro", "nickname": "Soprannome", "resetSystemSetting": "Ripristina impostazioni di sistema", diff --git a/locales/ja-JP/common.json b/locales/ja-JP/common.json index 35c78d9c..fbe53cf2 100644 --- a/locales/ja-JP/common.json +++ b/locales/ja-JP/common.json @@ -88,7 +88,7 @@ "chatSetting": "チャット設定", "clearAllSession": "すべてのセッションをクリア", "clearAllSessionDesc": "会話リスト、役割リスト、セッションメッセージなどを含むすべてのセッションと役割データを削除します", - "languageSetting": "言語設定", + "localeSetting": "言語設定", "midColor": "中間色", "nickname": "ニックネーム", "resetSystemSetting": "システム設定をリセット", diff --git a/locales/ko-KR/common.json b/locales/ko-KR/common.json index 979d26ed..7b249271 100644 --- a/locales/ko-KR/common.json +++ b/locales/ko-KR/common.json @@ -88,7 +88,7 @@ "chatSetting": "채팅 설정", "clearAllSession": "모든 대화 메시지 지우기", "clearAllSessionDesc": "대화 목록, 역할 목록, 대화 메시지 등 모든 대화와 역할 데이터를 지웁니다.", - "languageSetting": "언어 설정", + "localeSetting": "언어 설정", "midColor": "중간 색상", "nickname": "닉네임", "resetSystemSetting": "시스템 설정 재설정", diff --git a/locales/nl-NL/common.json b/locales/nl-NL/common.json index 0d8c7db0..07b53e96 100644 --- a/locales/nl-NL/common.json +++ b/locales/nl-NL/common.json @@ -88,7 +88,7 @@ "chatSetting": "Chatinstellingen", "clearAllSession": "Verwijder alle gespreksberichten", "clearAllSessionDesc": "Zal alle gesprekken en rolgegevens wissen, inclusief gesprekslijst, rollijst, gespreksberichten, enz.", - "languageSetting": "Taalinstellingen", + "localeSetting": "Taalinstellingen", "midColor": "Middenkleur", "nickname": "Bijnaam", "resetSystemSetting": "Reset systeeminstellingen", diff --git a/locales/pl-PL/common.json b/locales/pl-PL/common.json index 49358d08..0f6a9dbf 100644 --- a/locales/pl-PL/common.json +++ b/locales/pl-PL/common.json @@ -88,7 +88,7 @@ "chatSetting": "Ustawienia czatu", "clearAllSession": "Wyczyść wszystkie wiadomości sesji", "clearAllSessionDesc": "Spowoduje usunięcie wszystkich danych sesji i postaci, w tym listy rozmów, listy postaci, wiadomości sesji itp.", - "languageSetting": "Ustawienia języka", + "localeSetting": "Ustawienia języka", "midColor": "Kolor średni", "nickname": "Nazwa użytkownika", "resetSystemSetting": "Resetuj ustawienia systemowe", diff --git a/locales/pt-BR/common.json b/locales/pt-BR/common.json index a9b3f635..a223317e 100644 --- a/locales/pt-BR/common.json +++ b/locales/pt-BR/common.json @@ -88,7 +88,7 @@ "chatSetting": "Configuração de chat", "clearAllSession": "Limpar todas as mensagens da sessão", "clearAllSessionDesc": "Isso limpará todas as conversas e dados de papel, incluindo listas de conversas, listas de papéis, mensagens de conversa, etc.", - "languageSetting": "Configuração de idioma", + "localeSetting": "Configuração de idioma", "midColor": "Cor neutra", "nickname": "Apelido", "resetSystemSetting": "Redefinir configurações do sistema", diff --git a/locales/ru-RU/common.json b/locales/ru-RU/common.json index 3c20356a..7d114c0e 100644 --- a/locales/ru-RU/common.json +++ b/locales/ru-RU/common.json @@ -88,7 +88,7 @@ "chatSetting": "Настройки чата", "clearAllSession": "Очистить все сессии", "clearAllSessionDesc": "Это очистит все данные сессий и ролей, включая список сессий, список ролей и сообщения сессий.", - "languageSetting": "Настройки языка", + "localeSetting": "Настройки языка", "midColor": "Средний цвет", "nickname": "Никнейм", "resetSystemSetting": "Сбросить системные настройки", diff --git a/locales/tr-TR/common.json b/locales/tr-TR/common.json index 1b1ec694..c1984d1b 100644 --- a/locales/tr-TR/common.json +++ b/locales/tr-TR/common.json @@ -88,7 +88,7 @@ "chatSetting": "Sohbet Ayarları", "clearAllSession": "Tüm Oturumları Temizle", "clearAllSessionDesc": "Tüm oturumları ve rol verilerini, oturum listelerini, rol listelerini, oturum mesajlarını vb. temizleyecektir", - "languageSetting": "Dil Ayarları", + "localeSetting": "Dil Ayarları", "midColor": "Orta Renk", "nickname": "Takma Ad", "resetSystemSetting": "Sistem Ayarlarını Sıfırla", diff --git a/locales/vi-VN/common.json b/locales/vi-VN/common.json index 256d7e25..c8104b9b 100644 --- a/locales/vi-VN/common.json +++ b/locales/vi-VN/common.json @@ -88,7 +88,7 @@ "chatSetting": "Cài đặt trò chuyện", "clearAllSession": "Xóa tất cả phiên trò chuyện", "clearAllSessionDesc": "Sẽ xóa tất cả dữ liệu phiên và vai trò, bao gồm danh sách phiên, danh sách vai trò, tin nhắn phiên, v.v.", - "languageSetting": "Cài đặt ngôn ngữ", + "localeSetting": "Cài đặt ngôn ngữ", "midColor": "Màu trung tính", "nickname": "Biệt danh", "resetSystemSetting": "Đặt lại cài đặt hệ thống", diff --git a/locales/zh-CN/common.json b/locales/zh-CN/common.json index 0e13b450..360ea497 100644 --- a/locales/zh-CN/common.json +++ b/locales/zh-CN/common.json @@ -81,7 +81,7 @@ "chatSetting": "聊天设置", "topicSetting": "主题设置", "systemSetting": "系统设置", - "languageSetting": "语言设置", + "localeSetting": "语言设置", "resetSystemSetting": "重置系统设置", "resetSystemSettingDesc": "将会重置所有系统设置,包括主题设置、聊天设置、语言模型设置等", "clearAllSession": "清除所有会话消息", diff --git a/locales/zh-TW/common.json b/locales/zh-TW/common.json index f5aa0bd3..096d108b 100644 --- a/locales/zh-TW/common.json +++ b/locales/zh-TW/common.json @@ -88,7 +88,7 @@ "chatSetting": "聊天設置", "clearAllSession": "清除所有會話消息", "clearAllSessionDesc": "將會清除所有會話與角色數據,包括會話列表,角色列表、會話消息等", - "languageSetting": "語言設置", + "localeSetting": "語言設置", "midColor": "中性色", "nickname": "暱稱", "resetSystemSetting": "重置系統設置", diff --git a/src/features/Settings/common.tsx b/src/features/Settings/common.tsx index d1ca6fc3..413005b6 100644 --- a/src/features/Settings/common.tsx +++ b/src/features/Settings/common.tsx @@ -8,7 +8,7 @@ import { useTranslation } from 'react-i18next'; import ClearSession from '@/features/Actions/ClearSession'; import ResetConfig from '@/features/Actions/ResetConfig'; import BackgroundEffect from '@/features/Settings/features/BackgroundEffect'; -import LanguageSetting from '@/features/Settings/features/LanguageSetting'; +import LocaleSetting from '@/features/Settings/features/LocaleSetting'; import NickName from '@/features/Settings/features/NickName'; import ThemeSwatchesNetural from '@/features/Settings/features/ThemeSwatchesNetural'; import ThemeSwatchesPrimary from '@/features/Settings/features/ThemeSwatchesPrimary'; @@ -54,10 +54,13 @@ const CommonConfig = (props: CommonConfigProps) => { + + + @@ -78,9 +81,6 @@ const CommonConfig = (props: CommonConfigProps) => { > - - - ((props) => { const { t } = useTranslation('features'); const options = [{ label: t('theme.auto'), value: 'auto' }, ...localeOptions]; - return + ); }); diff --git a/src/locales/default/common.ts b/src/locales/default/common.ts index 57aebdf9..d57ead07 100644 --- a/src/locales/default/common.ts +++ b/src/locales/default/common.ts @@ -81,7 +81,7 @@ export default { chatSetting: '聊天设置', topicSetting: '主题设置', systemSetting: '系统设置', - languageSetting: '语言设置', + localeSetting: '语言', resetSystemSetting: '重置系统设置', resetSystemSettingDesc: '将会重置所有系统设置,包括主题设置、聊天设置、语言模型设置等', clearAllSession: '清除所有会话消息', diff --git a/src/store/setting/index.ts b/src/store/setting/index.ts index e5ca325f..e63e1a23 100644 --- a/src/store/setting/index.ts +++ b/src/store/setting/index.ts @@ -7,7 +7,9 @@ import { createWithEqualityFn } from 'zustand/traditional'; import { StateCreator } from 'zustand/vanilla'; import { BackgroundEffect, Config, OpenAIConfig } from '@/types/config'; +import { LocaleMode } from '@/types/locale'; import storage from '@/utils/storage'; +import { switchLang } from '@/utils/switchLang'; import { SettingState, initialState } from './initialState'; @@ -43,7 +45,6 @@ export interface SettingAction { * @param nickName */ setNickName: (nickName: string) => void; - /** * Set OpenAI config * @param config @@ -55,6 +56,12 @@ export interface SettingAction { * @param primaryColor */ setPrimaryColor: (primaryColor: PrimaryColors) => void; + + /** + * Switch locale + * @param locale + */ + switchLocale: (locale: LocaleMode) => void; } export interface SettingStore extends SettingState, SettingAction {} @@ -81,6 +88,10 @@ const createStore: StateCreator = ( setNickName: (nickName) => { get().setConfig({ nickName }); }, + switchLocale: (locale) => { + get().setConfig({ locale }); + switchLang(locale); + }, setConfig: (config) => { const prevSetting = get().config; const nextSetting = produce(prevSetting, (draftState) => { diff --git a/src/store/setting/initialState.ts b/src/store/setting/initialState.ts index dc4afbc2..31b0e06d 100644 --- a/src/store/setting/initialState.ts +++ b/src/store/setting/initialState.ts @@ -6,6 +6,7 @@ export interface SettingState { const initialState: SettingState = { config: { + locale: 'auto', backgroundEffect: 'glow', languageModel: { openAI: { diff --git a/src/types/config.ts b/src/types/config.ts index c7b13a24..a3515360 100644 --- a/src/types/config.ts +++ b/src/types/config.ts @@ -1,6 +1,8 @@ import { Coordinates } from '@dnd-kit/utilities'; import { NeutralColors, PrimaryColors } from '@lobehub/ui'; +import { LocaleMode } from '@/types/locale'; + export type BackgroundEffect = 'glow' | 'none'; export interface Panel { @@ -48,6 +50,10 @@ export interface CommonConfig { * 背景类型 */ backgroundEffect?: BackgroundEffect; + /** + * 语言地区 + */ + locale: LocaleMode; /** * 中性色 */