Work on tl

5b4198957ab40a505b5a005443a381b40ad8b842

Yokayo <nonameutubecomm@gmail.com>

10 files changed, +180 -40Ignore whitespace
public/index.html+7 -7
@@ -661,7 +661,7 @@
661 </div>661 </div>
662 </div>662 </div>
663 <div data-source="openrouter" class="range-block">663 <div data-source="openrouter" class="range-block">
664 <div class="range-block-title" title="Allow compressing requests by removing messages from the middle of the prompt.">664 <div class="range-block-title" data-i18n="[title]Allow compressing requests by removing messages from the middle of the prompt." title="Allow compressing requests by removing messages from the middle of the prompt.">
665 <span data-i18n="Middle-out Transform">Middle-out Transform</span>665 <span data-i18n="Middle-out Transform">Middle-out Transform</span>
666 <a href="https://openrouter.ai/docs/transforms" target="_blank" rel="noreferrer noopener" class="note-link-span fa-solid fa-circle-question"></a>666 <a href="https://openrouter.ai/docs/transforms" target="_blank" rel="noreferrer noopener" class="note-link-span fa-solid fa-circle-question"></a>
667 </div>667 </div>
@@ -674,7 +674,7 @@
674 </div>674 </div>
675 </div>675 </div>
676 <div data-source="openrouter">676 <div data-source="openrouter">
677 Max prompt cost: <span id="openrouter_max_prompt_cost">Unknown</span>677 <span data-i18n="Max prompt cost:">Max prompt cost:</span> <span id="openrouter_max_prompt_cost" data-i18n="Unknown">Unknown</span>
678 </div>678 </div>
679 <hr>679 <hr>
680 <div class="range-block">680 <div class="range-block">
@@ -2714,12 +2714,12 @@
2714 </select>2714 </select>
2715 <div class="marginTopBot5">2715 <div class="marginTopBot5">
2716 <i class="fa-solid fa-flask"></i>2716 <i class="fa-solid fa-flask"></i>
2717 <span>Experimental feature. Use at your own risk.</span>2717 <span data-i18n="Experimental feature. Use at your own risk.">Experimental feature. Use at your own risk.</span>
2718 </div>2718 </div>
2719 <div class="marginTopBot5">2719 <div class="marginTopBot5">
2720 <small>2720 <small>
2721 <i class="fa-solid fa-lightbulb"></i>2721 <i class="fa-solid fa-lightbulb"></i>
2722 &nbsp;2722 &nbsp;<span data-i18n="Tabby model hint prefix"></span>
2723 <code>inline_model_loading: True</code>2723 <code>inline_model_loading: True</code>
2724 <span data-i18n="must be set in Tabby's config.yml to switch models.">2724 <span data-i18n="must be set in Tabby's config.yml to switch models.">
2725 must be set in Tabby's config.yml to switch models.2725 must be set in Tabby's config.yml to switch models.
@@ -2851,7 +2851,7 @@
2851 <input id="openai_reverse_proxy" type="text" class="text_pole" placeholder="https://api.openai.com/v1" />2851 <input id="openai_reverse_proxy" type="text" class="text_pole" placeholder="https://api.openai.com/v1" />
2852 <small class="reverse_proxy_warning">2852 <small class="reverse_proxy_warning">
2853 <span data-i18n="Doesn't work? Try adding">Doesn't work? Try adding</span> <code>/v1</code> <span data-i18n="at the end!">at the end!</span>2853 <span data-i18n="Doesn't work? Try adding">Doesn't work? Try adding</span> <code>/v1</code> <span data-i18n="at the end!">at the end!</span>
2854 <code>/chat/completions</code> <b data-i18n="suffix will be added automatically.">suffix will be added automatically.</b>2854 <span data-i18n="completions note prefix"></span><code>/chat/completions</code> <b data-i18n="suffix will be added automatically.">suffix will be added automatically.</b>
2855 </small>2855 </small>
2856 </div>2856 </div>
2857 <div class="range-block-title justifyLeft" data-i18n="Proxy Password">2857 <div class="range-block-title justifyLeft" data-i18n="Proxy Password">
@@ -3566,7 +3566,7 @@
3566 <div>3566 <div>
3567 <small>3567 <small>
3568 <span data-i18n="Doesn't work? Try adding">Doesn't work? Try adding</span> <code>/v1</code> <span data-i18n="at the end!">at the end!</span>3568 <span data-i18n="Doesn't work? Try adding">Doesn't work? Try adding</span> <code>/v1</code> <span data-i18n="at the end!">at the end!</span>
3569 <code>/chat/completions</code> <b data-i18n="suffix will be added automatically.">suffix will be added automatically.</b>3569 <b data-i18n="completions note prefix"></b><code>/chat/completions</code> <b data-i18n="suffix will be added automatically.">suffix will be added automatically.</b>
3570 </small>3570 </small>
3571 </div>3571 </div>
3572 <h4>3572 <h4>
@@ -4744,7 +4744,7 @@
4744 <input id="never_resize_avatars" type="checkbox" />4744 <input id="never_resize_avatars" type="checkbox" />
4745 <small data-i18n="Never resize avatars">Never resize avatars</small>4745 <small data-i18n="Never resize avatars">Never resize avatars</small>
4746 </label>4746 </label>
4747 <label for="background_thumbnails_animation" class="checkbox_label" title="Make animated backgrounds static in the selection menu. This will reduce UI and network lag if you have a large amount. This is only a change for the selection menu.">4747 <label data-i18n="[title]Make animated backgrounds static in the selection menu. This will reduce UI and network lag if you have a large amount. This is only a change for the selection menu." for="background_thumbnails_animation" class="checkbox_label" title="Make animated backgrounds static in the selection menu. This will reduce UI and network lag if you have a large amount. This is only a change for the selection menu.">
4748 <input id="background_thumbnails_animation" type="checkbox" />4748 <input id="background_thumbnails_animation" type="checkbox" />
4749 <small data-i18n="Animated background thumbnails">Animated background thumbnails</small>4749 <small data-i18n="Animated background thumbnails">Animated background thumbnails</small>
4750 </label>4750 </label>
public/locales/ru-ru.json+143 -5
@@ -105,7 +105,7 @@
105 "Adjust context size to worker capabilities": "Подстраивать размер контекста под возможности рабочих машин",105 "Adjust context size to worker capabilities": "Подстраивать размер контекста под возможности рабочих машин",
106 "Adjust response length to worker capabilities": "Подстраивать длину ответа под возможности рабочих машин",106 "Adjust response length to worker capabilities": "Подстраивать длину ответа под возможности рабочих машин",
107 "API key": "API-ключ",107 "API key": "API-ключ",
108 "Tabby API key": "Tabby API-ключ",108 "Tabby API key": "Ключ от Tabby API",
109 "Get it here:": "Получите здесь:",109 "Get it here:": "Получите здесь:",
110 "Register": "Зарегистрироваться",110 "Register": "Зарегистрироваться",
111 "TogetherAI Model": "Модель TogetherAI",111 "TogetherAI Model": "Модель TogetherAI",
@@ -275,7 +275,7 @@
275 "Chat History": "История чатов",275 "Chat History": "История чатов",
276 "Content": "Содержание",276 "Content": "Содержание",
277 "Selective": "Выборочно",277 "Selective": "Выборочно",
278 "Disable": "Отключено",278 "Disable": "Откл.",
279 "Back to parent chat": "Вернуться в основной чат",279 "Back to parent chat": "Вернуться в основной чат",
280 "Convert to group": "Сделать групповым",280 "Convert to group": "Сделать групповым",
281 "Start new chat": "Начать новый чат",281 "Start new chat": "Начать новый чат",
@@ -509,7 +509,7 @@
509 "Restore default prompt": "Восстановить станндартный промпт",509 "Restore default prompt": "Восстановить станндартный промпт",
510 "New preset": "Новый пресет",510 "New preset": "Новый пресет",
511 "Delete preset": "Удалить пресет",511 "Delete preset": "Удалить пресет",
512 "API Connections": "Соединения с API",512 "API Connections": "Соединение с API",
513 "Can help with bad responses by queueing only the approved workers. May slowdown the response time.": "Может помочь при плохих ответах, делая запросы только к доверенным рабочим машинам. Может замедлить время ответа.",513 "Can help with bad responses by queueing only the approved workers. May slowdown the response time.": "Может помочь при плохих ответах, делая запросы только к доверенным рабочим машинам. Может замедлить время ответа.",
514 "Clear your API key": "Стереть ключ от API",514 "Clear your API key": "Стереть ключ от API",
515 "Refresh models": "Обновить модели",515 "Refresh models": "Обновить модели",
@@ -965,7 +965,6 @@
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 (прямая ссылка)",
969 "Grammar String": "Грамматика",968 "Grammar String": "Грамматика",
970 "GBNF or EBNF, depends on the backend in use. If you're using this you should know which.": "GBNF или EBNF, зависит от бэкенда. Если вы это используете, то, скорее всего, сами знаете, какой именно.",969 "GBNF or EBNF, depends on the backend in use. If you're using this you should know which.": "GBNF или EBNF, зависит от бэкенда. Если вы это используете, то, скорее всего, сами знаете, какой именно.",
971 "Account": "Аккаунт",970 "Account": "Аккаунт",
@@ -2419,5 +2418,144 @@
2419 "Update enabled": "Обновить включенные",2418 "Update enabled": "Обновить включенные",
2420 "Could not connect to API": "Не удалось подключиться к API",2419 "Could not connect to API": "Не удалось подключиться к API",
2421 "Connected to API": "Соединение с API установлено",2420 "Connected to API": "Соединение с API установлено",
2422 "Go back": "Назад"2421 "Go back": "Назад",
2422 "Recent Chats": "Недавние чаты",
2423 "Docs": "Документация",
2424 "Temporary Chat": "Временный чат",
2425 "Load": "Загрузить",
2426 "Import from JSONL": "Импорт из формата JSONL",
2427 "**Hint:** Set any character as your welcome page assistant from their \"More...\" menu.": "**Подсказка**: задайте персонажа, который будет встречать вас на главной странице. Для этого зайдите в меню \"Ещё...\" в интерфейсе карточки.",
2428 "[The chat is empty]": "[Чат пуст]",
2429 "Show more recent chats": "Больше недавних чатов",
2430 "Show less recent chats": "Меньше недавних чатов",
2431 "Rename chat": "Переименовать чат",
2432 "Delete chat": "Удалить чат",
2433 "Hide recent chats": "Скрыть недавние чаты",
2434 "Show recent chats": "Показать недавние чаты",
2435 "Set / Unset as Welcome Page Assistant": "Установить / снять с роли помощника на экране приветствия",
2436 "${0} is a system assistant. Choose another character.": "Персонаж ${0} выбран в качестве системного помощника. Выберите другого.",
2437 "Set ${0} as your assistant.": "Персонаж ${0} установлен в качестве помощника.",
2438 "${0} is no longer your assistant.": "Персонаж ${0} снят с роли помощника.",
2439 "Manage API keys": "Управление ключами",
2440 "Key:": "Ключ:",
2441 "No secrets saved.": "Ключей нет.",
2442 "Add Secret": "Добавить ключ",
2443 "Enter the secret value:": "Ключ:",
2444 "Enter a label for the secret (optional):": "Название ключа (необязательно):",
2445 "Copy ID": "Копировать ID",
2446 "Rename Secret": "Переименовать ключ",
2447 "Enter new label for the secret:": "Новое название ключа:",
2448 "Delete Secret: ${0}": "Удалить ключ ${0}",
2449 "Are you sure you want to delete this secret? This action cannot be undone.": "Вы точно хотите удалить этот ключ? Отменить будет невозможно.",
2450 "Secret ID copied to clipboard.": "ID ключа скопирован в буфер обмена.",
2451 "The key exposure might be disabled by the server config.": "Вероятно, в настройках сервера отключена возможность раскрытия ключей.",
2452 "Failed to copy secret value": "Не удалось скопировать значение",
2453 "Select": "Выделить",
2454 "Allow compressing requests by removing messages from the middle of the prompt.": "Включает возможность сжатия запроса путём удаления сообщений из середины промпта.",
2455 "Allow": "Разрешить",
2456 "Forbid": "Запретить",
2457 "Auto": "Авто",
2458 "Max prompt cost:": "Макс. стоимость промпта:",
2459 "Unknown": "Неизвестно",
2460 "enable_functions_desc_4": "Не работает, если выбрана постобработка промпта с отключенными функциями!",
2461 "This setting affects visibility only.": "Влияет только на видимость.",
2462 "openrouter_web_search_fee": "Платная опция! Добавляет $0,02 к стоимости каждого промпта.",
2463 "prompt_post_processing_semi_tools": "Semi-strict (чередовать роли, функции включены)",
2464 "prompt_post_processing_strict_tools": "Strict (чередовать роли, сначала пользователь; функции включены)",
2465 "prompt_post_processing_single": "Только одно сообщение пользователя (функции отключены)",
2466 "prompt_post_processing_merge_tools": "Объединять идущие подряд сообщение с одной ролью (функции включены)",
2467 "completions note prefix": "Постфикс ",
2468 "suffix will be added automatically.": "будет добавлен автоматически.",
2469 "Tabby Model": "Модель Tabby",
2470 "Experimental feature. Use at your own risk.": "Экспериментальная возможность. Используйте на собственный риск.",
2471 "Tabby model hint prefix": "Чтобы иметь возможность менять модели на лету, укажите параметр ",
2472 "must be set in Tabby's config.yml to switch models.": " в файле config.yml на сервере Tabby.",
2473 "Use an admin API key.": "Используйте admin-ключ.",
2474 "Use OpenRouter website setting": "Использовать указанную на сайте OpenRouter",
2475 "Allocates a portion of the response length for thinking (min: 1024 tokens, low: 10%, medium: 25%, high: 50%, max: 95%), but minimum 1024 tokens. Auto does not request thinking.": "Отводит часть ответа под рассуждения (Минимальные: 10%, Обычные: 25%, Подробные: 50%, Максимальные: 95%), но минимум 1024 токена. При выборе значение Авто рассуждения не запрашиваются.",
2476 "Use system prompt": "Включить системный промпт",
2477 "Send inline videos": "Отправлять inline-видео",
2478 "video_inlining_hint_1": "Отправляет модели видео, если она поддерживает такую возможность. Чтобы прикрепить видео к чату, используйте на любом сообщении кнопку",
2479 "video_inlining_hint_2": "либо меню",
2480 "video_inlining_hint_3": ".",
2481 "video_inlining_hint_4": "Видео должно весить не более 20 Мб и длиться не дольше 1 минуты.",
2482 "Allocates a portion of the response length for thinking (Flash 2.5/Pro 2.5) (min: 0/128 tokens, low: 10%, medium: 25%, high: 50%, max: 24576/32768 tokens). Auto lets the model decide.": "Отводит часть ответа под рассуждения (Flash 2.5/Pro 2.5) (Минимальные: 0/128 токенов, Поверхностные: 10%, Обычные: 25%, Подробные: 50%, Максимальные: 24576/32768 токенов). При выборе значения Авто модель определяет объём самостоятельно.",
2483 "Google Vertex AI Configuration": "Настройки Google Vertex AI",
2484 "Authentication Mode": "Режим аутентификации:",
2485 "Express Mode (API Key)": "Express Mode (ключ от API)",
2486 "Full Version (Service Account)": "Полновесный (аккаунт на сервисе)",
2487 "Google Vertex AI API Key": "Ключ от Google Vertex AI",
2488 "Service Account Configuration": "Настройки аккаунта",
2489 "Region": "Регион",
2490 "Service Account JSON Content": "Данные аккаунта в формате JSON",
2491 "Validate JSON": "Провалидировать JSON",
2492 "View available regions and models": "Посмотреть список доступных регионов и моделей",
2493 "Click to Edit": "Редактирование по клику",
2494 "Click the message text in the chat log to edit it.": "Нажмите на текст сообщения в чате, чтобы приступить к редактированию.",
2495 "Rounded": "Закруглённые",
2496 "Notifications:": "Уведомления:",
2497 "Top Left": "Слева сверху",
2498 "Top Center": "Сверху по центру",
2499 "Top Right": "Справа сверху",
2500 "Bottom Left": "Снизу слева",
2501 "Bottom Center": "Снизу по центру",
2502 "Bottom Right": "Снизу справа",
2503 "Additional Matching Sources": "Доп. места для поиска",
2504 "Character Personality": "Резюме по личности персонажа",
2505 "Cap the number of entry activation recursions": "Макс. глубина рекурсии при активации записи другой записью",
2506 "Animated background thumbnails": "Статичное превью анимированных фонов",
2507 "Make animated backgrounds static in the selection menu. This will reduce UI and network lag if you have a large amount. This is only a change for the selection menu.": "Отключить анимацию фонов при их предпросмотре в меню выбора. Может помочь снизить объём лагов интерфейса и/или интернет-соединения. Затрагивает только меню выбора.",
2508 "Clean-Up": "Уборка",
2509 "Find and delete backups, unused chats, files, images, etc.": "Найти и удалить бэкапы, неиспользуемые чаты, файлы, картинки и т.д.",
2510 "Once deleted, the files will be gone forever!": "Восстановить удалённые файлы будет невозможно!",
2511 "Make sure to back up your data in advance.": "Перед удалением не забывайте делать копии.",
2512 "No results yet. Tap 'Scan' to start scanning.": "Пока ничего не найдено. Нажмите \"Начать сканирование\", чтобы запустить процесс поиска.",
2513 "Scan": "Начать сканирование",
2514 "Chats": "Чаты",
2515 "Chat files associated with deleted characters.": "Чаты с удалёнными персонажами.",
2516 "Group Chats": "Групповые чаты",
2517 "Chat files associated with deleted groups.": "Чаты с удалёнными группами.",
2518 "Chat Backups": "Копии чатов",
2519 "Automatically generated chat backups.": "Автоматически создаваемые бэкапы чатов.",
2520 "Settings Backups": "Копии настроек",
2521 "Automatically generated settings backups.": "Автоматически создаваемые бэкапы настроек.",
2522 "Delete all items in this category": "Удалить всё в этой категории",
2523 "View item content": "Посмотреть содержимое",
2524 "Download item": "Скачать содержимое",
2525 "Delete this item": "Удалить содержимое",
2526 "This will permanently delete the file. THIS CANNOT BE UNDONE!": "Файл будет удалён навсегда. ОТМЕНИТЬ БУДЕТ НЕВОЗМОЖНО!",
2527 "This will permanently delete all files in this category. THIS CANNOT BE UNDONE!": "Все файлы в этой категории будут удалены. ОТМЕНИТЬ БУДЕТ НЕВОЗМОЖНО!",
2528 "Close popup": "Закрыть окно",
2529 "Branch or tag name (optional)": "Ветка или тэг (необязательно)",
2530 "ext_regex_bulk_edit": "Массовое редактирование",
2531 "Enable": "Вкл.",
2532 "Provided free of charge by Pollinations.AI": "Предоставляется бесплатно сервисом Pollinations.AI",
2533 "Avoid sending sensitive information. Provider's outputs may include ads.": "Не отправляйте чувствительную информацию. Тексты от провайдера могут содержать рекламу.",
2534 "Pollinations Model": "Модель Pollinations",
2535 "Character details are hidden.": "Информация о персонаже скрыта.",
2536 "Allow / Forbid the use of global styles for this character.": "Разрешить/запретить использование персонажем глобальных стилей.",
2537 "Choose how to apply CSS style tags if they are defined in Creator's Notes of this character:": "Выберите, к чему применять CSS-теги, объявленные в Заметках создателя у этого персонажа:",
2538 "CAUTION: Malformed styles may cause issues.": "ОСТОРОЖНО: некорректно размеченные стили могут приводить к неожиданному поведению.",
2539 "Just to Creator's Notes": "Только к Заметкам создателя",
2540 "Apply to the entire app": "Ко всему приложению",
2541 "Pin greeting message styles": "CSS из первого сообщения активен всегда",
2542 "Always render style tags from greetings, even if the message is unloaded due to lazy loading.": "Всегда учитывать CSS-стили из первого сообщения, даже если оно на данный момент скрыто механизмом ленивой загрузки.",
2543 "Secret": "Ключ",
2544 "Save and connect": "Сохранить и подключиться",
2545 "No scripts found": "Скриптов нет",
2546 "Are you sure you want to delete this regex script?": "Вы точно хотите удалить этот скрипт?",
2547 "Are you sure you want to move this regex script to scoped?": "Вы точно хотите сделать этот скрипт локальным?",
2548 "Cannot edit scoped scripts in group chats.": "Локальные скрипты невозможно редактировать в групповом чате.",
2549 "No character selected.": "Не выбран персонаж.",
2550 "Are you sure you want to move this regex script to global?": "Вы точно хотите сделать этот скрипт глобальным?",
2551 "Could not save regex script: The script name was undefined or empty!": "Не удалось сохранить regex-скрипт: Не указано либо не определено название скрипта!",
2552 "This regex script will not work, but was saved anyway: A find regex isn't present.": "Этот regex не будет работать, но всё равно сохранён: Не указано рег. выражение для поиска",
2553 "Ephemerality": "Иллюзорность",
2554 "This regex script will not work, but was saved anyway: One \"Affects\" checkbox must be selected!": "Этот regex не будет работать, но всё равно сохранён: Должна быть отмечена хотя бы одна галочка в блоке \"Затрагивает\"!",
2555 "This character has embedded regex script(s).": "У этого персонажа имеются встроенные regex скрипты.",
2556 "Would you like to allow using them?": "Должны ли они продолжать работу?",
2557 "If you want to do it later, select 'Regex' from the extensions menu.": "Если захотите включить их позже, выберите в меню расширений пункт \"Regex\".",
2558 "Are you sure you want to delete the selected regex scripts?": "Вы точно хотите удалить выбранные скрипты?",
2559 "Regex script \"${0}\" imported.": "Успешно импортирован скрипт ${0}",
2560 "Invalid regex object.": "Некорректный объект рег. выражения."
2423}2561}
public/script.js+3 -1
@@ -680,7 +680,7 @@ const SAFETY_CHAT = [
680 is_system: true,680 is_system: true,
681 is_user: false,681 is_user: false,
682 create_date: 0,682 create_date: 0,
683 mes: 'You deleted a character/chat and arrived back here for safety reasons! Pick another character!',683 mes: () => t`You deleted a character/chat and arrived back here for safety reasons! Pick another character!`,
684 },684 },
685];685];
686686
@@ -6747,6 +6747,8 @@ export function resetChatState() {
6747 name2 = (this_chid === undefined && neutralCharacterName) ? neutralCharacterName : systemUserName;6747 name2 = (this_chid === undefined && neutralCharacterName) ? neutralCharacterName : systemUserName;
6748 //unsets expected chid before reloading (related to getCharacters/printCharacters from using old arrays)6748 //unsets expected chid before reloading (related to getCharacters/printCharacters from using old arrays)
6749 setCharacterId(undefined);6749 setCharacterId(undefined);
6750 // translate system user's message before diaplaying
6751 SAFETY_CHAT[0].mes = SAFETY_CHAT[0].mes();
6750 // sets up system user to tell user about having deleted a character6752 // sets up system user to tell user about having deleted a character
6751 chat.splice(0, chat.length, ...SAFETY_CHAT);6753 chat.splice(0, chat.length, ...SAFETY_CHAT);
6752 // resets chat metadata6754 // resets chat metadata
public/scripts/extensions/assets/index.js+5 -5
@@ -53,11 +53,11 @@ function filterAssets() {
53}53}
5454
55const KNOWN_TYPES = {55const KNOWN_TYPES = {
56 'extension': 'Extensions',56 'extension': t`Extensions`,
57 'character': 'Characters',57 'character': t`Characters`,
58 'ambient': 'Ambient sounds',58 'ambient': t`Ambient sounds`,
59 'bgm': 'Background music',59 'bgm': t`Background music`,
60 'blip': 'Blip sounds',60 'blip': t`Blip sounds`,
61};61};
6262
63async function downloadAssetsList(url) {63async function downloadAssetsList(url) {
public/scripts/extensions/regex/dropdown.html+2 -2
@@ -53,7 +53,7 @@
53 <small data-i18n="ext_regex_global_scripts_desc">53 <small data-i18n="ext_regex_global_scripts_desc">
54 Available for all characters. Saved to local settings.54 Available for all characters. Saved to local settings.
55 </small>55 </small>
56 <div id="saved_regex_scripts" class="flex-container regex-script-container flexFlowColumn"></div>56 <div id="saved_regex_scripts" no-scripts-text="No scripts found" data-i18n="[no-scripts-text]No scripts found" class="flex-container regex-script-container flexFlowColumn"></div>
57 </div>57 </div>
58 <hr />58 <hr />
59 <div id="scoped_scripts_block" class="padding5">59 <div id="scoped_scripts_block" class="padding5">
@@ -68,7 +68,7 @@
68 <small data-i18n="ext_regex_scoped_scripts_desc">68 <small data-i18n="ext_regex_scoped_scripts_desc">
69 Only available for this character. Saved to the card data.69 Only available for this character. Saved to the card data.
70 </small>70 </small>
71 <div id="saved_scoped_scripts" class="flex-container regex-script-container flexFlowColumn"></div>71 <div id="saved_scoped_scripts" no-scripts-text="No scripts found" data-i18n="[no-scripts-text]No scripts found" class="flex-container regex-script-container flexFlowColumn"></div>
72 </div>72 </div>
73 </div>73 </div>
74 </div>74 </div>
public/scripts/extensions/regex/editor.html+1 -1
@@ -146,7 +146,7 @@
146 </select>146 </select>
147 </label>147 </label>
148 <span>148 <span>
149 <small data-i18n="ext_regex_other_options" data-i18n="Ephemerality">Ephemerality</small>149 <small data-i18n="Ephemerality">Ephemerality</small>
150 <span class="fa-solid fa-circle-question note-link-span" data-i18n="[title]ext_regex_other_options_desc" title="By default, regex scripts alter the chat file directly and irreversibly.&#13;Enabling either (or both) of the options below will prevent chat file alteration, while still altering the specified item(s)."></span>150 <span class="fa-solid fa-circle-question note-link-span" data-i18n="[title]ext_regex_other_options_desc" title="By default, regex scripts alter the chat file directly and irreversibly.&#13;Enabling either (or both) of the options below will prevent chat file alteration, while still altering the specified item(s)."></span>
151 </span>151 </span>
152 <label class="checkbox flex-container" data-i18n="[title]ext_regex_only_format_visual_desc" title="Chat history file contents won't change, but regex will be applied to the messages displayed in the Chat UI.">152 <label class="checkbox flex-container" data-i18n="[title]ext_regex_only_format_visual_desc" title="Chat history file contents won't change, but regex will be applied to the messages displayed in the Chat UI.">
public/scripts/extensions/regex/embeddedScripts.html+3 -3
@@ -1,5 +1,5 @@
1<div>1<div>
2 <h3>This character has embedded regex script(s).</h3>2 <h3 data-i18n="This character has embedded regex script(s).">This character has embedded regex script(s).</h3>
3 <h3>Would you like to allow using them?</h3>3 <h3 data-i18n="Would you like to allow using them?">Would you like to allow using them?</h3>
4 <div class="m-b-1">If you want to do it later, select "Regex" from the extensions menu.</div>4 <div class="m-b-1" data-i18n="If you want to do it later, select 'Regex' from the extensions menu.">If you want to do it later, select "Regex" from the extensions menu.</div>
5</div>5</div>
public/scripts/extensions/regex/index.js+14 -14
@@ -45,18 +45,18 @@ async function saveRegexScript(regexScript, existingScriptIndex, isScoped) {
4545
46 // Is the script name undefined or empty?46 // Is the script name undefined or empty?
47 if (!regexScript.scriptName) {47 if (!regexScript.scriptName) {
48 toastr.error('Could not save regex script: The script name was undefined or empty!');48 toastr.error(t`Could not save regex script: The script name was undefined or empty!`);
49 return;49 return;
50 }50 }
5151
52 // Is a find regex present?52 // Is a find regex present?
53 if (regexScript.findRegex.length === 0) {53 if (regexScript.findRegex.length === 0) {
54 toastr.warning('This regex script will not work, but was saved anyway: A find regex isn\'t present.');54 toastr.warning(t`This regex script will not work, but was saved anyway: A find regex isn't present.`);
55 }55 }
5656
57 // Is there someplace to place results?57 // Is there someplace to place results?
58 if (regexScript.placement.length === 0) {58 if (regexScript.placement.length === 0) {
59 toastr.warning('This regex script will not work, but was saved anyway: One "Affects" checkbox must be selected!');59 toastr.warning(t`This regex script will not work, but was saved anyway: One "Affects" checkbox must be selected!`);
60 }60 }
6161
62 if (existingScriptIndex !== -1) {62 if (existingScriptIndex !== -1) {
@@ -139,7 +139,7 @@ async function loadRegexScripts() {
139 await onRegexEditorOpenClick(scriptHtml.attr('id'), isScoped);139 await onRegexEditorOpenClick(scriptHtml.attr('id'), isScoped);
140 });140 });
141 scriptHtml.find('.move_to_global').on('click', async function () {141 scriptHtml.find('.move_to_global').on('click', async function () {
142 const confirm = await callGenericPopup('Are you sure you want to move this regex script to global?', POPUP_TYPE.CONFIRM);142 const confirm = await callGenericPopup(t`Are you sure you want to move this regex script to global?`, POPUP_TYPE.CONFIRM);
143143
144 if (!confirm) {144 if (!confirm) {
145 return;145 return;
@@ -150,16 +150,16 @@ async function loadRegexScripts() {
150 });150 });
151 scriptHtml.find('.move_to_scoped').on('click', async function () {151 scriptHtml.find('.move_to_scoped').on('click', async function () {
152 if (this_chid === undefined) {152 if (this_chid === undefined) {
153 toastr.error('No character selected.');153 toastr.error(t`No character selected.`);
154 return;154 return;
155 }155 }
156156
157 if (selected_group) {157 if (selected_group) {
158 toastr.error('Cannot edit scoped scripts in group chats.');158 toastr.error(t`Cannot edit scoped scripts in group chats.`);
159 return;159 return;
160 }160 }
161161
162 const confirm = await callGenericPopup('Are you sure you want to move this regex script to scoped?', POPUP_TYPE.CONFIRM);162 const confirm = await callGenericPopup(t`Are you sure you want to move this regex script to scoped?`, POPUP_TYPE.CONFIRM);
163163
164 if (!confirm) {164 if (!confirm) {
165 return;165 return;
@@ -174,7 +174,7 @@ async function loadRegexScripts() {
174 download(fileData, fileName, 'application/json');174 download(fileData, fileName, 'application/json');
175 });175 });
176 scriptHtml.find('.delete_regex').on('click', async function () {176 scriptHtml.find('.delete_regex').on('click', async function () {
177 const confirm = await callGenericPopup('Are you sure you want to delete this regex script?', POPUP_TYPE.CONFIRM);177 const confirm = await callGenericPopup(t`Are you sure you want to delete this regex script?`, POPUP_TYPE.CONFIRM);
178178
179 if (!confirm) {179 if (!confirm) {
180 return;180 return;
@@ -483,10 +483,10 @@ async function onRegexImportObjectChange(regexScript, isScoped) {
483483
484 saveSettingsDebounced();484 saveSettingsDebounced();
485 await loadRegexScripts();485 await loadRegexScripts();
486 toastr.success(`Regex script "${regexScript.scriptName}" imported.`);486 toastr.success(t`Regex script "${regexScript.scriptName}" imported.`);
487 } catch (error) {487 } catch (error) {
488 console.log(error);488 console.log(error);
489 toastr.error('Invalid regex object.');489 toastr.error(t`Invalid regex object.`);
490 return;490 return;
491 }491 }
492}492}
@@ -578,12 +578,12 @@ jQuery(async () => {
578 });578 });
579 $('#open_scoped_editor').on('click', function () {579 $('#open_scoped_editor').on('click', function () {
580 if (this_chid === undefined) {580 if (this_chid === undefined) {
581 toastr.error('No character selected.');581 toastr.error(t`No character selected.`);
582 return;582 return;
583 }583 }
584584
585 if (selected_group) {585 if (selected_group) {
586 toastr.error('Cannot edit scoped scripts in group chats.');586 toastr.error(t`Cannot edit scoped scripts in group chats.`);
587 return;587 return;
588 }588 }
589589
@@ -707,12 +707,12 @@ jQuery(async () => {
707707
708 $('#regex_scoped_toggle').on('input', function () {708 $('#regex_scoped_toggle').on('input', function () {
709 if (this_chid === undefined) {709 if (this_chid === undefined) {
710 toastr.error('No character selected.');710 toastr.error(t`No character selected.`);
711 return;711 return;
712 }712 }
713713
714 if (selected_group) {714 if (selected_group) {
715 toastr.error('Cannot edit scoped scripts in group chats.');715 toastr.error(t`Cannot edit scoped scripts in group chats.`);
716 return;716 return;
717 }717 }
718718
public/scripts/extensions/regex/style.css+1 -1
@@ -15,7 +15,7 @@
15}15}
1616
17.regex-script-container:empty::after {17.regex-script-container:empty::after {
18 content: "No scripts found";18 content: attr(no-scripts-text);
19 font-size: 0.95em;19 font-size: 0.95em;
20 opacity: 0.7;20 opacity: 0.7;
21 display: block;21 display: block;
public/scripts/openai.js+1 -1
@@ -1956,7 +1956,7 @@ function saveModelList(data) {
1956}1956}
19571957
1958function appendOpenRouterOptions(model_list, groupModels = false, sort = false) {1958function appendOpenRouterOptions(model_list, groupModels = false, sort = false) {
1959 $('#model_openrouter_select').append($('<option>', { value: openrouter_website_model, text: 'Use OpenRouter website setting' }));1959 $('#model_openrouter_select').append($('<option>', { value: openrouter_website_model, text: t`Use OpenRouter website setting` }));
19601960
1961 const appendOption = (model, parent = null) => {1961 const appendOption = (model, parent = null) => {
1962 (parent || $('#model_openrouter_select')).append(1962 (parent || $('#model_openrouter_select')).append(