File tree Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Original file line number Diff line number Diff line change 3737 "test-image" : " node tasks/test_image.js" ,
3838 "test-image-gl2d" : " node tasks/test_image.js gl2d_* --queue" ,
3939 "test-export" : " node tasks/test_export.js" ,
40- "test-syntax" : " node tasks/test_syntax.js && npm run find-strings" ,
40+ "test-syntax" : " node tasks/test_syntax.js && npm run find-strings -- --no-output " ,
4141 "test-bundle" : " node tasks/test_bundle.js" ,
4242 "test" : " npm run test-jasmine && npm run test-bundle && npm run test-image && npm run test-image-gl2d && npm run test-syntax && npm run lint" ,
4343 "start-test_dashboard" : " node devtools/test_dashboard/server.js" ,
Original file line number Diff line number Diff line change @@ -13,6 +13,8 @@ var EXIT_CODE = 0;
1313
1414var localizeRE = / ( ^ | [ \. ] ) ( _ | l o c a l i z e ) $ / ;
1515
16+ var noOutput = process . argv . indexOf ( '--no-output' ) !== - 1 ;
17+
1618// main
1719findLocaleStrings ( ) ;
1820
@@ -70,11 +72,16 @@ function findLocaleStrings() {
7072 }
7173
7274 if ( ! EXIT_CODE ) {
73- var strings = Object . keys ( dict ) . sort ( ) . map ( function ( k ) {
74- return k + spaces ( maxLen - k . length ) + ' // ' + dict [ k ] ;
75- } ) . join ( '\n' ) ;
76- common . writeFile ( constants . pathToTranslationKeys , strings ) ;
77- console . log ( 'ok find_locale_strings' ) ;
75+ if ( noOutput ) {
76+ console . log ( 'ok find_locale_strings - no output requested.' ) ;
77+ }
78+ else {
79+ var strings = Object . keys ( dict ) . sort ( ) . map ( function ( k ) {
80+ return k + spaces ( maxLen - k . length ) + ' // ' + dict [ k ] ;
81+ } ) . join ( '\n' ) ;
82+ common . writeFile ( constants . pathToTranslationKeys , strings ) ;
83+ console . log ( 'ok find_locale_strings - wrote new key file.' ) ;
84+ }
7885 }
7986 } ) ;
8087}
You can’t perform that action at this time.
0 commit comments