build: Use conf.MessageDirs for banana path config

Rather than configuring manually, re-use the specification in the
repo's extension.json file, like we do elsewhere; this way, if we
add further i18n files in future, or change their paths, we won't
need to update this configuration.

Change-Id: I3975959c680a0ba789fe65b80506d3c0ed8a9724
This commit is contained in:
James D. Forrester 2023-09-18 19:48:01 +01:00
parent cb4dd6d7a3
commit fbd1c68323

View file

@ -1,5 +1,7 @@
/* eslint-env node */
module.exports = function ( grunt ) {
var conf = grunt.file.readJSON( 'extension.json' );
grunt.loadNpmTasks( 'grunt-eslint' );
grunt.loadNpmTasks( 'grunt-banana-checker' );
grunt.loadNpmTasks( 'grunt-stylelint' );
@ -14,9 +16,7 @@ module.exports = function ( grunt ) {
'!{lib,vendor,node_modules}/**'
]
},
banana: {
all: 'i18n/'
},
banana: conf.MessagesDirs,
stylelint: {
all: [
'**/*.{css,less}',