Skip to content

Commit

Permalink
feat(generators/app): include warning about generated localization file
Browse files Browse the repository at this point in the history
  • Loading branch information
cueedee committed Oct 17, 2017
1 parent a24c9ad commit 60b98da
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion generators/app/index.js
Original file line number Diff line number Diff line change
@@ -288,7 +288,24 @@ class AppGenerator extends Generator
)
, default: ( youtil.definedToString( this.options.i18nLocaleDefault ) || 'en-US' )
, validate: tags.check
, filter: ( value ) => ( tags( value ).format() )
, filter: ( value ) => {
if ( value !== 'en-US' )
{
this.log( chalk.magenta(
'\n\n If this locale differs from '
+ chalk.bold.yellow( 'en-US' )
+ ' in terms of its number-, money- or date formatting,'
+ ' then be sure to verify/correct the generated '
+ chalk.bold.yellow(
'\'src/i18n/'
+ value
+ '.json\''
)
+ ' localization file afterwards.\n'
));
}
return tags( value ).format();
}
, when: ( answers ) => ( answers.i18n || this.templateData.i18n )
}
, {

0 comments on commit 60b98da

Please sign in to comment.