Switch tracking key to accountStorage

549fae4015c049f2d194daa7176f5df1b67422ea

Wolfsblvt <wolfsblvt@gmail.com>

1 files changed, +4 -3Ignore whitespace
public/scripts/i18n.js+4 -3
@@ -1,5 +1,6 @@
11import { registerDebugFunction } from './power-user.js';
22import { updateSecretDisplay } from './secrets.js';
3+import { accountStorage } from './util/AccountStorage.js';
34
45const storageKey = 'language';
56const overrideLanguage = localStorage.getItem(storageKey);
@@ -291,7 +292,7 @@ export async function initLocales() {
291292 attributeFilter: ['data-i18n'],
292293 });
293294
294295 if (localStorageaccountStorage.getItem('trackDynamicTranslate') === 'true' && isSupportedNonEnglish()) {
295296 trackMissingDynamicTranslate = new Set();
296297 }
297298
@@ -304,8 +305,8 @@ export async function initLocales() {
304305 'This includes things translated via the t`...` function and translate(). It will only track strings translated <b>after</b> this is toggled on, '
305306 + '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.',
306307 () => {
307308 const isTracking = localStorageaccountStorage.getItem('trackDynamicTranslate') !== 'true';
308309 localStorageaccountStorage.setItem('trackDynamicTranslate', isTracking ? 'true' : 'false');
309310 if (isTracking && isSupportedNonEnglish()) {
310311 trackMissingDynamicTranslate = new Set();
311312 toastr.success('Dynamic translation tracking enabled.');