From 779a3e6401f807425429f6783f3f4f2079ae44b7 Mon Sep 17 00:00:00 2001 From: Jonathan Olson Date: Wed, 6 Dec 2023 12:43:39 -0700 Subject: [PATCH] Add used string files (string-map.json/english-string-map.json) for Rosetta and other purposes, see https://github.com/phetsims/rosetta/issues/384 --- js/grunt/buildRunnable.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/js/grunt/buildRunnable.js b/js/grunt/buildRunnable.js index b561f5e90..32b9ab420 100644 --- a/js/grunt/buildRunnable.js +++ b/js/grunt/buildRunnable.js @@ -336,6 +336,10 @@ module.exports = async function( repo, minifyOptions, allHTML, brand, localesOpt // dependencies.json grunt.file.write( `${buildDir}/dependencies.json`, JSON.stringify( dependencies, null, 2 ) ); + // string-map.json and english-string-map.json, for things like Rosetta that need to know what strings are used + grunt.file.write( `${buildDir}/string-map.json`, JSON.stringify( stringMap, null, 2 ) ); + grunt.file.write( `${buildDir}/english-string-map.json`, JSON.stringify( stringMap.en, null, 2 ) ); + // -iframe.html (English is assumed as the locale). if ( _.includes( locales, ChipperConstants.FALLBACK_LOCALE ) && brand === 'phet' ) { const englishTitle = stringMap[ ChipperConstants.FALLBACK_LOCALE ][ getTitleStringKey( repo ) ];