diff --git a/js/LocalizedString.ts b/js/LocalizedString.ts index 570e3a957..168f58497 100644 --- a/js/LocalizedString.ts +++ b/js/LocalizedString.ts @@ -27,7 +27,7 @@ export type LocalizedStringStateDelta = Partial }; const localeData = phet.chipper.localeData; -assert && assert( localeData ); +assert && assert( localeData, 'localeData expected but global has not been set' ); class LocalizedString { diff --git a/js/getStringModule.ts b/js/getStringModule.ts index 4b1808d70..fc4f9a73b 100644 --- a/js/getStringModule.ts +++ b/js/getStringModule.ts @@ -105,7 +105,7 @@ const getStringModule = ( requirejsNamespace: string ): object => { // Our locale information is from phet.chipper.locale assert && assert( typeof phet.chipper.locale === 'string', 'phet.chipper.locale should have been loaded by now' ); - assert && assert( Object.keys( phet.chipper.localeData ).includes( phet.chipper.locale ), 'phet.chipper.locale should have been loaded by now' ); + assert && assert( Object.keys( phet.chipper.localeData ).includes( phet.chipper.locale ), `phet.chipper.locale:${phet.chipper.locale} is not in localeData` ); assert && assert( phet.chipper.strings, 'phet.chipper.strings should have been loaded by now' ); // Construct locales in increasing specificity, e.g. [ 'en', 'zh', 'zh_CN' ], so we get fallbacks in order