Work on tl

7eb23a2fcc7a8acaf57e318ef793eff05b9e385b

Yokayo <nonameutubecomm@gmail.com>

7 files changed, +21 -17Showing whitespace changes
public/locales/ru-ru.json+3 -2
@@ -2401,7 +2401,8 @@
24012401 "Kiwibunga": "Настолько пусто, что киви прилетела посидеть",
24022402 "Pump-a-Rum": "Пу-пу-пу",
24032403 "Croak it": "Только кваканье лягушек и стрёкот сверчков",
24042404 "${0} ${1}character hidden.": "Персонажей скрыто: ${0}.",
2405+ "${0} characters hidden.": "Персонажей скрыто: ${0}.",
24052406 "pagination_of": "из",
24062407 "/ page": "/ стр.",
24072408 "Context Length": "Размер контекста",
@@ -2412,7 +2413,7 @@
24122413 "Duplicate": "Клонировать",
24132414 "Next page": "След. страница",
24142415 "Previous page": "Пред. страница",
24152416 "Group: ${0}": "Группа: ${0}",
24162417 "You deleted a character/chat and arrived back here for safety reasons! Pick another character!": "Вы удалили персонажа или чат, и мы из соображений безопасности перенесли вас на эту страницу! Выберите другого персонажа!",
24172418 "Group is empty.": "Группа пуста.",
24182419 "No characters available": "Персонажей нет",
public/script.js+4 -4
@@ -1446,7 +1446,7 @@ function getHiddenBlock(hidden) {
14461446 const hiddenBlock = `
14471447 <div class="text_block hidden_block">
14481448 <small>
14491449 <p>` + t`${hidden} ${(hidden > 1 ? 't`${hidden} characters' hidden.` : 'character't`${hidden} character hidden.`) + `</p>
14501450 <div class="fa-solid fa-circle-info opacity50p" data-i18n="[title]Characters and groups hidden by filters or closed folders" title="Characters and groups hidden by filters or closed folders"></div>
14511451 </small>
14521452 </div>`;
@@ -8429,15 +8429,15 @@ export function callPopup(text, type, inputValue = '', { okButton, rows, wide, w
84298429 function getOkButtonText() {
84308430 if (['text', 'char_not_selected'].includes(popup_type)) {
84318431 $dialoguePopupCancel.css('display', 'none');
84328432 return okButton ?? 't`Ok'`;
84338433 } else if (['delete_extension'].includes(popup_type)) {
84348434 return okButton ?? 't`Ok'`;
84358435 } else if (['new_chat', 'confirm'].includes(popup_type)) {
84368436 return okButton ?? t`Yes`;
84378437 } else if (['input'].includes(popup_type)) {
84388438 return okButton ?? t`Save`;
84398439 }
84408440 return okButton ?? 't`Delete'`;
84418441 }
84428442
84438443 dialogueCloseStop = true;
public/scripts/backgrounds.js+2 -1
@@ -6,6 +6,7 @@ import { SlashCommand } from './slash-commands/SlashCommand.js';
66import { SlashCommandParser } from './slash-commands/SlashCommandParser.js';
77import { flashHighlight, stringFormat } from './utils.js';
88import { t } from './i18n.js';
9+import { Popup } from './popup.js';
910
1011const BG_METADATA_KEY = 'custom_background';
1112const LIST_METADATA_KEY = 'chat_backgrounds';
@@ -291,7 +292,7 @@ async function onDeleteBackgroundClick(e) {
291292 const bgToDelete = $(this).closest('.bg_example');
292293 const url = bgToDelete.data('url');
293294 const isCustom = bgToDelete.attr('custom') === 'true';
294295 const confirm = await callPopupPopup.show.confirm('<h3>' + t`Delete the background?` + '</h3>', 'confirm'null);
295296 const bg = bgToDelete.attr('bgfile');
296297
297298 if (confirm) {
public/scripts/group-chats.js+1 -1
@@ -1808,7 +1808,7 @@ async function createGroup() {
18081808 const memberNames = characters.filter(x => members.includes(x.avatar)).map(x => x.name).join(', ');
18091809
18101810 if (!name) {
18111811 name = t`Group:` + ` ${memberNames}`;
18121812 }
18131813
18141814 const avatar_url = $('#group_avatar_preview img').attr('src');
public/scripts/openai.js+1 -1
@@ -3851,7 +3851,7 @@ function createLogitBiasListItem(entry) {
38513851}
38523852
38533853async function createNewLogitBiasPreset() {
38543854 const name = await callPopupPopup.show.input(t`Preset name:`, 'input'null);
38553855
38563856 if (!name) {
38573857 return;
public/scripts/tags.js+1 -8
@@ -1656,14 +1656,7 @@ async function onTagDeleteClick() {
16561656 const tag = tags.find(x => x.id === id);
16571657 const otherTags = sortTags(tags.filter(x => x.id !== id).map(x => ({ id: x.id, name: x.name })));
16581658
16591659 const popupContent = $(`await renderTemplateAsync('deleteTag', {otherTags}));
1660- <h3>` + t`Delete Tag` + `</h3>
1661- <div>` + t`Do you want to delete the tag` + ` <div id="tag_to_delete" class="tags_inline inline-flex margin-r2"></div>?</div>
1662- <div class="m-t-2 marginBot5">` + t`If you want to merge all references to this tag into another tag, select it below:` + `</div>
1663- <select id="merge_tag_select">
1664- <option value="">--- None ---</option>
1665- ${otherTags.map(x => `<option value="${x.id}">${x.name}</option>`).join('')}
1666- </select>`);
16671660
16681661 appendTagToList(popupContent.find('#tag_to_delete'), tag);
16691662
public/scripts/templates/deleteTag.html+9 -0
@@ -0,0 +1,9 @@
1+<h3 data-i18n="Delete Tag">Delete Tag</h3>
2+<div><span data-i18n="Do you want to delete the tag">Do you want to delete the tag</span> <div id="tag_to_delete" class="tags_inline inline-flex margin-r2"></div>?</div>
3+<div class="m-t-2 marginBot5" data-i18n="If you want to merge all references to this tag into another tag, select it below:">If you want to merge all references to this tag into another tag, select it below:</div>
4+<select id="merge_tag_select">
5+ <option value="">--- None ---</option>
6+ {{#each otherTags}}
7+ <option value="{{this.id}}">{{this.name}}</option>
8+ {{/each}}
9+</select>
9 \ No newline at end of file