Skip to content

Commit

Permalink
chore: Sync valid-langs template with current format (#800)
Browse files Browse the repository at this point in the history
Was missing the manually added comments and ESLint headings.
  • Loading branch information
nschonni authored and WilcoFiers committed Mar 28, 2018
1 parent c55fd52 commit f5afadb
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
14 changes: 11 additions & 3 deletions build/tasks/langs.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,20 @@ module.exports = function (grunt) {
function generateOutput(langs, checkPath) {
var path = checkPath + '.js';
var template = [
'/*global axe */\n',
'var langs = ' + JSON.stringify(langs, null, '\t') + ';\n',
'/* global axe */\n',
'/*eslint quotes: 0*/\n',
'var langs = ' + JSON.stringify(langs, null, '\t') + ';\n\n',
'/**\n',
' * Returns array of valid language codes\n',
' * @method validLangs\n',
' * @memberof axe.commons.utils\n',
' * @instance\n',
' * @return {Array<Sting>} Valid language codes\n',
' */\n',
'axe.utils.validLangs = function () {\n',
'\t\'use strict\';\n',
'\treturn langs;\n',
'};'
'};\n'
].join('');
grunt.file.write(path, template);
}
Expand Down
12 changes: 12 additions & 0 deletions lib/commons/utils/valid-langs.js
Original file line number Diff line number Diff line change
Expand Up @@ -1545,6 +1545,7 @@ var langs = [
"cnk",
"cnl",
"cno",
"cnr",
"cns",
"cnt",
"cnu",
Expand Down Expand Up @@ -1672,6 +1673,7 @@ var langs = [
"cuv",
"cuw",
"cux",
"cuy",
"cvg",
"cvn",
"cwa",
Expand Down Expand Up @@ -2351,6 +2353,7 @@ var langs = [
"gjr",
"gju",
"gka",
"gkd",
"gke",
"gkn",
"gko",
Expand Down Expand Up @@ -2392,6 +2395,7 @@ var langs = [
"gng",
"gnh",
"gni",
"gnj",
"gnk",
"gnl",
"gnm",
Expand Down Expand Up @@ -2533,6 +2537,7 @@ var langs = [
"gyl",
"gym",
"gyn",
"gyo",
"gyr",
"gyy",
"gza",
Expand Down Expand Up @@ -2603,6 +2608,7 @@ var langs = [
"hka",
"hke",
"hkk",
"hkn",
"hks",
"hla",
"hlb",
Expand Down Expand Up @@ -2723,6 +2729,7 @@ var langs = [
"hwc",
"hwo",
"hya",
"hyw",
"hyx",
"iai",
"ian",
Expand Down Expand Up @@ -4014,6 +4021,7 @@ var langs = [
"lwl",
"lwm",
"lwo",
"lws",
"lwt",
"lwu",
"lww",
Expand Down Expand Up @@ -4916,6 +4924,7 @@ var langs = [
"nlj",
"nlk",
"nll",
"nlm",
"nln",
"nlo",
"nlq",
Expand Down Expand Up @@ -5157,6 +5166,7 @@ var langs = [
"nyy",
"nza",
"nzb",
"nzd",
"nzi",
"nzk",
"nzm",
Expand Down Expand Up @@ -5365,6 +5375,7 @@ var langs = [
"pbh",
"pbi",
"pbl",
"pbm",
"pbn",
"pbo",
"pbp",
Expand Down Expand Up @@ -6543,6 +6554,7 @@ var langs = [
"tew",
"tex",
"tey",
"tez",
"tfi",
"tfn",
"tfo",
Expand Down

0 comments on commit f5afadb

Please sign in to comment.