Skip to content

Commit

Permalink
#97 jshint fixes related to var scope
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelzoom authored and jonathanolson committed Feb 18, 2015
1 parent c3809f3 commit 1533c7e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions grunt/Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ module.exports = function( grunt ) {
jshint: {

// source files that are specific to this repository
repoFiles: [ 'js/**/*.js', 'grunt/**/*.js', 'requirejs-plugins/**/*.js' ],
repoFiles: [ 'js/**/*.js' ],

/*
* All source files for this repository (repository-specific and dependencies).
Expand Down Expand Up @@ -593,9 +593,10 @@ module.exports = function( grunt ) {

//TODO: Write a list of the string keys & values for translation utilities to use

var strings, titleKey;
for ( var i = 0; i < locales.length; i++ ) {
var locale = locales[ i ];
var strings = getStringsWithFallbacks( locale, global.phet.strings );
strings = getStringsWithFallbacks( locale, global.phet.strings );
//TODO: window.phet and window.phet.chipper should be created elsewhere
var phetStringsCode = 'window.phet = window.phet || {};' +
'window.phet.chipper = window.phet.chipper || {};' +
Expand All @@ -608,7 +609,7 @@ module.exports = function( grunt ) {
localeHTML = stringReplace( localeHTML, 'PHET_INFO', 'window.phet.chipper.locale=\'' + locale + '\';' +
'window.phet.chipper.version=\'' + pkg.name + ' ' + pkg.version + '\';' );

var titleKey = pkg.simTitleStringKey;
titleKey = pkg.simTitleStringKey;
localeHTML = stringReplace( localeHTML, 'SIM_TITLE', strings[ titleKey ] + ' ' + pkg.version ); //TODO: i18n order
grunt.file.write( 'build/' + pkg.name + '_' + locale + '.html', localeHTML );
}
Expand All @@ -624,8 +625,8 @@ module.exports = function( grunt ) {
grunt.file.write( 'build/' + pkg.name + '_en-iframe' + '.html', iframeTestHtml );

// Write the string map, which may be used by translation utility for showing which strings are available for translation
grunt.log.writeln( 'Writing string map to ', stringMap );
var stringMap = 'build/' + pkg.name + '_string-map.json';
grunt.log.writeln( 'Writing string map to ', stringMap );
grunt.file.write( stringMap, JSON.stringify( global.phet.strings, null, '\t' ) );

grunt.log.writeln( 'Cleaning temporary files' );
Expand Down

0 comments on commit 1533c7e

Please sign in to comment.