mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Work on tl
This commit is contained in:
@@ -2401,7 +2401,8 @@
|
||||
"Kiwibunga": "Настолько пусто, что киви прилетела посидеть",
|
||||
"Pump-a-Rum": "Пу-пу-пу",
|
||||
"Croak it": "Только кваканье лягушек и стрёкот сверчков",
|
||||
"${0} ${1} hidden.": "Персонажей скрыто: ${0}.",
|
||||
"${0} character hidden.": "Персонажей скрыто: ${0}.",
|
||||
"${0} characters hidden.": "Персонажей скрыто: ${0}.",
|
||||
"pagination_of": "из",
|
||||
"/ page": "/ стр.",
|
||||
"Context Length": "Размер контекста",
|
||||
@@ -2412,7 +2413,7 @@
|
||||
"Duplicate": "Клонировать",
|
||||
"Next page": "След. страница",
|
||||
"Previous page": "Пред. страница",
|
||||
"Group:": "Группа:",
|
||||
"Group: ${0}": "Группа: ${0}",
|
||||
"You deleted a character/chat and arrived back here for safety reasons! Pick another character!": "Вы удалили персонажа или чат, и мы из соображений безопасности перенесли вас на эту страницу! Выберите другого персонажа!",
|
||||
"Group is empty.": "Группа пуста.",
|
||||
"No characters available": "Персонажей нет",
|
||||
|
@@ -1446,7 +1446,7 @@ function getHiddenBlock(hidden) {
|
||||
const hiddenBlock = `
|
||||
<div class="text_block hidden_block">
|
||||
<small>
|
||||
<p>` + t`${hidden} ${hidden > 1 ? 'characters' : 'character'} hidden.` + `</p>
|
||||
<p>` + (hidden > 1 ? t`${hidden} characters hidden.` : t`${hidden} character hidden.`) + `</p>
|
||||
<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>
|
||||
</small>
|
||||
</div>`;
|
||||
@@ -8429,15 +8429,15 @@ export function callPopup(text, type, inputValue = '', { okButton, rows, wide, w
|
||||
function getOkButtonText() {
|
||||
if (['text', 'char_not_selected'].includes(popup_type)) {
|
||||
$dialoguePopupCancel.css('display', 'none');
|
||||
return okButton ?? 'Ok';
|
||||
return okButton ?? t`Ok`;
|
||||
} else if (['delete_extension'].includes(popup_type)) {
|
||||
return okButton ?? 'Ok';
|
||||
return okButton ?? t`Ok`;
|
||||
} else if (['new_chat', 'confirm'].includes(popup_type)) {
|
||||
return okButton ?? t`Yes`;
|
||||
} else if (['input'].includes(popup_type)) {
|
||||
return okButton ?? t`Save`;
|
||||
}
|
||||
return okButton ?? 'Delete';
|
||||
return okButton ?? t`Delete`;
|
||||
}
|
||||
|
||||
dialogueCloseStop = true;
|
||||
|
@@ -6,6 +6,7 @@ import { SlashCommand } from './slash-commands/SlashCommand.js';
|
||||
import { SlashCommandParser } from './slash-commands/SlashCommandParser.js';
|
||||
import { flashHighlight, stringFormat } from './utils.js';
|
||||
import { t } from './i18n.js';
|
||||
import { Popup } from './popup.js';
|
||||
|
||||
const BG_METADATA_KEY = 'custom_background';
|
||||
const LIST_METADATA_KEY = 'chat_backgrounds';
|
||||
@@ -291,7 +292,7 @@ async function onDeleteBackgroundClick(e) {
|
||||
const bgToDelete = $(this).closest('.bg_example');
|
||||
const url = bgToDelete.data('url');
|
||||
const isCustom = bgToDelete.attr('custom') === 'true';
|
||||
const confirm = await callPopup('<h3>' + t`Delete the background?` + '</h3>', 'confirm');
|
||||
const confirm = await Popup.show.confirm(t`Delete the background?`, null);
|
||||
const bg = bgToDelete.attr('bgfile');
|
||||
|
||||
if (confirm) {
|
||||
|
@@ -1808,7 +1808,7 @@ async function createGroup() {
|
||||
const memberNames = characters.filter(x => members.includes(x.avatar)).map(x => x.name).join(', ');
|
||||
|
||||
if (!name) {
|
||||
name = t`Group:` + ` ${memberNames}`;
|
||||
name = t`Group: ${memberNames}`;
|
||||
}
|
||||
|
||||
const avatar_url = $('#group_avatar_preview img').attr('src');
|
||||
|
@@ -3851,7 +3851,7 @@ function createLogitBiasListItem(entry) {
|
||||
}
|
||||
|
||||
async function createNewLogitBiasPreset() {
|
||||
const name = await callPopup(t`Preset name:`, 'input');
|
||||
const name = await Popup.show.input(t`Preset name:`, null);
|
||||
|
||||
if (!name) {
|
||||
return;
|
||||
|
@@ -1656,14 +1656,7 @@ async function onTagDeleteClick() {
|
||||
const tag = tags.find(x => x.id === id);
|
||||
const otherTags = sortTags(tags.filter(x => x.id !== id).map(x => ({ id: x.id, name: x.name })));
|
||||
|
||||
const popupContent = $(`
|
||||
<h3>` + t`Delete Tag` + `</h3>
|
||||
<div>` + t`Do you want to delete the tag` + ` <div id="tag_to_delete" class="tags_inline inline-flex margin-r2"></div>?</div>
|
||||
<div class="m-t-2 marginBot5">` + t`If you want to merge all references to this tag into another tag, select it below:` + `</div>
|
||||
<select id="merge_tag_select">
|
||||
<option value="">--- None ---</option>
|
||||
${otherTags.map(x => `<option value="${x.id}">${x.name}</option>`).join('')}
|
||||
</select>`);
|
||||
const popupContent = $(await renderTemplateAsync('deleteTag', {otherTags}));
|
||||
|
||||
appendTagToList(popupContent.find('#tag_to_delete'), tag);
|
||||
|
||||
|
9
public/scripts/templates/deleteTag.html
Normal file
9
public/scripts/templates/deleteTag.html
Normal file
@@ -0,0 +1,9 @@
|
||||
<h3 data-i18n="Delete Tag">Delete Tag</h3>
|
||||
<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>
|
||||
<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>
|
||||
<select id="merge_tag_select">
|
||||
<option value="">--- None ---</option>
|
||||
{{#each otherTags}}
|
||||
<option value="{{this.id}}">{{this.name}}</option>
|
||||
{{/each}}
|
||||
</select>
|
Reference in New Issue
Block a user