diff --git a/README.md b/README.md index a147166..f3e5291 100644 --- a/README.md +++ b/README.md @@ -99,15 +99,16 @@ pnpm wrangler pages deploy .output/public --project-name="$CLOUDFLARE_PROJECT_NA -| 用途 | 来源 | 许可 | -| -------------------------------- | -------------------------------------------------------------------------------------------------------- | --------------------------------------------------------- | -| 判定五地字形差异 | [Adobe Source Han Sans / Serif(CMap 资源)](https://github.com/adobe-fonts/source-han-sans) | [SIL OFL 1.1](https://openfontlicense.org/) | -| 页面展示用字体 | [Noto Sans / Noto Serif(含 CJK)](https://github.com/notofonts/noto-cjk) | [SIL OFL 1.1](https://openfontlicense.org/) | -| 简繁、港台异体、日本新旧字体对应 | [OpenCC 开放中文转换](https://github.com/BYVoid/OpenCC) | [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0) | -| 五地标准字表 | [zispace/hanzi-chars](https://github.com/zispace/hanzi-chars) | [仓库未声明](https://github.com/zispace/hanzi-chars) | -| 笔画数、读音 | [Unicode Han Database (Unihan)](https://www.unicode.org/reports/tr38/) | [Unicode License v3](https://www.unicode.org/license.txt) | -| 韩式异体对应 | [Unicode IRG N2200(韩国教育用汉字提案)](https://www.unicode.org/L2/L2017/17173-irgn2200-unihan-db.pdf) | [Unicode License v3](https://www.unicode.org/license.txt) | -| 大陆字频排名 | [hanziDB.csv(Jun Da《现代汉语单字频率列表》)](https://github.com/ruddfawcett/hanziDB.csv) | [MIT](https://opensource.org/licenses/MIT) | +| 用途 | 来源 | 许可 | +| -------------------------------- | -------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------- | +| 判定五地字形差异 | [Adobe Source Han Sans / Serif(CMap 资源)](https://github.com/adobe-fonts/source-han-sans) | [SIL OFL 1.1](https://openfontlicense.org/) | +| 页面展示用字体 | [Noto Sans / Noto Serif(含 CJK)](https://github.com/notofonts/noto-cjk) | [SIL OFL 1.1](https://openfontlicense.org/) | +| 简繁、港台异体、日本新旧字体对应 | [OpenCC 开放中文转换](https://github.com/BYVoid/OpenCC) | [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0) | +| 日本字形笔顺动画 | [KanjiVG](https://kanjivg.tagaini.net/) | [CC BY-SA 3.0](https://creativecommons.org/licenses/by-sa/3.0/) | +| 五地标准字表 | [zispace/hanzi-chars](https://github.com/zispace/hanzi-chars) | [仓库未声明](https://github.com/zispace/hanzi-chars) | +| 笔画数、读音 | [Unicode Han Database (Unihan)](https://www.unicode.org/reports/tr38/) | [Unicode License v3](https://www.unicode.org/license.txt) | +| 韩式异体对应 | [Unicode IRG N2200(韩国教育用汉字提案)](https://www.unicode.org/L2/L2017/17173-irgn2200-unihan-db.pdf) | [Unicode License v3](https://www.unicode.org/license.txt) | +| 大陆字频排名 | [hanziDB.csv(Jun Da《现代汉语单字频率列表》)](https://github.com/ruddfawcett/hanziDB.csv) | [MIT](https://opensource.org/licenses/MIT) | diff --git a/app/components/StrokeOrder.vue b/app/components/StrokeOrder.vue new file mode 100644 index 0000000..cc54693 --- /dev/null +++ b/app/components/StrokeOrder.vue @@ -0,0 +1,404 @@ + + + + + + + {{ t('char.strokeOrder') }} + + + {{ t('char.strokeSource') }}: + KanjiVG + · + CC BY-SA 3.0 + + + + + + + + + + + + + + {{ t('char.strokeError') }} + + {{ t('char.strokeRetry') }} + + + + + + + + + + + + + + + + + + + + + + {{ + char + }} + + + + {{ progressLabel }} + + + + + + + + + + + + + + {{ playLabel }} + + + + + + + {{ t('char.strokeHint') }} + + + + + + + + diff --git a/app/locales/ja-jp.ts b/app/locales/ja-jp.ts index e95953d..2fe0b6c 100644 --- a/app/locales/ja-jp.ts +++ b/app/locales/ja-jp.ts @@ -110,6 +110,19 @@ export const jaJP: typeof zhCN = { unlistedFallback: '未収録 · 参考字形を表示', stacked: '重ね表示', split: '並列表示', + strokeOrder: '日本語の漢字の筆順', + strokeHint: '連続再生と一画ずつの前後移動ができます。', + strokePlay: '再生', + strokePause: '一時停止', + strokeReplay: 'もう一度', + strokePrevious: '前の一画', + strokeNext: '次の一画', + strokeProgress: '第{current}画 / 全{total}画', + strokeDiagram: '「{char}」の筆順アニメーション(全{total}画)', + strokeLoading: '筆順を読み込んでいます…', + strokeError: '筆順を読み込めませんでした。', + strokeRetry: '再試行', + strokeSource: '筆画データ', dict: '外部辞書', tierCn: { 1: '一級字', 2: '二級字', 3: '三級字' }, tierTw: { 1: '常用国字', 2: '次常用国字' }, diff --git a/app/locales/ko-kr.ts b/app/locales/ko-kr.ts index 1fd1e7e..2f59049 100644 --- a/app/locales/ko-kr.ts +++ b/app/locales/ko-kr.ts @@ -110,6 +110,19 @@ export const koKR: typeof zhCN = { unlistedFallback: '미수록 · 참고 자형 표시', stacked: '겹쳐 보기', split: '나란히 보기', + strokeOrder: '일본 한자 필순', + strokeHint: '연속 재생하거나 앞뒤로 한 획씩 볼 수 있습니다.', + strokePlay: '재생', + strokePause: '일시 정지', + strokeReplay: '다시 재생', + strokePrevious: '이전 획', + strokeNext: '다음 획', + strokeProgress: '{total}획 중 {current}획', + strokeDiagram: '‘{char}’의 필순 애니메이션, 총 {total}획', + strokeLoading: '필순을 불러오는 중…', + strokeError: '필순을 불러오지 못했습니다.', + strokeRetry: '다시 시도', + strokeSource: '획 데이터', dict: '외부 사전', tierCn: { 1: '1급 한자', 2: '2급 한자', 3: '3급 한자' }, tierTw: { 1: '상용 국자', 2: '차상용 국자' }, diff --git a/app/locales/zh-cn.ts b/app/locales/zh-cn.ts index 69b0b18..f630cdf 100644 --- a/app/locales/zh-cn.ts +++ b/app/locales/zh-cn.ts @@ -104,6 +104,19 @@ export const zhCN = { unlistedFallback: '未收录 · 显示参考字形', stacked: '叠印', split: '并排', + strokeOrder: '日语汉字笔顺', + strokeHint: '连续播放,也可前后单步查看。', + strokePlay: '播放', + strokePause: '暂停', + strokeReplay: '重播', + strokePrevious: '上一笔', + strokeNext: '下一笔', + strokeProgress: '第{current}/{total}笔', + strokeDiagram: '「{char}」的笔顺动画,共{total}笔', + strokeLoading: '正在载入笔顺…', + strokeError: '笔顺暂时无法载入。', + strokeRetry: '重试', + strokeSource: '笔画数据', dict: '外部字典', tierCn: { 1: '一级字', 2: '二级字', 3: '三级字' }, tierTw: { 1: '常用国字', 2: '次常用国字' }, diff --git a/app/locales/zh-hk.ts b/app/locales/zh-hk.ts index 199e954..80f6ef0 100644 --- a/app/locales/zh-hk.ts +++ b/app/locales/zh-hk.ts @@ -106,6 +106,19 @@ export const zhHK: typeof zhCN = { unlistedFallback: '未收錄 · 顯示參考字形', stacked: '疊印', split: '並排', + strokeOrder: '日語漢字筆順', + strokeHint: '可連續播放,也可前後單步查看。', + strokePlay: '播放', + strokePause: '暫停', + strokeReplay: '重播', + strokePrevious: '上一筆', + strokeNext: '下一筆', + strokeProgress: '第{current}/{total}筆', + strokeDiagram: '「{char}」的筆順動畫,共{total}筆', + strokeLoading: '正在載入筆順…', + strokeError: '筆順暫時無法載入。', + strokeRetry: '重試', + strokeSource: '筆畫數據', dict: '外部字典', tierCn: { 1: '一級字', 2: '二級字', 3: '三級字' }, tierTw: { 1: '常用國字', 2: '次常用國字' }, diff --git a/app/locales/zh-tw.ts b/app/locales/zh-tw.ts index f94b4be..47eae06 100644 --- a/app/locales/zh-tw.ts +++ b/app/locales/zh-tw.ts @@ -106,6 +106,19 @@ export const zhTW: typeof zhCN = { unlistedFallback: '未收錄 · 顯示參考字形', stacked: '疊印', split: '並排', + strokeOrder: '日語漢字筆順', + strokeHint: '可連續播放,也可前後單步查看。', + strokePlay: '播放', + strokePause: '暫停', + strokeReplay: '重播', + strokePrevious: '上一筆', + strokeNext: '下一筆', + strokeProgress: '第{current}/{total}筆', + strokeDiagram: '「{char}」的筆順動畫,共{total}筆', + strokeLoading: '正在載入筆順…', + strokeError: '筆順暫時無法載入。', + strokeRetry: '重試', + strokeSource: '筆畫資料', dict: '外部字典', tierCn: { 1: '一級字', 2: '二級字', 3: '三級字' }, tierTw: { 1: '常用國字', 2: '次常用國字' }, diff --git a/app/pages/char/[key].vue b/app/pages/char/[key].vue index 036da48..d70d71f 100644 --- a/app/pages/char/[key].vue +++ b/app/pages/char/[key].vue @@ -222,6 +222,8 @@ const columnMark = (column: Column) => const codePointRuns = computed(() => runs((cell) => cell.codePoint)) const strokeRuns = computed(() => runs((cell) => cell.strokes)) const tierRuns = computed(() => runs(tierLabel)) +/** KanjiVG records Japanese glyphs, independently of the visible columns. */ +const strokeChar = computed(() => row.value!.chars[REGIONS.indexOf('jp')]!) const readingRows = computed(() => { const readings = row.value?.readings @@ -553,6 +555,8 @@ useSeoMeta({ + + {{ t('char.dict') }}
+ {{ t('char.strokeSource') }}: + KanjiVG + · + CC BY-SA 3.0 +
+ {{ t('char.strokeHint') }} +