Move translation to HTML template

b4c275f9e4a211add06215593cc45266bcb387cc

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

2 files changed, +2 -4Ignore whitespace
public/scripts/extensions.js+1 -3
@@ -7,7 +7,7 @@ import { renderTemplate, renderTemplateAsync } from './templates.js';
7import { delay, isSubsetOf, setValueByPath } from './utils.js';7import { delay, isSubsetOf, setValueByPath } from './utils.js';
8import { getContext } from './st-context.js';8import { getContext } from './st-context.js';
9import { isAdmin } from './user.js';9import { isAdmin } from './user.js';
10import { t,translate } from './i18n.js';10import { t } from './i18n.js';
11import { debounce_timeout } from './constants.js';11import { debounce_timeout } from './constants.js';
1212
13export {13export {
@@ -416,8 +416,6 @@ async function addExtensionsButtonAndMenu() {
416 $('#leftSendForm').append(buttonHTML);416 $('#leftSendForm').append(buttonHTML);
417417
418 const button = $('#extensionsMenuButton');418 const button = $('#extensionsMenuButton');
419 const title = translate(button.attr('title'));
420 button.attr('title', title);
421 const dropdown = $('#extensionsMenu');419 const dropdown = $('#extensionsMenu');
422 let isDropdownVisible = false;420 let isDropdownVisible = false;
423421
public/scripts/templates/wandButton.html+1 -1
@@ -1 +1 @@
1<div id="extensionsMenuButton" style="display: none;" class="fa-solid fa-magic-wand-sparkles interactable" title="Extensions" /></div>1<div id="extensionsMenuButton" style="display: none;" class="fa-solid fa-magic-wand-sparkles interactable" title="Extensions" data-i18n="Extensions" /></div>