Work on tl
| @@ -2401,7 +2401,8 @@ | ||
| 2401 | 2401 | "Kiwibunga": "Настолько пусто, что киви прилетела посидеть", |
| 2402 | 2402 | "Pump-a-Rum": "Пу-пу-пу", |
| 2403 | 2403 | "Croak it": "Только кваканье лягушек и стрёкот сверчков", |
| 2404 | 2404 | "${0} ${1}character hidden.": "Персонажей скрыто: ${0}.", |
| 2405 | + "${0} characters hidden.": "Персонажей скрыто: ${0}.", | |
| 2405 | 2406 | "pagination_of": "из", |
| 2406 | 2407 | "/ page": "/ стр.", |
| 2407 | 2408 | "Context Length": "Размер контекста", |
| @@ -2412,7 +2413,7 @@ | ||
| 2412 | 2413 | "Duplicate": "Клонировать", |
| 2413 | 2414 | "Next page": "След. страница", |
| 2414 | 2415 | "Previous page": "Пред. страница", |
| 2415 | 2416 | "Group: ${0}": "Группа: ${0}", |
| 2416 | 2417 | "You deleted a character/chat and arrived back here for safety reasons! Pick another character!": "Вы удалили персонажа или чат, и мы из соображений безопасности перенесли вас на эту страницу! Выберите другого персонажа!", |
| 2417 | 2418 | "Group is empty.": "Группа пуста.", |
| 2418 | 2419 | "No characters available": "Персонажей нет", |
| @@ -1446,7 +1446,7 @@ function getHiddenBlock(hidden) { | ||
| 1446 | 1446 | const hiddenBlock = ` |
| 1447 | 1447 | <div class="text_block hidden_block"> |
| 1448 | 1448 | <small> |
| 1449 | 1449 | <p>` + t`${hidden} ${(hidden > 1 ? 't`${hidden} characters' hidden.` : 'character't`${hidden} character hidden.`) + `</p> |
| 1450 | 1450 | <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> |
| 1451 | 1451 | </small> |
| 1452 | 1452 | </div>`; |
| @@ -8429,15 +8429,15 @@ export function callPopup(text, type, inputValue = '', { okButton, rows, wide, w | ||
| 8429 | 8429 | function getOkButtonText() { |
| 8430 | 8430 | if (['text', 'char_not_selected'].includes(popup_type)) { |
| 8431 | 8431 | $dialoguePopupCancel.css('display', 'none'); |
| 8432 | 8432 | return okButton ?? 't`Ok'`; |
| 8433 | 8433 | } else if (['delete_extension'].includes(popup_type)) { |
| 8434 | 8434 | return okButton ?? 't`Ok'`; |
| 8435 | 8435 | } else if (['new_chat', 'confirm'].includes(popup_type)) { |
| 8436 | 8436 | return okButton ?? t`Yes`; |
| 8437 | 8437 | } else if (['input'].includes(popup_type)) { |
| 8438 | 8438 | return okButton ?? t`Save`; |
| 8439 | 8439 | } |
| 8440 | 8440 | return okButton ?? 't`Delete'`; |
| 8441 | 8441 | } |
| 8442 | 8442 | |
| 8443 | 8443 | dialogueCloseStop = true; |
| @@ -6,6 +6,7 @@ import { SlashCommand } from './slash-commands/SlashCommand.js'; | ||
| 6 | 6 | import { SlashCommandParser } from './slash-commands/SlashCommandParser.js'; |
| 7 | 7 | import { flashHighlight, stringFormat } from './utils.js'; |
| 8 | 8 | import { t } from './i18n.js'; |
| 9 | +import { Popup } from './popup.js'; | |
| 9 | 10 | |
| 10 | 11 | const BG_METADATA_KEY = 'custom_background'; |
| 11 | 12 | const LIST_METADATA_KEY = 'chat_backgrounds'; |
| @@ -291,7 +292,7 @@ async function onDeleteBackgroundClick(e) { | ||
| 291 | 292 | const bgToDelete = $(this).closest('.bg_example'); |
| 292 | 293 | const url = bgToDelete.data('url'); |
| 293 | 294 | const isCustom = bgToDelete.attr('custom') === 'true'; |
| 294 | 295 | const confirm = await callPopupPopup.show.confirm('<h3>' + t`Delete the background?` + '</h3>', 'confirm'null); |
| 295 | 296 | const bg = bgToDelete.attr('bgfile'); |
| 296 | 297 | |
| 297 | 298 | if (confirm) { |
| @@ -1808,7 +1808,7 @@ async function createGroup() { | ||
| 1808 | 1808 | const memberNames = characters.filter(x => members.includes(x.avatar)).map(x => x.name).join(', '); |
| 1809 | 1809 | |
| 1810 | 1810 | if (!name) { |
| 1811 | 1811 | name = t`Group:` + ` ${memberNames}`; |
| 1812 | 1812 | } |
| 1813 | 1813 | |
| 1814 | 1814 | const avatar_url = $('#group_avatar_preview img').attr('src'); |
| @@ -3851,7 +3851,7 @@ function createLogitBiasListItem(entry) { | ||
| 3851 | 3851 | } |
| 3852 | 3852 | |
| 3853 | 3853 | async function createNewLogitBiasPreset() { |
| 3854 | 3854 | const name = await callPopupPopup.show.input(t`Preset name:`, 'input'null); |
| 3855 | 3855 | |
| 3856 | 3856 | if (!name) { |
| 3857 | 3857 | return; |
| @@ -1656,14 +1656,7 @@ async function onTagDeleteClick() { | ||
| 1656 | 1656 | const tag = tags.find(x => x.id === id); |
| 1657 | 1657 | const otherTags = sortTags(tags.filter(x => x.id !== id).map(x => ({ id: x.id, name: x.name }))); |
| 1658 | 1658 | |
| 1659 | 1659 | 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>`); | |
| 1667 | 1660 | |
| 1668 | 1661 | appendTagToList(popupContent.find('#tag_to_delete'), tag); |
| 1669 | 1662 | |
| @@ -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 | |