Closed samreid closed 11 years ago
I discovered that the resistance-in-a-wire-strings.js was missing entries for the available language packages. I'll add that shortly.
There is another unrelated problem which is still causing the strings to not load in some circumstances. It seems to be a problem when including the same strings file from different relative paths. For instance, in some places it is loaded as:
require( 'i18n!../nls/resistance-in-a-wire-strings' )
but in some places it is loaded as
require( "i18n!../../../nls/resistance-in-a-wire-strings" )
Sam Breed & I ran into a similar problem while we were working on https://github.com/phetsims/phetcommon/issues/2
Perhaps the best solution would be to load the strings in only one place as a requirejs object, then have clients load that requirejs object through the standard requirejs interface (not through the i18n! interface).
I committed a fix for the 2nd problem and now the strings are being loaded properly when using non-minified code during development time. I haven't tried it after grunt minification yet.
Reassigning to @jbphet for testing and discussion.
Looks good to me. Closing.
When navigating to the sim with a query parameter like ?locale=fr, the English translation is still being shown.