Update tl

bb766494786a4c64f0949c2fa9740d699e21b50a

Yokayo <nonameutubecomm@gmail.com>

5 files changed, +69 -23Ignore whitespace
public/index.html+6 -6
@@ -3275,7 +3275,7 @@
3275 <label>3275 <label>
3276 <small>3276 <small>
3277 <span data-i18n="Activation Regex">Activation Regex</span>3277 <span data-i18n="Activation Regex">Activation Regex</span>
3278 <span class="fa-solid fa-circle-question" title="When connecting to an API or choosing a model, automatically activate this Instruct Template if the model name matches the provided regular expression."></span>3278 <span class="fa-solid fa-circle-question" data-i18n="[title]instruct_template_activation_regex_desc" title="When connecting to an API or choosing a model, automatically activate this Instruct Template if the model name matches the provided regular expression."></span>
3279 </small>3279 </small>
3280 </label>3280 </label>
3281 <div>3281 <div>
@@ -3316,7 +3316,7 @@
3316 </h4>3316 </h4>
3317 <!-- We keep one auto-open so the user would know what is going on in the picked template -->3317 <!-- We keep one auto-open so the user would know what is going on in the picked template -->
3318 <details open>3318 <details open>
3319 <summary>User Message Sequences</summary>3319 <summary data-i18n="User Message Sequences">User Message Sequences</summary>
3320 <div class="flex-container">3320 <div class="flex-container">
3321 <div class="flexAuto" title="Inserted before a User message and as a last prompt line when impersonating." data-i18n="[title]Inserted before a User message and as a last prompt line when impersonating.">3321 <div class="flexAuto" title="Inserted before a User message and as a last prompt line when impersonating." data-i18n="[title]Inserted before a User message and as a last prompt line when impersonating.">
3322 <small data-i18n="User Prefix">User Message Prefix</small>3322 <small data-i18n="User Prefix">User Message Prefix</small>
@@ -3329,7 +3329,7 @@
3329 </div>3329 </div>
3330 </details>3330 </details>
3331 <details open>3331 <details open>
3332 <summary>Assistant Message Sequences</summary>3332 <summary data-i18n="Assistant Message Sequences">Assistant Message Sequences</summary>
3333 <div class="flex-container">3333 <div class="flex-container">
3334 <div class="flexAuto" title="Inserted before an Assistant message and as a last prompt line when generating an AI reply." data-i18n="[title]Inserted before an Assistant message and as a last prompt line when generating an AI reply.">3334 <div class="flexAuto" title="Inserted before an Assistant message and as a last prompt line when generating an AI reply." data-i18n="[title]Inserted before an Assistant message and as a last prompt line when generating an AI reply.">
3335 <small data-i18n="Assistant Prefix">Assistant Message Prefix</small>3335 <small data-i18n="Assistant Prefix">Assistant Message Prefix</small>
@@ -3342,7 +3342,7 @@
3342 </div>3342 </div>
3343 </details>3343 </details>
3344 <details>3344 <details>
3345 <summary>System Message Sequences</summary>3345 <summary data-i18n="System Message Sequences">System Message Sequences</summary>
3346 <div class="flex-container">3346 <div class="flex-container">
3347 <div class="flexAuto" id="instruct_system_sequence_block" title="Inserted before a System (added by slash commands or extensions) message." data-i18n="[title]Inserted before a System (added by slash commands or extensions) message.">3347 <div class="flexAuto" id="instruct_system_sequence_block" title="Inserted before a System (added by slash commands or extensions) message." data-i18n="[title]Inserted before a System (added by slash commands or extensions) message.">
3348 <small data-i18n="System Prefix">System Message Prefix</small>3348 <small data-i18n="System Prefix">System Message Prefix</small>
@@ -3361,7 +3361,7 @@
3361 </div>3361 </div>
3362 </details>3362 </details>
3363 <details>3363 <details>
3364 <summary>System Prompt Sequences</summary>3364 <summary data-i18n="System Prompt Sequences">System Prompt Sequences</summary>
3365 <div class="flex-container">3365 <div class="flex-container">
3366 <div class="flexAuto" title="Inserted before a System prompt." data-i18n="[title]Inserted before a System prompt.">3366 <div class="flexAuto" title="Inserted before a System prompt." data-i18n="[title]Inserted before a System prompt.">
3367 <label for="instruct_system_sequence_prefix">3367 <label for="instruct_system_sequence_prefix">
@@ -4125,7 +4125,7 @@
4125 <input id="enable_auto_select_input" type="checkbox" />4125 <input id="enable_auto_select_input" type="checkbox" />
4126 <small data-i18n="Auto-select Input Text">Auto-select Input Text</small>4126 <small data-i18n="Auto-select Input Text">Auto-select Input Text</small>
4127 </label>4127 </label>
4128 <label class="checkbox_label alignItemsCenter" for="enable_md_hotkeys" title="Enable hotkeys for inserting markdown format characters in certain text input boxes. See '/help hotkeys'.">4128 <label class="checkbox_label alignItemsCenter" for="enable_md_hotkeys" data-i18n="[title]markdown_hotkeys_desc" title="Enable hotkeys for inserting markdown format characters in certain text input boxes. See '/help hotkeys'.">
4129 <input id="enable_md_hotkeys" type="checkbox" />4129 <input id="enable_md_hotkeys" type="checkbox" />
4130 <small>4130 <small>
4131 <span data-i18n="Markdown Hotkeys">Markdown Hotkeys</span>4131 <span data-i18n="Markdown Hotkeys">Markdown Hotkeys</span>
public/locales/ru-ru.json+55 -13
@@ -105,8 +105,8 @@
105 "API url": "URL-адрес API",105 "API url": "URL-адрес API",
106 "PygmalionAI/aphrodite-engine": "PygmalionAI/aphrodite-engine (Режим обёртки API OpenAI)",106 "PygmalionAI/aphrodite-engine": "PygmalionAI/aphrodite-engine (Режим обёртки API OpenAI)",
107 "Register a Horde account for faster queue times": "Заведите учетную запись Horde для ускорения генерации",107 "Register a Horde account for faster queue times": "Заведите учетную запись Horde для ускорения генерации",
108 "Adjust context size to worker capabilities": "Уточнить размер контекста в соответствии с возможностями рабочих машин",108 "Adjust context size to worker capabilities": "Подстраивать размер контекста под возможности рабочих машин",
109 "Adjust response length to worker capabilities": "Уточнить длинну ответа в соответствии с возможностями рабочих машин",109 "Adjust response length to worker capabilities": "Подстраивать длину ответа под возможности рабочих машин",
110 "API key": "API-ключ",110 "API key": "API-ключ",
111 "Tabby API key": "Tabby API-ключ",111 "Tabby API key": "Tabby API-ключ",
112 "Get it here:": "Получить здесь:",112 "Get it here:": "Получить здесь:",
@@ -132,9 +132,9 @@
132 "Novel AI Model": "Модель NovelAI",132 "Novel AI Model": "Модель NovelAI",
133 "Make sure you run it with": "Обязательно запускайте его с флагом",133 "Make sure you run it with": "Обязательно запускайте его с флагом",
134 "flag": "",134 "flag": "",
135 "API key (optional)": "Ключ API (опционально)",135 "API key (optional)": "Ключ API (необязательно)",
136 "Server url": "URL-адрес сервера",136 "Server url": "URL-адрес сервера",
137 "Custom model (optional)": "Пользовательская модель (опционально)",137 "Custom model (optional)": "Пользовательская модель (необязательно)",
138 "Bypass API status check": "Обход проверки статуса API",138 "Bypass API status check": "Обход проверки статуса API",
139 "Example: 127.0.0.1:5000": "Пример: http://127.0.0.1:5000",139 "Example: 127.0.0.1:5000": "Пример: http://127.0.0.1:5000",
140 "Legacy API (pre-OAI, no streaming)": "Устаревший API (до OAI, без стриминга)",140 "Legacy API (pre-OAI, no streaming)": "Устаревший API (до OAI, без стриминга)",
@@ -173,7 +173,7 @@
173 "Include Names": "Добавлять имена",173 "Include Names": "Добавлять имена",
174 "Force for Groups and Personas": "Также для групп и персон",174 "Force for Groups and Personas": "Также для групп и персон",
175 "System Prompt": "Системный промпт",175 "System Prompt": "Системный промпт",
176 "Instruct Mode Sequences": "Строки для Instruct-режима",176 "Instruct Sequences": "Строки для Instruct-режима",
177 "Stop Sequence": "Стоп-строка",177 "Stop Sequence": "Стоп-строка",
178 "Context Formatting": "Форматирование контекста",178 "Context Formatting": "Форматирование контекста",
179 "(Saved to Context Template)": "(Сохраняется в шаблоне контекста)",179 "(Saved to Context Template)": "(Сохраняется в шаблоне контекста)",
@@ -561,7 +561,7 @@
561 "Example: [{{user}} is a 28-year-old Romanian cat girl.]": "Пример:\n [{{user}} is a 28-year-old Romanian cat girl.]",561 "Example: [{{user}} is a 28-year-old Romanian cat girl.]": "Пример:\n [{{user}} is a 28-year-old Romanian cat girl.]",
562 "Toggle grid view": "Переключить вид сетки",562 "Toggle grid view": "Переключить вид сетки",
563 "Add to Favorites": "Добавить в Избранное",563 "Add to Favorites": "Добавить в Избранное",
564 "Advanced Definition": "Расширенное определение",564 "Advanced Definition": "Расширенное описание",
565 "Character Lore": "Лор персонажа",565 "Character Lore": "Лор персонажа",
566 "Export and Download": "Экспортировать и скачать",566 "Export and Download": "Экспортировать и скачать",
567 "Duplicate Character": "Дублировать персонажа",567 "Duplicate Character": "Дублировать персонажа",
@@ -737,12 +737,12 @@
737 "System Prompt Prefix": "Префикс системного промпта",737 "System Prompt Prefix": "Префикс системного промпта",
738 "System Prompt Suffix": "Постфикс системного промпта",738 "System Prompt Suffix": "Постфикс системного промпта",
739 "Chat Messages Wrapping": "Обрамление для сообщений в чате",739 "Chat Messages Wrapping": "Обрамление для сообщений в чате",
740 "User Message Prefix": "Префикс сообщения пользователя",740 "User Prefix": "Префикс сообщения пользователя",
741 "User Message Suffix": "Постфикс сообщения пользователя",741 "User Suffix": "Постфикс сообщения пользователя",
742 "Assistant Message Prefix": "Префикс сообщения ассистента",742 "Assistant Prefix": "Префикс сообщения ассистента",
743 "Assistant Message Suffix": "Постфикс сообщения ассистента",743 "Assistant Suffix": "Постфикс сообщения ассистента",
744 "System Message Prefix": "Префикс сообщения системы",744 "System Prefix": "Префикс сообщения системы",
745 "System Message Suffix": "Постфикс сообщения системы",745 "System Suffix": "Постфикс сообщения системы",
746 "System same as User": "Для системы то же самое, что и для пользователя",746 "System same as User": "Для системы то же самое, что и для пользователя",
747 "Misc. Sequences": "Прочие строки",747 "Misc. Sequences": "Прочие строки",
748 "First Assistant Prefix": "Первый префикс ассистента",748 "First Assistant Prefix": "Первый префикс ассистента",
@@ -1704,5 +1704,47 @@
1704 "chat_rename_1": "Введите новое имя чата:",1704 "chat_rename_1": "Введите новое имя чата:",
1705 "chat_rename_2": "!!Не используйте имя уже существующего файла, это приведёт к ошибке!!",1705 "chat_rename_2": "!!Не используйте имя уже существующего файла, это приведёт к ошибке!!",
1706 "chat_rename_3": "Будут разрушены связи между чатами-чекпоинтами.",1706 "chat_rename_3": "Будут разрушены связи между чатами-чекпоинтами.",
1707 "chat_rename_4": "Расширение '.jsonl' дописывать не нужно."1707 "chat_rename_4": "Расширение '.jsonl' дописывать не нужно.",
1708 "If you're connected to an API, try asking me something!": "Есть соединение с API? Напишите мне что-нибудь!",
1709 "Connection Profile": "Профиль соединения",
1710 "View connection profile details": "Посмотреть параметры профиля соединения",
1711 "Create a new connection profile": "Создать новый профиль соединения",
1712 "Update a connection profile": "Обновить профиль соединения",
1713 "Rename a connection profile": "Переименовать профиль соединения",
1714 "Reload a connection profile": "Перезагрузить профиль соединения",
1715 "Delete a connection profile": "Удалить профиль соединения",
1716 "No profile selected": "Профиль не выбран",
1717 "Creating a Connection Profile": "Создать профиль соединения",
1718 "Settings Preset": "Пресет настроек",
1719 "Model": "Модель",
1720 "Proxy Preset": "Пресет для прокси",
1721 "Enter a name:": "Введите название:",
1722 "Enter a new name": "Введите новое название",
1723 "Are you sure you want to delete the selected profile?": "Вы точно хотите удалить выбранный профиль?",
1724 "instruct_enabled": "Включить Instruct-режим",
1725 "Instruct Template": "Шаблон Instruct-режима",
1726 "instruct_template_activation_regex_desc": "Автоматически активировать этот шаблон в момент подключения к API или выбора модели, если название модели соответствует этому рег. выражению.",
1727 "instruct_bind_to_context": "При включении этой опции Шаблон контекста будет выбираться, исходя из выбранного в текущий момент Шаблона Instruct-режима, либо по вашему желанию.",
1728 "Master Import": "Глоб. импорт",
1729 "Import Advanced Formatting settings": "Импорт настроек Расширенного форматирования\nТакже принимает файлы старого формата с Шаблонами контекста и Шаблонами Instruct-режима.",
1730 "Master Export": "Глоб. экспорт",
1731 "Export Advanced Formatting settings": "Экспорт настроек Расширенного форматирования",
1732 "Select your current System Prompt": "Выберите текущий системный промпт",
1733 "Prompt Content": "Текст промпта",
1734 "Update current prompt": "Обновить текущий промпт",
1735 "Save prompt as": "Сохранить как...",
1736 "Import template": "Импорт шаблона",
1737 "Export template": "Экспорт шаблона",
1738 "Restore current prompt": "Восстановить текущий промпт",
1739 "comma delimited,no spaces between": "через запятую,без пробелов в промежутках",
1740 "User Message Sequences": "Строки для сообщений пользователя",
1741 "Assistant Message Sequences": "Строки для сообщений ассистента",
1742 "System Message Sequences": "Строки для сообщений системы",
1743 "System Prompt Sequences": "Строки для системного промпта",
1744 "sysprompt_enabled": "Вкл/выкл системный промпт",
1745 "Are you sure you want to delete this alternate greeting?": "Вы точно хотите удалить этот вариант?",
1746 "Any contents here will replace the default Post-History Instructions used for this character. (v2 spec: post_history_instructions)": "Содержимое этого поля заменит стандартные Инструкции после истории, применяемые для этого персонажа. (v2 spec: post_history_instructions)",
1747 "None (disabled)": "Нигде (откл.)",
1748 "Markdown Hotkeys": "Горячие клавиши для разметки",
1749 "markdown_hotkeys_desc": "Включить горячие клавиши для вставки символов разметки в некоторых полях ввода. См. '/help hotkeys'."
1708}1750}
public/script.js+1 -1
@@ -7853,7 +7853,7 @@ function addAlternateGreeting(template, greeting, index, getArray) {
7853 }).val(greeting);7853 }).val(greeting);
7854 greetingBlock.find('.greeting_index').text(index + 1);7854 greetingBlock.find('.greeting_index').text(index + 1);
7855 greetingBlock.find('.delete_alternate_greeting').on('click', async function () {7855 greetingBlock.find('.delete_alternate_greeting').on('click', async function () {
7856 if (confirm('Are you sure you want to delete this alternate greeting?')) {7856 if (confirm(t`Are you sure you want to delete this alternate greeting?`)) {
7857 const array = getArray();7857 const array = getArray();
7858 array.splice(index, 1);7858 array.splice(index, 1);
7859 // We need to reopen the popup to update the index numbers7859 // We need to reopen the popup to update the index numbers
public/scripts/extensions/connection-manager/index.js+4 -3
@@ -10,6 +10,7 @@ import { enumTypes, SlashCommandEnumValue } from '../../slash-commands/SlashComm
10import { SlashCommandParser } from '../../slash-commands/SlashCommandParser.js';10import { SlashCommandParser } from '../../slash-commands/SlashCommandParser.js';
11import { SlashCommandScope } from '../../slash-commands/SlashCommandScope.js';11import { SlashCommandScope } from '../../slash-commands/SlashCommandScope.js';
12import { collapseSpaces, getUniqueName, isFalseBoolean, uuidv4 } from '../../utils.js';12import { collapseSpaces, getUniqueName, isFalseBoolean, uuidv4 } from '../../utils.js';
13import { t } from '../../i18n.js';
1314
14const MODULE_NAME = 'connection-manager';15const MODULE_NAME = 'connection-manager';
15const NONE = '<None>';16const NONE = '<None>';
@@ -250,7 +251,7 @@ async function deleteConnectionProfile() {
250 }251 }
251252
252 const name = extension_settings.connectionManager.profiles[index].name;253 const name = extension_settings.connectionManager.profiles[index].name;
253 const confirm = await Popup.show.confirm('Are you sure you want to delete the selected profile?', name);254 const confirm = await Popup.show.confirm(t`Are you sure you want to delete the selected profile?`, name);
254255
255 if (!confirm) {256 if (!confirm) {
256 return;257 return;
@@ -360,7 +361,7 @@ async function renderDetailsContent(detailsContent) {
360 const template = await renderExtensionTemplateAsync(MODULE_NAME, 'view', { profile: profileForDisplay });361 const template = await renderExtensionTemplateAsync(MODULE_NAME, 'view', { profile: profileForDisplay });
361 detailsContent.innerHTML = template;362 detailsContent.innerHTML = template;
362 } else {363 } else {
363 detailsContent.textContent = 'No profile selected';364 detailsContent.textContent = t`No profile selected`;
364 }365 }
365}366}
366367
@@ -481,7 +482,7 @@ async function renderDetailsContent(detailsContent) {
481 return;482 return;
482 }483 }
483484
484 const newName = await Popup.show.input('Enter a new name', null, profile.name, { rows: 2 });485 const newName = await Popup.show.input(t`Enter a new name`, null, profile.name, { rows: 2 });
485 if (!newName) {486 if (!newName) {
486 return;487 return;
487 }488 }
public/scripts/i18n.js+3 -0
@@ -50,6 +50,9 @@ const observer = new MutationObserver(mutations => {
50 * @returns {string} Translated and formatted string50 * @returns {string} Translated and formatted string
51 */51 */
52export function t(strings, ...values) {52export function t(strings, ...values) {
53 if (strings == 'Select Horde models') {
54 console.log('strings = ' + strings);
55 }
53 let str = strings.reduce((result, string, i) => result + string + (values[i] !== undefined ? `\${${i}}` : ''), '');56 let str = strings.reduce((result, string, i) => result + string + (values[i] !== undefined ? `\${${i}}` : ''), '');
54 let translatedStr = translate(str);57 let translatedStr = translate(str);
5558