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