mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-03-17 20:40:10 +01:00
Revert "Switch tracking key to accountStorage"
This reverts commit 549fae4015c049f2d194daa7176f5df1b67422ea.
This commit is contained in:
parent
549fae4015
commit
a8f05c92ae
@ -1,6 +1,5 @@
|
|||||||
import { registerDebugFunction } from './power-user.js';
|
import { registerDebugFunction } from './power-user.js';
|
||||||
import { updateSecretDisplay } from './secrets.js';
|
import { updateSecretDisplay } from './secrets.js';
|
||||||
import { accountStorage } from './util/AccountStorage.js';
|
|
||||||
|
|
||||||
const storageKey = 'language';
|
const storageKey = 'language';
|
||||||
const overrideLanguage = localStorage.getItem(storageKey);
|
const overrideLanguage = localStorage.getItem(storageKey);
|
||||||
@ -292,7 +291,7 @@ export async function initLocales() {
|
|||||||
attributeFilter: ['data-i18n'],
|
attributeFilter: ['data-i18n'],
|
||||||
});
|
});
|
||||||
|
|
||||||
if (accountStorage.getItem('trackDynamicTranslate') === 'true' && isSupportedNonEnglish()) {
|
if (localStorage.getItem('trackDynamicTranslate') === 'true' && isSupportedNonEnglish()) {
|
||||||
trackMissingDynamicTranslate = new Set();
|
trackMissingDynamicTranslate = new Set();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -305,8 +304,8 @@ export async function initLocales() {
|
|||||||
'This includes things translated via the t`...` function and translate(). It will only track strings translated <b>after</b> this is toggled on, '
|
'This includes things translated via the t`...` function and translate(). It will only track strings translated <b>after</b> this is toggled on, '
|
||||||
+ 'and when they actually pop up, so refreshing the page and opening popups, etc, is needed. Will only track if the current locale is not English.',
|
+ 'and when they actually pop up, so refreshing the page and opening popups, etc, is needed. Will only track if the current locale is not English.',
|
||||||
() => {
|
() => {
|
||||||
const isTracking = accountStorage.getItem('trackDynamicTranslate') !== 'true';
|
const isTracking = localStorage.getItem('trackDynamicTranslate') !== 'true';
|
||||||
accountStorage.setItem('trackDynamicTranslate', isTracking ? 'true' : 'false');
|
localStorage.setItem('trackDynamicTranslate', isTracking ? 'true' : 'false');
|
||||||
if (isTracking && isSupportedNonEnglish()) {
|
if (isTracking && isSupportedNonEnglish()) {
|
||||||
trackMissingDynamicTranslate = new Set();
|
trackMissingDynamicTranslate = new Set();
|
||||||
toastr.success('Dynamic translation tracking enabled.');
|
toastr.success('Dynamic translation tracking enabled.');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user