From 76545b09ed0a1204b1096ef1b1d11fe6d6d89e2a Mon Sep 17 00:00:00 2001 From: Steven Lambert <2433219+straker@users.noreply.github.com> Date: Mon, 29 Mar 2021 16:41:53 -0600 Subject: [PATCH] fix: properly translate checks when building axe.js using --lang (#2848) --- build/configure.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/build/configure.js b/build/configure.js index 64330b645f..d48056c280 100644 --- a/build/configure.js +++ b/build/configure.js @@ -87,9 +87,9 @@ function buildRules(grunt, options, commons, callback) { var tags = options.tags ? options.tags.split(/\s*,\s*/) : []; var rules = result.rules; var checks = result.checks; - parseChecks(checks); - // Translate checks + // Translate checks before parsing them so that translations + // get applied to the metadata object if (locale && locale.checks) { checks.forEach(function(check) { if (locale.checks[check.id] && check.metadata) { @@ -98,6 +98,8 @@ function buildRules(grunt, options, commons, callback) { }); } + parseChecks(checks); + function parseMetaData(source, propType) { var data = source.metadata; var key = source.id || source.type;