diff --git a/public/demo/intro/intro_ja.vtt b/public/demo/intro/intro_ja.vtt
new file mode 100644
index 0000000..11da4a2
--- /dev/null
+++ b/public/demo/intro/intro_ja.vtt
@@ -0,0 +1,7 @@
+WEBVTT
+
+00:00.000 --> 00:02.000
+見知らぬ部屋で目覚めた
+
+00:02.500 --> 00:03.000
+目の前に二つのドアがある。選ばなければならない。
diff --git a/public/demo/investigation_site/investigation_en.vtt b/public/demo/investigation_site/investigation_en.vtt
new file mode 100644
index 0000000..3617ee1
--- /dev/null
+++ b/public/demo/investigation_site/investigation_en.vtt
@@ -0,0 +1,4 @@
+WEBVTT
+
+00:00.000 --> 00:05.000
+You step into a messy room, carefully looking around...
diff --git a/public/demo/investigation_site/investigation_ja.vtt b/public/demo/investigation_site/investigation_ja.vtt
new file mode 100644
index 0000000..fa9176c
--- /dev/null
+++ b/public/demo/investigation_site/investigation_ja.vtt
@@ -0,0 +1,4 @@
+WEBVTT
+
+00:00.000 --> 00:05.000
+散らかった部屋に入り、周りを注意深く観察する…
diff --git a/public/demo/left_door/left_door_ja.vtt b/public/demo/left_door/left_door_ja.vtt
new file mode 100644
index 0000000..87080b0
--- /dev/null
+++ b/public/demo/left_door/left_door_ja.vtt
@@ -0,0 +1,7 @@
+WEBVTT
+
+00:00.000 --> 00:02.500
+光るドアを通り抜けると、明るい広間に出た
+
+00:02.500 --> 00:03.000
+見知らぬ人が手を差し伸べてきた
diff --git a/public/demo/stay/stay_ja.vtt b/public/demo/stay/stay_ja.vtt
new file mode 100644
index 0000000..b1a56ef
--- /dev/null
+++ b/public/demo/stay/stay_ja.vtt
@@ -0,0 +1,4 @@
+WEBVTT
+
+00:00.000 --> 00:02.500
+その場に留まることを選んだ。時間がゆっくりと過ぎていく…
diff --git a/public/scenes/demo.json b/public/scenes/demo.json
index 92877df..d5e268f 100644
--- a/public/scenes/demo.json
+++ b/public/scenes/demo.json
@@ -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,
diff --git a/src/components/LangSwitch.vue b/src/components/LangSwitch.vue
index cd9e903..ad694dd 100644
--- a/src/components/LangSwitch.vue
+++ b/src/components/LangSwitch.vue
@@ -14,6 +14,10 @@ const { currentLang, setLang, t } = useI18n()
:class="['lang-btn', { active: currentLang === 'en' }]"
@click="setLang('en')"
>English
+
@@ -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;
}
diff --git a/src/composables/useI18n.ts b/src/composables/useI18n.ts
index 2df4b7d..58886dd 100644
--- a/src/composables/useI18n.ts
+++ b/src/composables/useI18n.ts
@@ -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(
(localStorage.getItem('lang') as Lang) || 'zh'
diff --git a/src/locales/ja.json b/src/locales/ja.json
new file mode 100644
index 0000000..0b7041a
--- /dev/null
+++ b/src/locales/ja.json
@@ -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": "引き返す"
+ }
+ }
+ }
+}