Merge pull request #2064 from Yokayo/staging

Update Russian translation and add new localized strings
This commit is contained in:
Cohee 2024-04-11 19:23:01 +03:00 committed by GitHub
commit 9e08bd5522
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 453 additions and 386 deletions

View File

@ -2248,7 +2248,7 @@
</div> </div>
<div class="flex-container"> <div class="flex-container">
<div id="api_button_textgenerationwebui" class="api_button menu_button" type="submit" data-i18n="Connect" data-server-connect="ooba_blocking,aphrodite,tabby,koboldcpp">Connect</div> <div id="api_button_textgenerationwebui" class="api_button menu_button" type="submit" data-i18n="Connect" data-server-connect="ooba_blocking,aphrodite,tabby,koboldcpp">Connect</div>
<div data-tg-type="openrouter" class="menu_button menu_button_icon openrouter_authorize" title="Get your OpenRouter API token using OAuth flow. You will be redirected to openrouter.ai" data-i18n="[title]Get your OpenRouter API token using OAuth flow. You will be redirected to openrouter.ai">Authorize</div> <div data-tg-type="openrouter" class="menu_button menu_button_icon openrouter_authorize" title="Get your OpenRouter API token using OAuth flow. You will be redirected to openrouter.ai" data-i18n="Authorize;[title]Get your OpenRouter API token using OAuth flow. You will be redirected to openrouter.ai">Authorize</div>
<div class="api_loading menu_button" data-i18n="Cancel">Cancel</div> <div class="api_loading menu_button" data-i18n="Cancel">Cancel</div>
</div> </div>
<label data-tg-type="ooba,aphrodite" class="checkbox_label margin-bot-10px" for="legacy_api_textgenerationwebui"> <label data-tg-type="ooba,aphrodite" class="checkbox_label margin-bot-10px" for="legacy_api_textgenerationwebui">
@ -2338,7 +2338,7 @@
<div class="wide100p"> <div class="wide100p">
<input id="openai_reverse_proxy" type="text" class="text_pole" placeholder="https://api.openai.com/v1" maxlength="500" /> <input id="openai_reverse_proxy" type="text" class="text_pole" placeholder="https://api.openai.com/v1" maxlength="500" />
<small class="reverse_proxy_warning"> <small class="reverse_proxy_warning">
Doesn't work? Try adding <code>/v1</code> at the end! <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>
</small> </small>
</div> </div>
<div class="range-block-title justifyLeft" data-i18n="Proxy Password"> <div class="range-block-title justifyLeft" data-i18n="Proxy Password">
@ -2743,7 +2743,7 @@
<div id="api_button_openai" class="api_button menu_button menu_button_icon" type="submit" data-i18n="Connect">Connect</div> <div id="api_button_openai" class="api_button menu_button menu_button_icon" type="submit" data-i18n="Connect">Connect</div>
<div class="api_loading menu_button" data-i18n="Cancel">Cancel</div> <div class="api_loading menu_button" data-i18n="Cancel">Cancel</div>
<div data-source="custom" id="customize_additional_parameters" class="menu_button menu_button_icon">Additional Parameters</div> <div data-source="custom" id="customize_additional_parameters" class="menu_button menu_button_icon">Additional Parameters</div>
<div data-source="openrouter" class="menu_button menu_button_icon openrouter_authorize" title="Get your OpenRouter API token using OAuth flow. You will be redirected to openrouter.ai" data-i18n="[title]Get your OpenRouter API token using OAuth flow. You will be redirected to openrouter.ai">Authorize</div> <div data-source="openrouter" class="menu_button menu_button_icon openrouter_authorize" title="Get your OpenRouter API token using OAuth flow. You will be redirected to openrouter.ai" data-i18n="Authorize;[title]Get your OpenRouter API token using OAuth flow. You will be redirected to openrouter.ai">Authorize</div>
<div id="test_api_button" class="menu_button menu_button_icon" title="Verifies your API connection by sending a short test message. Be aware that you'll be credited for it!" data-i18n="[title]Verifies your API connection by sending a short test message. Be aware that you'll be credited for it!"><span data-i18n="Test Message">Test Message</span></div> <div id="test_api_button" class="menu_button menu_button_icon" title="Verifies your API connection by sending a short test message. Be aware that you'll be credited for it!" data-i18n="[title]Verifies your API connection by sending a short test message. Be aware that you'll be credited for it!"><span data-i18n="Test Message">Test Message</span></div>
</div> </div>
<div class="online_status"> <div class="online_status">
@ -4092,7 +4092,7 @@
<div id="persona_pagination_container" class="flex1"></div> <div id="persona_pagination_container" class="flex1"></div>
<i id="persona_grid_toggle" class="fa-solid fa-table-cells-large menu_button" data-i18n="[title]Toggle grid view" title="Toggle grid view"></i> <i id="persona_grid_toggle" class="fa-solid fa-table-cells-large menu_button" data-i18n="[title]Toggle grid view" title="Toggle grid view"></i>
</div> </div>
<div id="user_avatar_block"> <div id="user_avatar_block" data-i18n="[no_desc_text]No persona description" no_desc_text="[No description]">
<div class="avatar_upload">+</div> <div class="avatar_upload">+</div>
</div> </div>
<form id="form_upload_avatar" action="javascript:void(null);" method="post" enctype="multipart/form-data"> <form id="form_upload_avatar" action="javascript:void(null);" method="post" enctype="multipart/form-data">
@ -4159,7 +4159,7 @@
<div class="right_menu_button fa-solid fa-list-ul" id="rm_button_characters" title="Select/Create Characters" data-i18n="[title]Select/Create Characters"></div> <div class="right_menu_button fa-solid fa-list-ul" id="rm_button_characters" title="Select/Create Characters" data-i18n="[title]Select/Create Characters"></div>
</div> </div>
<div id="HotSwapWrapper" class="alignitemscenter flex-container margin0auto wide100p"> <div id="HotSwapWrapper" class="alignitemscenter flex-container margin0auto wide100p">
<div class="hotswap avatars_inline flex-container expander"></div> <div class="hotswap avatars_inline flex-container expander" data-i18n="[no_favs]Favorite characters to add them to HotSwaps" no_favs="Favorite characters to add them to HotSwaps"></div>
</div> </div>
</div> </div>
<hr> <hr>
@ -5843,7 +5843,7 @@
<div id="leftSendForm" class="alignContentCenter"> <div id="leftSendForm" class="alignContentCenter">
<div id="options_button" class="fa-solid fa-bars"></div> <div id="options_button" class="fa-solid fa-bars"></div>
</div> </div>
<textarea id="send_textarea" data-i18n="[placeholder]Not connected to API!" placeholder="Not connected to API!" name="text"></textarea> <textarea id="send_textarea" name="text" data-i18n="[no_connection_text]Not connected to API!;[connected_text]Type a message, or /? for help" placeholder="Not connected to API!" no_connection_text="Not connected to API!" connected_text="Type a message, or /? for help"></textarea>
<div id="rightSendForm" class="alignContentCenter"> <div id="rightSendForm" class="alignContentCenter">
<div id="mes_stop" title="Abort request" class="mes_stop" data-i18n="[title]Abort request"> <div id="mes_stop" title="Abort request" class="mes_stop" data-i18n="[title]Abort request">
<i class="fa-solid fa-circle-stop"></i> <i class="fa-solid fa-circle-stop"></i>

