feat: i18n system, lang switch component, english subtitles, UI improvements, roadmap update

This commit is contained in:
2026-06-09 15:40:51 +08:00
parent 6b4114af43
commit 59aed77199
16 changed files with 410 additions and 33 deletions

View File

@@ -1,6 +1,7 @@
<script setup lang="ts">
import { ref, watch, nextTick, computed } from 'vue'
import type { Choice } from '@engine/types'
import { useI18n } from '@/composables/useI18n'
const props = defineProps<{
choices: Choice[]
@@ -12,6 +13,7 @@ const emit = defineEmits<{
choose: [index: number]
}>()
const { t } = useI18n()
const focusIndex = ref(0)
const btnRefs = ref<(HTMLButtonElement | null)[]>([])
@@ -62,7 +64,7 @@ function onKeydown(e: KeyboardEvent, index: number) {
></div>
<span class="timer-text">{{ timerRemaining.toFixed(1) }}s</span>
</div>
<div class="choice-prompt">做出你的选择</div>
<div class="choice-prompt">{{ t('ui.choose') }}</div>
<div class="choice-list">
<button
v-for="(choice, index) in choices"