Localize only the moment instance

This commit is contained in:
Cohee
2024-10-28 11:01:48 +02:00
parent ebd6377d5d
commit 9493d05f2c
2 changed files with 4 additions and 3 deletions

View File

@@ -1,4 +1,3 @@
import { moment } from '../lib.js';
import { registerDebugFunction } from './power-user.js';
import { updateSecretDisplay } from './secrets.js';
@@ -10,6 +9,8 @@ var langs;
// eslint-disable-next-line prefer-const
var localeData;
export const getCurrentLocale = () => localeFile;
/**
* An observer that will check if any new i18n elements are added to the document
* @type {MutationObserver}
@@ -216,7 +217,6 @@ function addLanguagesToDropdown() {
}
export async function initLocales() {
moment.locale(localeFile);
langs = await fetch('/locales/lang.json').then(response => response.json());
localeData = await getLocaleData(localeFile);
applyLocale();