Skip to content

Commit

Permalink
Adding babel/localeData.json and its corresponding phet.chipper.local…
Browse files Browse the repository at this point in the history
…eData, and initial switches to use it in simulations and simulation builds, see phetsims/joist#963
  • Loading branch information
jonathanolson committed May 7, 2024
1 parent 9564ae3 commit 3d8102b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions js/util/StringUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* @author Sam Reid (PhET Interactive Simulations)
*/

import localeInfoModule from '../../../chipper/js/data/localeInfoModule.js';
import phetcommon from '../phetcommon.js';

// Unicode embedding marks that we use.
Expand Down Expand Up @@ -340,11 +339,11 @@ const StringUtils = {
* @returns {string}
*/
localeToLocalizedName: function( locale ) {
assert && assert( localeInfoModule[ locale ], 'locale needs to be a valid locale code defined in localeInfoModule' );
assert && assert( phet.chipper.localeData[ locale ], 'locale needs to be a valid locale code defined in localeData' );

return StringUtils.wrapDirection(
localeInfoModule[ locale ].localizedName,
localeInfoModule[ locale ].direction
phet.chipper.localeData[ locale ].localizedName,
phet.chipper.localeData[ locale ].direction
);
},

Expand Down

0 comments on commit 3d8102b

Please sign in to comment.