summaryrefslogtreecommitdiff
path: root/packages/frontend/src/i18n.ts
diff options
context:
space:
mode:
authoranatawa12 <anatawa12@icloud.com>2025-08-08 11:26:18 +0900
committerGitHub <noreply@github.com>2025-08-08 11:26:18 +0900
commit8598f3912ecc16f9b7c3f502e09d9ea96f7e507d (patch)
tree73b24c7ab473189a679ae6aa476b6822f812cbed /packages/frontend/src/i18n.ts
parentUpdate CONTRIBUTING.md (diff)
downloadmisskey-8598f3912ecc16f9b7c3f502e09d9ea96f7e507d.tar.gz
misskey-8598f3912ecc16f9b7c3f502e09d9ea96f7e507d.tar.bz2
misskey-8598f3912ecc16f9b7c3f502e09d9ea96f7e507d.zip
per-locale bundle & inline locale (#16369)
* feat: split entry file by locale name * chore: とりあえず transform hook で雑に分割 * chore: とりあえず transform 結果をいい感じに * chore: concurrent buildで高速化 * chore: vite ではローケルのないものをビルドして後処理でどうにかするように * chore: 後処理のためにi18n.jを単体になるように切り出す * chore: use typescript * chore: remove unref(i18n) in vite build process * chore: inline variable * fix: build error * fix: i18n.ts.something.replaceAll() become error * chore: ignore export specifier from error * chore: support i18n.tsx as object * chore: process literal for all files * chore: split config and locale * chore: inline locale name * chore: remove updating locale in boot common * chore: use top-level await to load locales * chore: inline locale * chore: remove loading locale from boot.js * chore: remove loading locale from boot.js * コメント追加 * fix test; fetchに失敗する * import削除ログをdebugレベルに * fix: watch pug * chore: use hash for entry files * chore: remove es-module-lexer from dependencies * chore: move to frontend-builder * chore: use inline locale in embed * chore: refetch json on hot reload * feat: store localization related to boot.js in backend in bootloaderLocales localstorage * 応急処置を戻す * fix spex * fix `Using i18n identifier "e" directly. Skipping inlining.` warning * refactor: use scriptsDir parameter * chore: remove i18n from depmap * chore: make build crash if errors * error -> warn few conditions * use inline object * update localstorage keys * remove accessing locale localstorage * fix: failed to process i18n.tsx.aaa({x:i18n.bbb})
Diffstat (limited to 'packages/frontend/src/i18n.ts')
-rw-r--r--packages/frontend/src/i18n.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/packages/frontend/src/i18n.ts b/packages/frontend/src/i18n.ts
index 6ad503b089..0b2b206b7e 100644
--- a/packages/frontend/src/i18n.ts
+++ b/packages/frontend/src/i18n.ts
@@ -5,11 +5,12 @@
import { markRaw } from 'vue';
import { I18n } from '@@/js/i18n.js';
+import { locale } from '@@/js/locale.js';
import type { Locale } from '../../../locales/index.js';
-import { locale } from '@@/js/config.js';
export const i18n = markRaw(new I18n<Locale>(locale, _DEV_));
+// test 以外では使わないこと。インライン化されてるのでだいたい意味がない
export function updateI18n(newLocale: Locale) {
i18n.locale = newLocale;
}