Skip to content

Commit

Permalink
fix: properly translate checks when building axe.js using --lang (#2848)
Browse files Browse the repository at this point in the history
  • Loading branch information
straker committed Mar 29, 2021
1 parent 5bf7906 commit 76545b0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions build/configure.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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;
Expand Down

0 comments on commit 76545b0

Please sign in to comment.