mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Localize only the moment instance
This commit is contained in:
@@ -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();
|
||||
|
Reference in New Issue
Block a user