Update tl

This commit is contained in:
Yokayo
2024-11-06 01:33:24 +07:00
parent c8a28137e0
commit 9d664bc679
14 changed files with 181 additions and 94 deletions

View File

@ -3608,8 +3608,8 @@ async function onExportPresetClick() {
const fieldValues = sensitiveFields.filter(field => preset[field]).map(field => `<b>${field}</b>: <code>${preset[field]}</code>`);
const shouldConfirm = fieldValues.length > 0;
const textHeader = 'Your preset contains proxy and/or custom endpoint settings.';
const textMessage = `<div>Do you want to remove these fields before exporting?</div><br>${DOMPurify.sanitize(fieldValues.join('<br>'))}`;
const textHeader = t`Your preset contains proxy and/or custom endpoint settings.`;
const textMessage = `<div>` + t`Do you want to remove these fields before exporting?` + `</div><br>${DOMPurify.sanitize(fieldValues.join('<br>'))}`;
const cancelButton = { text: 'Cancel', result: POPUP_RESULT.CANCELLED, appendAtEnd: true };
const popupOptions = { customButtons: [cancelButton] };
const popupResult = await Popup.show.confirm(textHeader, textMessage, popupOptions);
@ -4365,8 +4365,8 @@ async function onOpenrouterModelSortChange() {
async function onNewPresetClick() {
const popupText = `
<h3>Preset name:</h3>
<h4>Hint: Use a character/group name to bind preset to a specific chat.</h4>`;
<h3>` + t`Preset name:` + `</h3>
<h4>` + t`Hint: Use a character/group name to bind preset to a specific chat.` + `</h4>`;
const name = await callPopup(popupText, 'input', oai_settings.preset_settings_openai);
if (!name) {