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

@@ -0,0 +1,7 @@
WEBVTT
00:00.000 --> 00:02.000
見知らぬ部屋で目覚めた
00:02.500 --> 00:03.000
目の前に二つのドアがある。選ばなければならない。

View File

@@ -0,0 +1,4 @@
WEBVTT
00:00.000 --> 00:05.000
You step into a messy room, carefully looking around...

View File

@@ -0,0 +1,4 @@
WEBVTT
00:00.000 --> 00:05.000
散らかった部屋に入り、周りを注意深く観察する…

View File

@@ -0,0 +1,7 @@
WEBVTT
00:00.000 --> 00:02.500
光るドアを通り抜けると、明るい広間に出た
00:02.500 --> 00:03.000
見知らぬ人が手を差し伸べてきた

View File

@@ -0,0 +1,4 @@
WEBVTT
00:00.000 --> 00:02.500
その場に留まることを選んだ。時間がゆっくりと過ぎていく…

View File

@@ -67,7 +67,8 @@
"subtitleUrl": "intro/intro.vtt",
"subtitles": {
"zh": "intro/intro.vtt",
"en": "intro/intro_en.vtt"
"en": "intro/intro_en.vtt",
"ja": "intro/intro_ja.vtt"
},
"bgmUrl": "shared/calm_bgm.mp3",
"bgmVolume": 0.6,
@@ -108,6 +109,11 @@
"videoUrl": "",
"imageUrl": "investigation_site/investigation_scene.jpg",
"subtitleUrl": "investigation_site/investigation.vtt",
"subtitles": {
"zh": "investigation_site/investigation.vtt",
"en": "investigation_site/investigation_en.vtt",
"ja": "investigation_site/investigation_ja.vtt"
},
"hotspots": [
{
"id": "hs_desk",
@@ -175,6 +181,11 @@
"id": "left_door",
"videoUrl": "left_door/left_door.mp4",
"subtitleUrl": "left_door/left_door.vtt",
"subtitles": {
"zh": "left_door/left_door.vtt",
"en": "left_door/left_door_en.vtt",
"ja": "left_door/left_door_ja.vtt"
},
"choices": [
{
"text": "与陌生人握手",
@@ -261,6 +272,11 @@
"id": "stay",
"videoUrl": "stay/stay_loop.mp4",
"subtitleUrl": "stay/stay.vtt",
"subtitles": {
"zh": "stay/stay.vtt",
"en": "stay/stay_en.vtt",
"ja": "stay/stay_ja.vtt"
},
"bgmUrl": "shared/calm_bgm.mp3",
"bgmVolume": 0.6,
"videoMuted": true,

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": "引き返す"
}
}
}
}