Merge pull request #2708 from Yokayo/staging Update ru-ru translation

07a6e1aa53771432e53b8ba7909e02feb43f3b57

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

Signed
7 files changed, +83 -33Ignore whitespace
public/index.html+1 -1
@@ -4097,7 +4097,7 @@
40974097 <input id="movingUImode" type="checkbox" />
40984098 <small data-i18n="Movable UI Panels">MovingUI&nbsp;<i class="fa-solid fa-desktop"></i></small>
40994099 </label>
41004100 <div data-newbie-hidden id="movingUIreset" title="Reset MovingUI panel sizes/locations." class="menu_button margin0" data-i18n="[title]Reset MovingUI panel sizes/locations."><i class=" fa-solid fa-recycle margin-r5"></i> <span data-i18n="mui_reset">Reset</span></div>
41014101 </div>
41024102 <div data-newbie-hidden id="MovingUI-presets-block" class="flex-container alignitemscenter">
41034103 <div class="flex-container alignItemsFlexEnd">
public/locales/ru-ru.json+54 -7
@@ -43,7 +43,7 @@
4343 "Smoothing Factor": "Коэффициент сглаживания",
4444 "No Repeat Ngram Size": "Размер no_repeat_ngram",
4545 "Min Length": "Мин. длина",
4646 "Alternative server URL (leave empty to use the default value).": "Альтернативный URL альтернативного сервера (оставьте пустым для стандартного значения)",
4747 "Remove your real OAI API Key from the API panel BEFORE typing anything into this box": "Удалите свой личный OAI API Key из панели API, и ТОЛЬКО ПОСЛЕ ЭТОГО вводите что-то сюда",
4848 "We cannot provide support for problems encountered while using an unofficial OpenAI proxy": "Мы не сможем предоставить помощь с проблемами, с которыми вы столкнетесь при использовании неофициальных прокси для OpenAI",
4949 "Context Size (tokens)": "Размер контекста (в токенах)",
@@ -186,7 +186,7 @@
186186 "Generate only one line per request": "Генерировать одну строку на запрос",
187187 "Misc. Settings": "Доп. настройки",
188188 "Auto-Continue": "Авто-продолжение",
189189 "Collapse Consecutive Newlines": "Сворачивать последовательныенеск. новыеновых строкистрок в одну",
190190 "Allow for Chat Completion APIs": "Разрешить для Chat Completion API",
191191 "Target length (tokens)": "Целевая длина (в токенах)",
192192 "World Info": "Информация о мире",
@@ -373,7 +373,7 @@
373373 "Prefer Character Card Prompt": "Приоритет промпту из карточки персонажа",
374374 "Prefer Character Card Jailbreak": "Приоритет джейлбрейку из карточки персонажа",
375375 "Press Send to continue": "Кнопка отправки продолжает сообщение",
376376 "Quick 'Continue' button": "Кнопка быстрогоБыстрое продолженияпродолжение",
377377 "Log prompts to console": "Выводить промпты в консоль",
378378 "Never resize avatars": "Не менять размер аватарок",
379379 "Show avatar filenames": "Показывать названия файлов аватарок",
@@ -495,7 +495,7 @@
495495 "(Write a comma-separated list of tags)": "(Список тегов через запятую)",
496496 "(A brief description of the personality)": "(Краткое описание личности)",
497497 "(Circumstances and context of the interaction)": "(Обстоятельства и контекст этого диалога)",
498498 "(Examples of chat dialog. Begin each example with START on a new line.)": "(Примеры диалога. Начинайте каждый пример с START или новой линиейстрокой.)",
499499 "Type here...": "Пишите здесь...",
500500 "Comma separated (required)": "Через запятую (обязательное поле)",
501501 "What this keyword should mean to the AI, sent verbatim": "Что это ключевое слово должно означать для ИИ, отправляется дословно",
@@ -552,7 +552,7 @@
552552 "Click to set a new User Name": "Нажмите, чтобы задать новое имя пользователя.",
553553 "Click to lock your selected persona to the current chat. Click again to remove the lock.": "Нажмите, чтобы закрепить выбранную персону для текущего чата. Нажмите еще раз, чтобы открепить.",
554554 "Click to set user name for all messages": "Нажмите, чтобы задать имя пользователя для всех сообщений.",
555555 "Create a dummy persona": "Создать пустую персону-болванку",
556556 "Character Management": "Управление персонажами",
557557 "Locked = Character Management panel will stay open": "Закреплено = Панель управление персонажами останется открытой",
558558 "Select/Create Characters": "Выбрать/Создать персонажа",
@@ -625,7 +625,7 @@
625625 "Automatically select a background based on the chat context": "Автоматический выбор фона в зависимости от контекста чата",
626626 "Filter": "Фильтр",
627627 "Exclude message from prompts": "Исключить сообщение из промпта",
628628 "Include message in prompts": "Включить сообщение в подсказкипромпт",
629629 "Create checkpoint": "Создать чекпоинт",
630630 "Create Branch": "Создать ветку",
631631 "Embed file or image": "Вставить файл или изображение",
@@ -1661,5 +1661,52 @@
16611661 "ext_regex_ai_output_desc": "Сообщения, полученные от API",
16621662 "ext_regex_sts_desc": "Сообщения, отправленные с помощью команд STscript",
16631663 "ext_regex_wi_desc": "Содержимое лорбуков и миров. Для работы требует включения флажка \"Только промпт\"!",
16641664 "ext_regex_only_format_display_desc": "История чата не изменится, замена будет осуществляться только в отображаемом сообщении (в UI)",
1665+ "Prefer Character Card Instructions": "Приоритет инструкциям из карточек",
1666+ "If checked and the character card contains a Post-History Instructions override, use that instead": "Если в карточке персонажа имеется собственная инструкция после истории, в промпт попадёт именно она",
1667+ "Auto-select Input Text": "Автовыделение вводимого текста",
1668+ "Enable auto-select of input text in some text fields when clicking/selecting them. Applies to popup input textboxes, and possible other custom input fields.": "Автоматически выделять вводимый текст в некоторых текстовых полях при клике/выборе. Работает для вспл. окон и различных кастомных полей ввода.",
1669+ "Reset MovingUI panel sizes/locations.": "Сбросить расположение и размеры панелей MovingUI.",
1670+ "mui_reset": "Сброс",
1671+ "Quick 'Impersonate' button": "Быстрое перевоплощение",
1672+ "Show a button in the input area to ask the AI to impersonate your character for a single message": "Показать в поле ввода кнопку, по нажатии на которую ИИ сгенерирует одно сообщение от лица вашего персонажа.",
1673+ "Separators as Stop Strings": "Разделители как стоп-строки",
1674+ "Names as Stop Strings": "Имена как стоп-строки",
1675+ "Add Character and User names to a list of stopping strings.": "Добавлять имена персонажа и пользователя в список стоп-строк.",
1676+ "Allow Post-History Instructions": "Разрешить инструкции после истории",
1677+ "context_allow_post_history_instructions": "Добавлять в конец промпта инструкции после истории. Работает только при наличии таких инструкций в карточке И при включенной опции ''Приоритет инструкциям из карточек''.\nНЕ РЕКОМЕНДУЕТСЯ ДЛЯ МОДЕЛЕЙ TEXT COMPLETION, МОЖЕТ ПОРТИТЬ ВЫХОДНОЙ ТЕКСТ.",
1678+ "First User Prefix": "Первый префикс пользователя",
1679+ "Inserted before the first User's message.": "Вставляется перед первым сообщением пользователя.",
1680+ "Last User Prefix": "Последний префикс пользователя",
1681+ "instruct_last_input_sequence": "Вставляется перед последним сообщением пользователя.",
1682+ "Inserted before a User message and as a last prompt line when impersonating.": "Вставляется перед сообщением пользователя в качестве последней строки промпта при перевоплощении.",
1683+ "Inserted before a System (added by slash commands or extensions) message.": "Вставляется перед сообщением системы (может быть добавлено слэш-командой или расширением).",
1684+ "Load Asset List": "Загрузить список ресурсов",
1685+ "Never add character names.": "Не вставлять имя персонажа.",
1686+ "Don't add character names unless necessary.": "Вставлять имя персонажа только когда это необходимо.",
1687+ "character_names_none": "Не добавлять имена персонажей в качестве префикса. Может повредить качеству ответов в групповых чатах, используйте с осторожностью.",
1688+ "Auxiliary": "Вспомогательный",
1689+ "Post-History Instructions": "Инструкции после истории",
1690+ "Current persona updated": "Текущая персона изменена",
1691+ "Your messages will now be sent as ${0}": "Ваши сообщения будут отправляться от лица ${0}",
1692+ "Copied!": "Скопировано!",
1693+ "Are you sure you want to delete this message?": "Вы точно хотите удалить это сообщение?",
1694+ "Delete Message": "Удалить сообщение",
1695+ "Delete Swipe": "Удалить свайп",
1696+ "Could not get a reply from API. Check your connection settings / API key and try again.": "Не удалось получить ответ от API. Проверьте настройки соединения и API-ключ и повторите попытку.",
1697+ "Connecting To Proxy": "Подключение к прокси",
1698+ "Are you sure you want to connect to the following proxy URL?": "Вы точно хотите соединиться с прокси по этому адресу?",
1699+ "API connection successful!": "Соединение с API установлено!",
1700+ "Proxy Saved": "Прокси сохранена",
1701+ "Proxy Deleted": "Прокси удалена",
1702+ "Could not find proxy with name '${0}'": "Не удалось найти прокси с названием '${0}'",
1703+ "Proxy preset '${0}' not found in proxies array.": "Пресет с названием '${0}' не найден в списке прокси.",
1704+ "Please wait for the previous request to complete.": "Пожалуйста, дождитесь окончания обработки предыдущего запроса.",
1705+ "Start new chat?": "Начать новый чат?",
1706+ "If necessary, you can later restore this chat file from the /backups folder": "При необходимости этот чат можно будет восстановить из папки /backups",
1707+ "Also delete the current chat file": "Также удалить текущий чат",
1708+ "chat_rename_1": "Введите новое имя чата:",
1709+ "chat_rename_2": "!!Не используйте имя уже существующего файла, это приведёт к ошибке!!",
1710+ "chat_rename_3": "Будут разрушены связи между чатами-чекпоинтами.",
1711+ "chat_rename_4": "Расширение '.jsonl' дописывать не нужно."
16651712}
public/script.js+8 -17
@@ -2192,7 +2192,7 @@ export function addCopyToCodeBlocks(messageElement) {
21922192 codeBlocks.get(i).appendChild(copyButton);
21932193 copyButton.addEventListener('pointerup', function (event) {
21942194 navigator.clipboard.writeText(codeBlocks.get(i).innerText);
21952195 toastr.info('t`Copied!'`, '', { timeOut: 2000 });
21962196 });
21972197 }
21982198 }
@@ -5080,7 +5080,7 @@ async function promptItemize(itemizedPrompts, requestedMesId) {
50805080 }
50815081
50825082 navigator.clipboard.writeText(rawPromptValues);
50835083 toastr.info('t`Copied!'`);
50845084 });
50855085
50865086 popup.dlg.querySelector('#showRawPrompt').addEventListener('click', function () {
@@ -6310,7 +6310,7 @@ export function setUserName(value) {
63106310 console.log(`User name changed to ${name1}`);
63116311 $('#your_name').val(name1);
63126312 if (power_user.persona_show_notifications) {
63136313 toastr.success(t`Your messages will now be sent as ${name1}`, 't`Current persona updated'`);
63146314 }
63156315 saveSettingsDebounced();
63166316}
@@ -9532,11 +9532,7 @@ jQuery(async function () {
95329532 const oldFileNameFull = $(this).closest('.select_chat_block_wrapper').find('.select_chat_block_filename').text();
95339533 const oldFileName = oldFileNameFull.replace('.jsonl', '');
95349534
9535- const popupText = `<h3>Enter the new name for the chat:<h3>
9535+ const popupText = await renderTemplateAsync('chatRename');
9536- <small>!!Using an existing filename will produce an error!!<br>
9537- This will break the link between checkpoint chats.<br>
9538- No need to add '.jsonl' at the end.<br>
9539- </small>`;
95409536 const newName = await callPopup(popupText, 'input', oldFileName);
95419537
95429538 if (!newName || newName == oldFileName) {
@@ -9744,12 +9740,7 @@ jQuery(async function () {
97449740 else if (id == 'option_start_new_chat') {
97459741 if ((selected_group || this_chid !== undefined) && !is_send_press) {
97469742 let deleteCurrentChat = false;
97479743 const result = await Popup.show.confirm('t`Start new chat?`, await renderTemplateAsync('newChatConfirm'), `{
9748- <label for="del_chat_checkbox" class="checkbox_label justifyCenter"
9749- title="If necessary, you can later restore this chat file from the /backups folder">
9750- <input type="checkbox" id="del_chat_checkbox" />
9751- <small>Also delete the current chat file</small>
9752- </label>`, {
97539744 onClose: () => deleteCurrentChat = !!$('#del_chat_checkbox').prop('checked'),
97549745 });
97559746 if (!result) {
@@ -10261,10 +10252,10 @@ jQuery(async function () {
1026110252
1026210253 let deleteOnlySwipe = false;
1026310254 if (power_user.confirm_message_delete && fromSlashCommand !== true) {
1026410255 const result = await callGenericPopup('t`Are you sure you want to delete this message?'`, POPUP_TYPE.CONFIRM, null, {
1026510256 okButton: canDeleteSwipe ? 't`Delete Swipe'` : 't`Delete Message'`,
1026610257 cancelButton: 'Cancel',
1026710258 customButtons: canDeleteSwipe ? ['t`Delete Message'`] : null,
1026810259 });
1026910260 if (!result) {
1027010261 return;
public/scripts/openai.js+9 -8
@@ -74,6 +74,7 @@ import { ARGUMENT_TYPE, SlashCommandArgument } from './slash-commands/SlashComma
7474import { renderTemplateAsync } from './templates.js';
7575import { SlashCommandEnumValue } from './slash-commands/SlashCommandEnumValue.js';
7676import { Popup, POPUP_RESULT } from './popup.js';
77+import { t } from './i18n.js';
7778
7879export {
7980 openai_messages_count,
@@ -402,7 +403,7 @@ async function validateReverseProxy() {
402403 const rememberKey = `Proxy_SkipConfirm_${getStringHash(oai_settings.reverse_proxy)}`;
403404 const skipConfirm = localStorage.getItem(rememberKey) === 'true';
404405
405406 const confirmation = skipConfirm || await Popup.show.confirm('t`Connecting To Proxy', `<span>Are you sure you want to connect, toawait therenderTemplateAsync('proxyConnectionWarning', following{ proxyproxyURL: URL?</span><var>${DOMPurify.sanitize(oai_settings.reverse_proxy) }</var>`));
406407
407408 if (!confirmation) {
408409 toastr.error('Update or remove your reverse proxy settings.');
@@ -4624,17 +4625,17 @@ function toggleChatCompletionForms() {
46244625async function testApiConnection() {
46254626 // Check if the previous request is still in progress
46264627 if (is_send_press) {
46274628 toastr.info('t`Please wait for the previous request to complete.'`);
46284629 return;
46294630 }
46304631
46314632 try {
46324633 const reply = await sendOpenAIRequest('quiet', [{ 'role': 'user', 'content': 'Hi' }]);
46334634 console.log(reply);
46344635 toastr.success('t`API connection successful!'`);
46354636 }
46364637 catch (err) {
46374638 toastr.error('t`Could not get a reply from API. Check your connection settings / API key and try again.'`);
46384639 }
46394640}
46404641
@@ -4791,7 +4792,7 @@ function onProxyPresetChange() {
47914792 if (selectedPreset) {
47924793 setProxyPreset(selectedPreset.name, selectedPreset.url, selectedPreset.password);
47934794 } else {
47944795 console.error(t`Proxy preset "'${value}"' not found in proxies array.`);
47954796 }
47964797 saveSettingsDebounced();
47974798}
@@ -4803,7 +4804,7 @@ $('#save_proxy').on('click', async function () {
48034804
48044805 setProxyPreset(presetName, reverseProxy, proxyPassword);
48054806 saveSettingsDebounced();
48064807 toastr.success('t`Proxy Saved'`);
48074808 if ($('#openai_proxy_preset').val() !== presetName) {
48084809 const option = document.createElement('option');
48094810 option.text = presetName;
@@ -4837,9 +4838,9 @@ $('#delete_proxy').on('click', async function () {
48374838
48384839 saveSettingsDebounced();
48394840 $('#openai_proxy_preset').val(selected_proxy.name);
48404841 toastr.success('t`Proxy Deleted'`);
48414842 } else {
48424843 toastr.error(t`Could not find proxy with name "'${presetName}"'`);
48434844 }
48444845});
48454846
public/scripts/templates/chatRename.html+6 -0
@@ -0,0 +1,6 @@
1+<h3 data-i18n="chat_rename_1">Enter the new name for the chat:</h3>
2+<small>
3+ <span data-i18n="chat_rename_2">!!Using an existing filename will produce an error!!</span><br>
4+ <span data-i18n="chat_rename_3">This will break the link between checkpoint chats.</span><br>
5+ <span data-i18n="chat_rename_4">No need to add '.jsonl' at the end.</span><br>
6+</small>
6 \ No newline at end of file
public/scripts/templates/newChatConfirm.html+4 -0
@@ -0,0 +1,4 @@
1+<label for="del_chat_checkbox" class="checkbox_label justifyCenter" data-i18n="[title]If necessary, you can later restore this chat file from the /backups folder" title="If necessary, you can later restore this chat file from the /backups folder">
2+ <input type="checkbox" id="del_chat_checkbox" />
3+ <small data-i18n="Also delete the current chat file">Also delete the current chat file</small>
4+</label>
4 \ No newline at end of file
public/scripts/templates/proxyConnectionWarning.html+1 -0
@@ -0,0 +1 @@
1+<span data-i18n="Are you sure you want to connect to the following proxy URL?">Are you sure you want to connect to the following proxy URL?</span><var>{{proxyURL}}</var>
1 \ No newline at end of file