Switch tracking key to accountStorage
| @@ -1,5 +1,6 @@ | ||
| 1 | 1 | import { registerDebugFunction } from './power-user.js'; |
| 2 | 2 | import { updateSecretDisplay } from './secrets.js'; |
| 3 | +import { accountStorage } from './util/AccountStorage.js'; | |
| 3 | 4 | |
| 4 | 5 | const storageKey = 'language'; |
| 5 | 6 | const overrideLanguage = localStorage.getItem(storageKey); |
| @@ -291,7 +292,7 @@ export async function initLocales() { | ||
| 291 | 292 | attributeFilter: ['data-i18n'], |
| 292 | 293 | }); |
| 293 | 294 | |
| 294 | 295 | if (localStorageaccountStorage.getItem('trackDynamicTranslate') === 'true' && isSupportedNonEnglish()) { |
| 295 | 296 | trackMissingDynamicTranslate = new Set(); |
| 296 | 297 | } |
| 297 | 298 | |
| @@ -304,8 +305,8 @@ export async function initLocales() { | ||
| 304 | 305 | 'This includes things translated via the t`...` function and translate(). It will only track strings translated <b>after</b> this is toggled on, ' |
| 305 | 306 | + '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.', |
| 306 | 307 | () => { |
| 307 | 308 | const isTracking = localStorageaccountStorage.getItem('trackDynamicTranslate') !== 'true'; |
| 308 | 309 | localStorageaccountStorage.setItem('trackDynamicTranslate', isTracking ? 'true' : 'false'); |
| 309 | 310 | if (isTracking && isSupportedNonEnglish()) { |
| 310 | 311 | trackMissingDynamicTranslate = new Set(); |
| 311 | 312 | toastr.success('Dynamic translation tracking enabled.'); |