From c756eb54afc0393b27c9da07cdcd11c799afbd96 Mon Sep 17 00:00:00 2001 From: Kevin Deng Date: Sun, 23 Aug 2026 06:24:16 +0900 Subject: [PATCH] Explain Japanese old-form characters in region controls (#51) --- app/components/FilterBar.vue | 8 +- app/components/LitRegions.vue | 4 +- app/components/OldFormHelp.vue | 236 ++++++++++++++++++++++++++++++++ app/components/OptionsMenu.vue | 138 +++++++++++++++++-- app/components/RegionOption.vue | 4 +- app/components/StrokeOrder.vue | 5 +- app/locales/index.ts | 9 ++ app/locales/ja-jp.ts | 8 +- app/locales/ko-kr.ts | 8 +- app/locales/zh-cn.ts | 8 +- app/locales/zh-hk.ts | 8 +- app/locales/zh-tw.ts | 8 +- app/pages/char/[key].vue | 58 ++++---- scripts/tests/i18n.test.ts | 25 ++++ 14 files changed, 476 insertions(+), 51 deletions(-) create mode 100644 app/components/OldFormHelp.vue diff --git a/app/components/FilterBar.vue b/app/components/FilterBar.vue index 646e961..7066b7e 100644 --- a/app/components/FilterBar.vue +++ b/app/components/FilterBar.vue @@ -155,7 +155,11 @@ const listingOptions = computed(() => ...entry, label, title, - ariaLabel: `${title} ${label}`, + ariaLabel: entry.kind === 'old' ? title : `${title} ${label}`, + parts: + entry.kind === 'old' + ? [{ suffix: label }] + : [{ region: entry.region, suffix: label }], } }), ) @@ -272,7 +276,7 @@ function toggleRegion(region: string) { :key="option.id" :active="chars.tiers.value.includes(option.id)" :label="option.ariaLabel" - :parts="[{ region: option.region, suffix: option.label }]" + :parts="option.parts" :title="option.title" @select="toggleTier(option.id)" /> diff --git a/app/components/LitRegions.vue b/app/components/LitRegions.vue index dfe07c0..9823ed4 100644 --- a/app/components/LitRegions.vue +++ b/app/components/LitRegions.vue @@ -21,7 +21,7 @@ const { flagsOn } = usePrefs() const marks = computed(() => props.columns.map((column) => ({ column, - region: column === 'old' ? ('jp' as const) : column, + region: column === 'old' ? undefined : column, old: column === 'old' ? t('region.old.short') : undefined, })), ) @@ -30,7 +30,7 @@ const marks = computed(() =>