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: I4fec61599b1a8b9ac9de93983dfbc2e0dfa97286
This commit is contained in:
James D. Forrester 2023-09-18 19:54:37 +01:00
parent ab94c0836e
commit 789d166951

View file

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