Lint the use of data-i18n attributes

66a862f797d0a86291925f1238941dbf3b845bea

Cohee <18619528+Cohee1207@users.noreply.github.com>

3 files changed, +70 -37Showing whitespace changes
public/index.html+68 -35
@@ -820,8 +820,8 @@
820820 </div>
821821 </div>
822822 <div class="range-block m-t-1">
823823 <div class="range-block-title openai_restorable" data-i18n="World Info Format Template">
824824 <span data-i18n="World Info Format Template">World Info format template</span>
825825 <div id="wi_format_restore" data-i18n="[title]Restore default format" title="Restore default format" class="right_menu_button">
826826 <div class="fa-solid fa-clock-rotate-left"></div>
827827 </div>
@@ -1524,15 +1524,15 @@
15241524 <div class="">
15251525 <label class="checkbox_label" for="early_stopping_textgenerationwebui">
15261526 <input type="checkbox" id="early_stopping_textgenerationwebui" />
15271527 <small data-i18n="Early Stopping">Early Stopping</small>
15281528 <div class="fa-solid fa-circle-info opacity50p" data-i18n="[title]Controls the stopping condition for beam search. If checked, the generation stops as soon as there are '# of Beams' sequences. If not checked, a heuristic is applied and the generation is stopped when it's very unlikely to find better candidates." title="Controls the stopping condition for beam search. If checked, the generation stops as soon as there are '# of Beams' sequences. If not checked, a heuristic is applied and the generation is stopped when it's very unlikely to find better candidates."></div>
1529- </small>
15301529 </label>
15311530 </div>
15321531 </div>
15331532 </div>
15341533 <div data-tg-type="ooba" id="contrastiveSearchBlock" name="contrastiveSearchBlock" class="alignitemscenter flex-container flexFlowColumn flexBasis48p flexGrow flexShrink gap0">
15351534 <h4 class="textAlignCenter" data-i18n="Contrastive search">Contrastive Search
1535+ <span data-i18n="Contrastive search">Contrastive Search</span>
15361536 <div class=" fa-solid fa-circle-info opacity50p " data-i18n="Contrastive_search_txt" title="A sampler that encourages diversity while maintaining coherence, by exploiting the isotropicity of the representation space of most LLMs. For details, see the paper A Contrastive Framework for Neural Text Generation by Su et al. (2022)."></div>
15371537 </h4>
15381538 <div class="alignitemscenter flex-container flexFlowColumn wide100p gap0">
@@ -1566,9 +1566,8 @@
15661566 </label>
15671567 <label data-tg-type="vllm, aphrodite, infermaticai" class="checkbox_label" for="ignore_eos_token_textgenerationwebui">
15681568 <input type="checkbox" id="ignore_eos_token_textgenerationwebui" />
15691569 <small data-i18n="Ignore EOS Token">Ignore EOS Token</small>
15701570 <div class="fa-solid fa-circle-info opacity50p " data-i18n="[title]Ignore the EOS Token even if it generates." title="Ignore the EOS Token even if it generates."></div>
1571- </small>
15721571 </label>
15731572 <label class="checkbox_label flexGrow flexShrink" for="skip_special_tokens_textgenerationwebui">
15741573 <input type="checkbox" id="skip_special_tokens_textgenerationwebui" />
@@ -1629,7 +1628,8 @@
16291628 </div>
16301629 <div id="cfg_block_ooba" data-tg-type="ooba, tabby" class="wide100p">
16311630 <hr class="width100p">
16321631 <h4 data-i18n="CFG" class="textAlignCenter">CFG
1632+ <span data-i18n="CFG">CFG</span>
16331633 <div class="margin5 fa-solid fa-circle-info opacity50p " data-i18n="[title]Classifier Free Guidance. More helpful tip coming soon" title="Classifier Free Guidance. More helpful tip coming soon."></div>
16341634 </h4>
16351635 <div class="alignitemscenter flex-container flexFlowColumn flexShrink gap0">
@@ -1965,8 +1965,10 @@
19651965 <div id="logit_bias_openai" class="range-block-title openai_restorable" data-i18n="Logit Bias">
19661966 Logit Bias
19671967 </div>
19681968 <div class="toggle-description justifyLeft" data-i18n="Helps to ban or reenforce the usage of certain words">
19691969 <span data-i18n="Helps to ban or reinforcereenforce the usage of certain tokens.words">Helps Confirmto tokenban parsingor withreinforce <athe target="_blank"usage href="https://platform.openaiof certain tokens.com/tokenizer/">Tokenizer</aspan>.
1970+ <span data-i18n="Confirm token parsing with">Confirm token parsing with</span>
1971+ <a target="_blank" href="https://platform.openai.com/tokenizer/" data-i18n="Tokenizer">Tokenizer</a>.
19701972 </div>
19711973 <div class="openai_logit_bias_preset_form">
19721974 <select id="openai_logit_bias_preset">
@@ -2267,8 +2269,8 @@
22672269 <div data-tg-type="mancer" class="flex-container flexFlowColumn">
22682270 <div class="flex-container flexFlowColumn">
22692271 </div>
2270- <h4 data-i18n="Mancer API key">
2272+ <h4>
2271- Mancer API key
2273+ <span data-i18n="Mancer API key">Mancer API key</span>
22722274 <a href="https://mancer.tech/" class="notes-link" target="_blank">
22732275 <span class="fa-solid fa-circle-question note-link-span"></span>
22742276 </a>
@@ -2615,8 +2617,9 @@
26152617 </div>
26162618 <div class="toggle-description justifyLeft">
26172619 <span data-i18n="Saved addresses and passwords.">
26182620 Saved addresses and passwords.<br>
26192621 </span>
2622+ <br>
26202623 </div>
26212624 <div class="openai_logit_bias_preset_form">
26222625 <select id="openai_proxy_preset">
@@ -2629,8 +2632,9 @@
26292632 </div>
26302633 <div class="toggle-description justifyLeft">
26312634 <span data-i18n="This will show up as your saved preset.">
26322635 This will show up as your saved preset.<br>
26332636 </span>
2637+ <br>
26342638 </div>
26352639 <div class="wide100p">
26362640 <input id="openai_reverse_proxy_name" type="text" class="text_pole" placeholder="..." />
@@ -2640,8 +2644,9 @@
26402644 </div>
26412645 <div class="toggle-description justifyLeft wide100p">
26422646 <span data-i18n="Alternative server URL (leave empty to use the default value).">
26432647 Alternative server URL (leave empty to use the default value).<br>
26442648 </span>
2649+ <br>
26452650 </div>
26462651 <div class="wide100p">
26472652 <input id="openai_reverse_proxy" type="text" class="text_pole" placeholder="https://api.openai.com/v1" />
@@ -2654,8 +2659,9 @@
26542659 </div>
26552660 <div class="toggle-description justifyLeft">
26562661 <span data-i18n="Will be used as a password for the proxy instead of API key.">
26572662 Will be used as a password for the proxy instead of API key.<br>
26582663 </span>
2664+ <br>
26592665 </div>
26602666 <div class="flex-container width100p">
26612667 <input id="openai_proxy_password" type="password" class="text_pole flex1" placeholder="" form="openai_form" autocomplete="off" />
@@ -3743,7 +3749,11 @@
37433749 <div id="wiTopBlock" class="flex-container">
37443750 <div id="WIMultiSelector" class="flex1 flex alignSelfStart range-block">
37453751 <div class="range-block-title justifyLeft">
3746- <span data-i18n="Active World(s) for all chats"><small>Active World(s) for all chats</small></span>
3752+ <span>
3753+ <small data-i18n="Active World(s) for all chats">
3754+ Active World(s) for all chats
3755+ </small>
3756+ </span>
37473757 </div>
37483758 <div class="range-block-range">
37493759 <select id="world_info" class="select2_multi_sameline" multiple>
@@ -4068,7 +4078,10 @@
40684078
40694079 <div class="alignitemscenter flex-container flexFlowColumn flexBasis48p flexGrow flexShrink gap0">
40704080 <small>
4071- <span data-i18n="Chat Width">Chat Width <i class="fa-solid fa-desktop"></i></span>
4081+ <span>
4082+ <span data-i18n="Chat Width">Chat Width</span>
4083+ <i class="fa-solid fa-desktop"></i>
4084+ </span>
40724085 <div class="fa-solid fa-circle-info opacity50p" data-i18n="[title]Width of the main chat window in % of screen width" title="Width of the main chat window in % of screen width"></div>
40734086 </small>
40744087 <input class="neo-range-slider" type="range" id="chat_width_slider" name="chat_width_slider" min="25" max="100" step="1">
@@ -4240,7 +4253,7 @@
42404253 <div id="reload_chat" class="menu_button whitespacenowrap" data-i18n="[title]Reload and redraw the currently open chat" title="Reload and redraw the currently open chat.">
42414254 <small data-i18n="Reload Chat">Reload Chat</small>
42424255 </div>
42434256 <div id="debug_menu" class="menu_button whitespacenowrap" data-i18n="Debug Menu">
42444257 <small data-i18n="Debug Menu">Debug Menu</small>
42454258 </div>
42464259 </div>
@@ -4359,8 +4372,10 @@
43594372 </div>
43604373 </div>
43614374 <div id="examples-behavior-block">
4362- <label data-i18n="Example Messages Behavior">
4375+ <label>
43634376 <small> data-i18n="Example Messages Behavior:</small">
4377+ Example Messages Behavior:
4378+ </small>
43644379 </label>
43654380 <select id="example_messages_behavior">
43664381 <option value="normal" data-i18n="Gradual push-out">Gradual push-out</option>
@@ -4524,7 +4539,9 @@
45244539 </label>
45254540 <div class="flex-container">
45264541 <div class="flex1" title="Determines how entries are found for autocomplete." data-i18n="[title]Determines how entries are found for autocomplete.">
4527- <label for="stscript_matching" data-i18n="Autocomplete Matching"><small>Matching</small></label>
4542+ <label for="stscript_matching">
4543+ <small data-i18n="Autocomplete Matching">Matching</small>
4544+ </label>
45284545 <select id="stscript_matching">
45294546 <option data-i18n="Starts with" value="strict">Starts with</option>
45304547 <option data-i18n="Includes" value="includes">Includes</option>
@@ -4532,7 +4549,9 @@
45324549 </select>
45334550 </div>
45344551 <div class="flex1" title="Sets the style of the autocomplete." data-i18n="[title]Sets the style of the autocomplete.">
4535- <label for="stscript_autocomplete_style" data-i18n="Autocomplete Style"><small>Style</small></label>
4552+ <label for="stscript_autocomplete_style">
4553+ <small data-i18n="Autocomplete Style">Style</small>
4554+ </label>
45364555 <div class="flex-container flexFlowRow alignItemsBaseline">
45374556 <select id="stscript_autocomplete_style">
45384557 <option data-i18n="Follow Theme" value="theme">Follow Theme</option>
@@ -4544,8 +4563,8 @@
45444563 </div>
45454564 </div>
45464565 <div title="Determines which keys select an item from the AutoComplete suggestions">
45474566 <label data-i18n="Keyboard">
45484567 <small data-i18n="Keyboard">Keyboard:</small>
45494568 </label>
45504569 <select id="stscript_autocomplete_select">
45514570 <option value="3" data-i18n="Select with Tab or Enter">Select with Tab or Enter</option>
@@ -4559,7 +4578,9 @@
45594578 <input class="neo-range-input" type="number" min="0.5" max="2" step="0.01" data-for="stscript_autocomplete_font_scale" id="stscript_autocomplete_font_scale_counter">
45604579 </div>
45614580 <div title="Sets the width of the autocomplete." data-i18n="[title]Sets the width of the autocomplete.">
4562- <label for="stscript_autocomplete_width" data-i18n="Autocomplete Width"><small>Width</small></label>
4581+ <label for="stscript_autocomplete_width">
4582+ <small data-i18n="Autocomplete Width">Width</small>
4583+ </label>
45634584 <div class="doubleRangeContainer">
45644585 <div class="doubleRangeInputContainer">
45654586 <input type="range" id="stscript_autocomplete_width_left" min="0" max="2" step="1">
@@ -4587,14 +4608,18 @@
45874608 <label><small data-i18n="Parser Flags">Parser Flags</small></label>
45884609 <label class="checkbox_label" title="Switch to stricter escaping, allowing all delimiting characters to be escaped with a backslash, and backslashes to be escaped as well." data-i18n="[title]Switch to stricter escaping, allowing all delimiting characters to be escaped with a backslash, and backslashes to be escaped as well.">
45894610 <input id="stscript_parser_flag_strict_escaping" type="checkbox" />
4590- <span data-i18n="STRICT_ESCAPING"><small>STRICT_ESCAPING</small></span>
4611+ <span>
4612+ <small data-i18n="STRICT_ESCAPING">STRICT_ESCAPING</small>
4613+ </span>
45914614 <a href="https://docs.sillytavern.app/usage/st-script/#strict-escaping" target="_blank" class="notes-link">
45924615 <span class="fa-solid fa-circle-question note-link-span"></span>
45934616 </a>
45944617 </label>
45954618 <label class="checkbox_label" title="Prevents {{getvar::}} {{getglobalvar::}} macros from having literal macro-like values auto-evaluated.&NewLine;e.g. &quot;{{newline}}&quot; remains as literal string &quot;{{newline}}&quot;&NewLine;&NewLine;(This is done by internally replacing {{getvar::}} {{getglobalvar::}} macros with scoped variables.)" data-i18n="[title]stscript_parser_flag_replace_getvar_label">
45964619 <input id="stscript_parser_flag_replace_getvar" type="checkbox" />
4597- <span data-i18n="REPLACE_GETVAR"><small>REPLACE_GETVAR</small></span>
4620+ <span>
4621+ <small data-i18n="REPLACE_GETVAR">REPLACE_GETVAR</small>
4622+ </span>
45984623 <a href="https://docs.sillytavern.app/usage/st-script/#replace-variable-macros" target="_blank" class="notes-link">
45994624 <span class="fa-solid fa-circle-question note-link-span"></span>
46004625 </a>
@@ -4725,10 +4750,12 @@
47254750 <div class="flex-container wide100p alignitemscenter spaceBetween flexNoGap">
47264751 <div class="flex-container alignItemsBaseline wide100p">
47274752 <div class="flex1 flex-container alignItemsBaseline">
47284753 <h3 class="margin0" data-i18n="Persona Management">Persona Management</h3>
4729- <a href="https://docs.sillytavern.app/usage/core-concepts/personas/" target="_blank" data-i18n="How do I use this?">
4754+ <span data-i18n="Persona Management">Persona Management</span>
4755+ <a href="https://docs.sillytavern.app/usage/core-concepts/personas/" target="_blank">
47304756 <span class="fa-solid fa-circle-question note-link-span"></span>
47314757 </a>
4758+ </h3>
47324759 </div>
47334760 <div class="flex-container">
47344761 <div class="menu_button menu_button_icon user_stats_button" data-i18n="[title]Click for stats!" title="Click for stats!">
@@ -5449,7 +5476,12 @@
54495476 <span data-i18n="Examples of dialogue" class="mdhotkey_location">Examples of dialogue</span>
54505477 <i class="editor_maximize fa-solid fa-maximize right_menu_button" data-for="mes_example_textarea" title="Expand the editor" data-i18n="[title]Expand the editor"></i>
54515478 </h4>
5452- <h5 data-i18n="Important to set the character's writing style.">Important to set the character's writing style. <a href="https://docs.sillytavern.app/usage/core-concepts/characterdesign/#examples-of-dialogue" class="notes-link" target="_blank"><span class="fa-solid fa-circle-question note-link-span"></span></a></h5>
5479+ <h5>
5480+ <span data-i18n="Important to set the character's writing style.">Important to set the character's writing style.</span>
5481+ <a href="https://docs.sillytavern.app/usage/core-concepts/characterdesign/#examples-of-dialogue" class="notes-link" target="_blank">
5482+ <span class="fa-solid fa-circle-question note-link-span"></span>
5483+ </a>
5484+ </h5>
54535485 </div>
54545486 <textarea id="mes_example_textarea" class="flexGrow mdHotkeys" name="mes_example" data-i18n="[placeholder](Examples of chat dialog. Begin each example with START on a new line.)" placeholder="(Examples of chat dialog. Begin each example with &lt;START&gt; on a new line.)" form="form_create" rows="6"></textarea>
54555487 <div class="extension_token_counter">
@@ -5525,7 +5557,8 @@
55255557 <div class="character_world range-block flexFlowColumn flex-container">
55265558 <div class="range-block-title">
55275559 <h3>
55285560 <span data-i18n="Select a World Info file for"> Select a World Info file for <span class="character_name"></span></span>:
5561+ <span class="character_name"></span>:
55295562 </h3>
55305563 </div>
55315564 <h4 data-i18n="Primary Lorebook">Primary Lorebook</h4>
@@ -5826,7 +5859,7 @@
58265859 </div>
58275860 <div class="flex2 flex-container flexFlowColumn flexNoGap" data-i18n="[title]Sticky entries will stay active for N messages after being triggered." title="Sticky entries will stay active for N messages after being triggered.">
58285861 <div class="flex-container justifySpaceBetween marginBot5">
58295862 <small class="flex-container alignItemsBaseline" for="sticky" data-i18n="Sticky">
58305863 <span data-i18n="Sticky">
58315864 Sticky
58325865 </span>
@@ -5839,7 +5872,7 @@
58395872 </div>
58405873 <div class="flex2 flex-container flexFlowColumn flexNoGap" data-i18n="[title]Entries with a cooldown can't be activated N messages after being triggered." title="Entries with a cooldown can't be activated N messages after being triggered.">
58415874 <div class="flex-container justifySpaceBetween marginBot5">
58425875 <small class="flex-container alignItemsBaseline" for="cooldown" data-i18n="Cooldown">
58435876 <span data-i18n="Cooldown">
58445877 Cooldown
58455878 </span>
@@ -5852,7 +5885,7 @@
58525885 </div>
58535886 <div class="flex2 flex-container flexFlowColumn flexNoGap" data-i18n="[title]Entries with a delay can't be activated until there are N messages present in the chat." title="Entries with a delay can't be activated until there are N messages present in the chat.">
58545887 <div class="flex-container justifySpaceBetween marginBot5">
58555888 <small class="flex-container alignItemsBaseline" for="delay" data-i18n="Delay">
58565889 <span data-i18n="Delay">
58575890 Delay
58585891 </span>
public/scripts/extensions/expressions/settings.html+1 -1
@@ -40,7 +40,7 @@
4040 <div class="expression_fallback_block m-b-1 m-t-1">
4141 <label for="expression_fallback" data-i18n="Default / Fallback Expression">Default / Fallback Expression</label>
4242 <small data-i18n="Set the default and fallback expression being used when no matching expression is found.">Set the default and fallback expression being used when no matching expression is found.</small>
4343 <select id="expression_fallback" class="flex1 margin0" data-i18n="Fallback Expression" placeholder="Fallback Expression"></select>
4444 </div>
4545 <div class="expression_custom_block m-b-1 m-t-1">
4646 <label for="expression_custom" data-i18n="Custom Expressions">Custom Expressions</label>
public/scripts/extensions/tts/settings.html+1 -1
@@ -57,7 +57,7 @@
5757 </div>
5858 <div id="playback_rate_block" class="range-block">
5959 <hr>
6060 <div class="range-block-title justifyLeft" data-i18n="Audio Playback Speed">
6161 <small data-i18n="Audio Playback Speed">Audio Playback Speed</small>
6262 </div>
6363 <div class="range-block-range-and-counter">