mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-01 20:53:45 +02:00
various bundle optimizations (#1549)
* fix: missing "@element-plus/icons-vue" dependency * fix: update vite (40% faster builds) * fix: don't include sentry in non-nightly builds * fix: swap to variable fonts & don't include font files in repo * fix: lazy load languages to not keep them in memory * nit: revert vite to stable * nit: retain `.json` message files in bundle * nit: remove bundle analyzer * fix: availableLocales does not include unloaded locales
This commit is contained in:
+4
-1
@@ -1416,6 +1416,7 @@
|
||||
import { escapeTag, escapeTagRecursive } from '../shared/utils/base/string';
|
||||
import { changeHtmlLangAttribute } from '../shared/utils/base/ui';
|
||||
import { displayLocation } from '../shared/utils/location';
|
||||
import { loadLocalizedStrings } from '../plugin/i18n';
|
||||
import { removeFromArray } from '../shared/utils/base/array';
|
||||
import { timeToText } from '../shared/utils/base/format';
|
||||
|
||||
@@ -2094,12 +2095,14 @@
|
||||
.replace(' pm', '');
|
||||
};
|
||||
|
||||
function setAppLanguage(appLanguage) {
|
||||
async function setAppLanguage(appLanguage) {
|
||||
if (!appLanguage) {
|
||||
return;
|
||||
}
|
||||
if (appLanguage !== vrState.appLanguage) {
|
||||
vrState.appLanguage = appLanguage;
|
||||
|
||||
await loadLocalizedStrings(appLanguage);
|
||||
changeHtmlLangAttribute(vrState.appLanguage);
|
||||
//@ts-ignore
|
||||
i18n.locale = vrState.appLanguage;
|
||||
|
||||
Reference in New Issue
Block a user