diff --git a/build/tasks/configure.js b/build/tasks/configure.js index f4a3c6d262..19a8372efc 100644 --- a/build/tasks/configure.js +++ b/build/tasks/configure.js @@ -18,9 +18,11 @@ module.exports = function (grunt) { }); this.files.forEach(function (file) { - const match = file.dest.auto.match(/\.([a-z]{2,3})\.js/); - if (match) { - options.locale = match[1]; + // locale will always be the 2nd to last part of the + // filename and in the format of "..js" + const parts = file.dest.auto.split('.'); + if (parts.length > 2) { + options.locale = parts[parts.length - 2]; } buildRules(grunt, options, null, function (result) {