File diff suppressed because it is too large Load Diff

View File

@ -5982,7 +5982,7 @@ function getUserAvatarBlock(name) {
const personaName = power_user.personas[name]; const personaName = power_user.personas[name];
const personaDescription = power_user.persona_descriptions[name]?.description; const personaDescription = power_user.persona_descriptions[name]?.description;
template.find('.ch_name').text(personaName || '[Unnamed Persona]'); template.find('.ch_name').text(personaName || '[Unnamed Persona]');
template.find('.ch_description').text(personaDescription || '[No description]').toggleClass('text_muted', !personaDescription); template.find('.ch_description').text(personaDescription || $('#user_avatar_block').attr('no_desc_text')).toggleClass('text_muted', !personaDescription);
template.attr('imgfile', name); template.attr('imgfile', name);
template.find('.avatar').attr('imgfile', name).attr('title', name); template.find('.avatar').attr('imgfile', name).attr('title', name);
template.toggleClass('default_persona', name === power_user.default_persona); template.toggleClass('default_persona', name === power_user.default_persona);

View File

@ -275,7 +275,7 @@ export async function favsToHotswap() {
//helpful instruction message if no characters are favorited //helpful instruction message if no characters are favorited
if (favs.length == 0) { if (favs.length == 0) {
container.html('<small><span><i class="fa-solid fa-star"></i> <span data-i18n="Favorite characters to add them to HotSwaps">Favorite characters to add them to HotSwaps</span></span></small>'); container.html(`<small><span><i class="fa-solid fa-star"></i>${DOMPurify.sanitize(container.attr('no_favs'))}</span></small>`);
return; return;
} }
@ -285,7 +285,8 @@ export async function favsToHotswap() {
//changes input bar and send button display depending on connection status //changes input bar and send button display depending on connection status
function RA_checkOnlineStatus() { function RA_checkOnlineStatus() {
if (online_status == 'no_connection') { if (online_status == 'no_connection') {
$('#send_textarea').attr('placeholder', 'Not connected to API!'); //Input bar placeholder tells users they are not connected const send_textarea = $('#send_textarea');
send_textarea.attr('placeholder', send_textarea.attr('no_connection_text')); //Input bar placeholder tells users they are not connected
$('#send_form').addClass('no-connection'); //entire input form area is red when not connected $('#send_form').addClass('no-connection'); //entire input form area is red when not connected
$('#send_but').addClass('displayNone'); //send button is hidden when not connected; $('#send_but').addClass('displayNone'); //send button is hidden when not connected;
$('#mes_continue').addClass('displayNone'); //continue button is hidden when not connected; $('#mes_continue').addClass('displayNone'); //continue button is hidden when not connected;
@ -294,7 +295,8 @@ function RA_checkOnlineStatus() {
connection_made = false; connection_made = false;
} else { } else {
if (online_status !== undefined && online_status !== 'no_connection') { if (online_status !== undefined && online_status !== 'no_connection') {
$('#send_textarea').attr('placeholder', 'Type a message, or /? for help'); //on connect, placeholder tells user to type message const send_textarea = $('#send_textarea');
send_textarea.attr('placeholder', send_textarea.attr('connected_text')); //on connect, placeholder tells user to type message
$('#send_form').removeClass('no-connection'); $('#send_form').removeClass('no-connection');
$('#API-status-top').removeClass('fa-plug-circle-exclamation redOverlayGlow'); $('#API-status-top').removeClass('fa-plug-circle-exclamation redOverlayGlow');
$('#API-status-top').addClass('fa-plug'); $('#API-status-top').addClass('fa-plug');

View File

@ -404,7 +404,7 @@ function onPersonaDescriptionInput() {
} }
$(`.avatar-container[imgfile="${user_avatar}"] .ch_description`) $(`.avatar-container[imgfile="${user_avatar}"] .ch_description`)
.text(power_user.persona_description || '[No description]') .text(power_user.persona_description || $('#user_avatar_block').attr('no_desc_text'))
.toggleClass('text_muted', !power_user.persona_description); .toggleClass('text_muted', !power_user.persona_description);
saveSettingsDebounced(); saveSettingsDebounced();
} }