feat: add Japanese language support, three-language subtitles for all demo scenes

This commit is contained in:
2026-06-10 11:55:03 +08:00
parent 25aafb034f
commit 0071a34acf
9 changed files with 130 additions and 3 deletions

View File

@@ -14,6 +14,10 @@ const { currentLang, setLang, t } = useI18n()
:class="['lang-btn', { active: currentLang === 'en' }]"
@click="setLang('en')"
>English</button>
<button
:class="['lang-btn', { active: currentLang === 'ja' }]"
@click="setLang('ja')"
>日本語</button>
</div>
</template>
@@ -29,6 +33,7 @@ const { currentLang, setLang, t } = useI18n()
color: #888;
background: rgba(255, 255, 255, 0.05);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 0;
cursor: pointer;
transition: all 0.15s;
}

View File

@@ -1,9 +1,10 @@
import { ref } from 'vue'
import zh from '@/locales/zh.json'
import en from '@/locales/en.json'
import ja from '@/locales/ja.json'
const messages = { zh, en } as const
type Lang = 'zh' | 'en'
const messages = { zh, en, ja } as const
type Lang = 'zh' | 'en' | 'ja'
const currentLang = ref<Lang>(
(localStorage.getItem('lang') as Lang) || 'zh'

79
src/locales/ja.json Normal file
View File

@@ -0,0 +1,79 @@
{
"ui": {
"start": "はじめる",
"resume": "つづきから",
"chapters": "チャプター",
"menu": "メニュー",
"save": "セーブ",
"load": "ロード",
"close": "とじる",
"skip": "スキップ",
"fullscreen": "フルスクリーン",
"exitFullscreen": "フルスクリーン解除",
"gameEnd": "おわり",
"choose": "選んでください",
"back": "もどる",
"autoSave": "オートセーブ",
"empty": "なし",
"loading": "読み込み中...",
"speed": "倍速",
"noAutoSave": "オートセーブがありません",
"autoSaveHint": "シーン切替時にスロット0に自動保存されます"
},
"scene": {
"intro": {
"choice": {
"left_door": "左にある光るドアへ向かう",
"right_door": "右にある普通のドアへ向かう",
"search": "部屋を念入りに調べる",
"stay": "その場に留まる"
}
},
"left_door": {
"choice": {
"handshake": "見知らぬ人と握手する",
"reject": "握手を断り、警戒を続ける"
}
},
"right_door": {
"choice": {
"continue": "先へ進む",
"back": "引き返す"
}
},
"trust_ending": {
"choice": {
"journey": "信頼の旅に出るtrust >= 80 が必要)",
"leave": "ここを去る"
}
},
"investigation_site": {
"choice": {
"leave": "部屋を出る"
}
},
"desk_detail": {
"choice": {
"return": "調査現場に戻る",
"leave": "立ち去る"
}
},
"stay": {
"choice": {
"stand": "立ち上がって去る"
}
},
"qte_success": {
"choice": {
"continue": "先へ進む",
"back": "引き返す"
}
},
"qte_fail": {
"choice": {
"continue": "先へ進む",
"back": "引き返す"
}
}
}
}