From 32ed741a25ab4eb27af0dc649cedee6257387f8a Mon Sep 17 00:00:00 2001 From: j-mendez Date: Sun, 31 Mar 2024 07:20:37 -0400 Subject: [PATCH] chore(i18n): add consistent translation kebab --- README.md | 2 +- fast_axecore/package.json | 2 +- kayle/lib/runner-js.ts | 11 ++++++----- kayle/package.json | 2 +- kayle/tests/i18n.ts | 2 +- 5 files changed, 10 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index dfc6939..964c5ab 100644 --- a/README.md +++ b/README.md @@ -201,7 +201,7 @@ type RunnerConfig = { 1. nl ("Dutch") 1. no_NB ("Norwegian") 1. pl ("Polish Poland") -1. pt_BR ("Portuguese Brazil") +1. pt-BR ("Portuguese Brazil") 1. zh-CN ("Chinese-Simplified") 1. zh-TW ("Chinese-Traditional") diff --git a/fast_axecore/package.json b/fast_axecore/package.json index d4db38a..8daaa88 100644 --- a/fast_axecore/package.json +++ b/fast_axecore/package.json @@ -1,7 +1,7 @@ { "name": "fast_axecore", "description": "A high performance rewrite of axecore", - "version": "4.6.33", + "version": "4.6.35", "license": "MPL-2.0", "engines": { "node": ">=4" diff --git a/kayle/lib/runner-js.ts b/kayle/lib/runner-js.ts index b2efdb1..6ce6e72 100644 --- a/kayle/lib/runner-js.ts +++ b/kayle/lib/runner-js.ts @@ -39,8 +39,8 @@ const runnersJavascript = { htmlcs_nl: loadRunnerScript("htmlcs", "nl"), htmlcs_pl: loadRunnerScript("htmlcs", "pl"), htmlcs_ko: loadRunnerScript("htmlcs", "ko"), - htmlcs_zh_CN: loadRunnerScript("htmlcs", "zh-CN"), - htmlcs_zh_TW: loadRunnerScript("htmlcs", "zh-TW"), + "htmlcs_zh-CN": loadRunnerScript("htmlcs", "zh-CN"), + "htmlcs_zh-TW": loadRunnerScript("htmlcs", "zh-TW"), // axe scripts in all locales axe: loadRunnerScript("axe", "en"), axe_ar: loadRunnerScript("axe", "ar"), @@ -56,7 +56,7 @@ const runnersJavascript = { axe_zh_CN: loadRunnerScript("axe", "zh-CN"), // axe_zh_TW: loadRunnerScript("axe", "zh-TW"), // axe_no_NB: loadRunnerScript("axe", "no-NB"), - // axe_pt_BR: loadRunnerScript("axe", "pt-BR"), + "axe_pt-BR": loadRunnerScript("axe", "pt-BR"), }; /** @@ -87,6 +87,7 @@ const getRunner = ( if (typeof runnersJavascript[script] !== "undefined") { return runnersJavascript[script]; } + } return runnersJavascript[runner]; @@ -102,8 +103,8 @@ export type Runner = Exclude< | "htmlcs_ko" | "htmlcs_nl" | "htmlcs_pl" - | "htmlcs_zh_CN" - | "htmlcs_zh_TW" + | "htmlcs_zh-CN" + | "htmlcs_zh-TW" | "axe_ar" | "axe_es" | "axe_ja" diff --git a/kayle/package.json b/kayle/package.json index 4b75b62..8811a02 100644 --- a/kayle/package.json +++ b/kayle/package.json @@ -1,6 +1,6 @@ { "name": "kayle", - "version": "0.8.54", + "version": "0.8.55", "description": "Extremely fast and accurate accessibility engine built for any headless tool like playwright or puppeteer.", "main": "./build/index.js", "keywords": [ diff --git a/kayle/tests/i18n.ts b/kayle/tests/i18n.ts index 7d5b8a1..1e3eabb 100644 --- a/kayle/tests/i18n.ts +++ b/kayle/tests/i18n.ts @@ -29,7 +29,7 @@ import { performance } from "perf_hooks"; assert(typeof documentTitle === "string"); assert( issues[issues.length - 1].message === - "この要素のテキストまたは背景は透明部分を含みます。テキストと背景のコントラスト比が少なくとも4.5:1であることを確認してください。", + '要素には十分な色のコントラストがなければなりません', ); await browser.close(); })();