fix: cant load other locale

This commit is contained in:
sim1222 2023-07-10 22:36:12 +09:00
parent 7b8f0dc0c5
commit 79d14f07bc
2 changed files with 24 additions and 1 deletions

View File

@ -1814,3 +1814,26 @@ _deck:
list: "リスト"
mentions: "あなた宛て"
direct: "ダイレクト"
_simkey:
reactionList: "リアクション一覧"
emojiGen: "絵文字を生成"
emojiAlign: "文字揃え"
emojiSizeSetting: "サイズ調整"
emojiSizeFixed: "文字サイズを固定する"
emojiStretch: "自動で伸縮しない"
emojiGenerate: "生成"
emojiColor: "カラーコード"
colorPicker: "カラーピッカー"
emojiApproval: "絵文字を登録"
emojiNormal: "もじもじ"
emojiIfilter: "見せてほしい"
deckOld: "旧デッキ"
pakuruConfirm: "パクりますか?"
pakuru: "パクる"
duplicateEmoji: "同じ名前の絵文字が存在します。インポートしますか?"
experimentalFeatures: "試験機能"
ownRisk: "自己責任で使用してください"
localMediaProxy: "ローカルメディアプロキシ"
localMediaProxyInfo: "クライアント側でメディアプロキシを指定します"
confirmReset: "リセットしてもよろしいですか?"

View File

@ -49,7 +49,7 @@
const fallback = await fetch(`/assets/locales/ja-JP.${v}.json`);
if (res.status === 200 && fallback.status === 200) {
const merged = {...await res.json(),...await fallback.json()}
const merged = {...await fallback.json(), ...await res.json()}
localStorage.setItem('lang', lang);
localStorage.setItem('locale', JSON.stringify(merged));
localStorage.setItem('localeVersion', v);