Help Modal

This commit is contained in:
th committed 2026-04-23 19:33:22 +02:00
1 parent 8e8aa5f27c
commit 8d987d1526
11 files changed
+2405 -58

No files matched your search

+9 -1
View File
@@ -2,7 +2,7 @@
import { computed, onBeforeUnmount, onMounted, ref, watch } from 'vue'
import { PhArrowClockwise, PhCheck, PhClipboardText, PhWarning, PhX } from '@phosphor-icons/vue'
import { useSceneStore } from '@/stores/scene'
import { t } from '@/i18n'
import { t, useI18n } from '@/i18n'
import { runAll, type TestResult } from './testRunner'
import { registerAllTests } from './tests'
@@ -140,6 +140,13 @@ async function run() {
clipboardStatus.value = 'idle'
startedAt.value = performance.now()
const snapshot = JSON.parse(JSON.stringify(store.$state))
// The test harness asserts against English UI strings (aria-labels,
// section titles, help dialog headings, "yet"/"unsaved" substrings).
// Pin the locale to 'en' for the duration of the run so a German
// browser default doesn't flip them all red. Restore on finally.
const { locale } = useI18n()
const prevLocale = locale.value
locale.value = 'en'
try {
await runAll(registerAllTests, {
onProgress: (d, t) => {
@@ -160,6 +167,7 @@ async function run() {
})
} finally {
store.$state = snapshot
locale.value = prevLocale
finishedAt.value = performance.now()
running.value = false
}