Localization improvements

8b82325d3099e0e2bb565820bf59b4eb0080799e

Cohee <18619528+Cohee1207@users.noreply.github.com>

2 files changed, +13 -12Showing whitespace changes
public/locales/ru-ru.json+1 -0
@@ -965,6 +965,7 @@
965 "char_import_5": "Персонаж с AICharacterCards.com (прямая ссылка или ID)",965 "char_import_5": "Персонаж с AICharacterCards.com (прямая ссылка или ID)",
966 "char_import_6": "Прямая ссылка на PNG-файл (список разрешённых хостов находится в",966 "char_import_6": "Прямая ссылка на PNG-файл (список разрешённых хостов находится в",
967 "char_import_7": ")",967 "char_import_7": ")",
968 "char_import_9": "Персонаж с Soulkyn (прямая ссылка)",
968 "Grammar String": "Грамматика",969 "Grammar String": "Грамматика",
969 "GBNF or EBNF, depends on the backend in use. If you're using this you should know which.": "GBNF или EBNF, зависит от бэкенда. Если вы это используете, то, скорее всего, сами знаете, какой именно.",970 "GBNF or EBNF, depends on the backend in use. If you're using this you should know which.": "GBNF или EBNF, зависит от бэкенда. Если вы это используете, то, скорее всего, сами знаете, какой именно.",
970 "Account": "Аккаунт",971 "Account": "Аккаунт",
public/script.js+12 -12
@@ -673,16 +673,8 @@ export const extension_prompt_roles = {
673673
674export const MAX_INJECTION_DEPTH = 10000;674export const MAX_INJECTION_DEPTH = 10000;
675675
676const SAFETY_CHAT = [676// Initialized in getSystemMessages()
677 {677const SAFETY_CHAT = [];
678 name: systemUserName,
679 force_avatar: system_avatar,
680 is_system: true,
681 is_user: false,
682 create_date: 0,
683 mes: () => t`You deleted a character/chat and arrived back here for safety reasons! Pick another character!`,
684 },
685];
686678
687export let system_messages = {};679export let system_messages = {};
688680
@@ -769,6 +761,16 @@ async function getSystemMessages() {
769 },761 },
770 },762 },
771 };763 };
764
765 const safetyMessage = {
766 name: systemUserName,
767 force_avatar: system_avatar,
768 is_system: true,
769 is_user: false,
770 create_date: 0,
771 mes: t`You deleted a character/chat and arrived back here for safety reasons! Pick another character!`,
772 };
773 SAFETY_CHAT.splice(0, SAFETY_CHAT.length, safetyMessage);
772}774}
773775
774async function getClientVersion() {776async function getClientVersion() {
@@ -6747,8 +6749,6 @@ export function resetChatState() {
6747 name2 = (this_chid === undefined && neutralCharacterName) ? neutralCharacterName : systemUserName;6749 name2 = (this_chid === undefined && neutralCharacterName) ? neutralCharacterName : systemUserName;
6748 //unsets expected chid before reloading (related to getCharacters/printCharacters from using old arrays)6750 //unsets expected chid before reloading (related to getCharacters/printCharacters from using old arrays)
6749 setCharacterId(undefined);6751 setCharacterId(undefined);
6750 // translate system user's message before diaplaying
6751 SAFETY_CHAT[0].mes = SAFETY_CHAT[0].mes();
6752 // sets up system user to tell user about having deleted a character6752 // sets up system user to tell user about having deleted a character
6753 chat.splice(0, chat.length, ...SAFETY_CHAT);6753 chat.splice(0, chat.length, ...SAFETY_CHAT);
6754 // resets chat metadata6754 // resets chat metadata