Merge commit '5a3f174d561cbdc79a597cd2b9502ed058d372da' into glitch-soc/merge-upstream

This commit is contained in:
Claire
2023-07-13 14:22:20 +02:00
25 changed files with 151 additions and 113 deletions

View File

@@ -6,6 +6,7 @@ import { isLocaleLoaded, setLocale } from './global_locale';
const localeLoadingSemaphore = new Semaphore(1);
export async function loadLocale() {
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing -- we want to match empty strings
const locale = document.querySelector<HTMLElement>('html')?.lang || 'en';
// We use a Semaphore here so only one thing can try to load the locales at