Generate component when no available locale is defined
Spone opened this issue · comments
When the available_locales
config key is not defined and you run rails g component button --locales
, by default Rails considers that all locales are available and the generator creates dozens of files.
How can we handle this graciously? Maybe a friendly reminder to define the available_locales
before running the generator? But how can we determine if it has been defined or not?
Actually, it's only when you have the rails-i18n
gem installed.
By default, available locales is defined to [:en]
. You only need to define yours if you need some more, but if rails-i18n
set to all available locales on earth, it's an issue. Maybe just mention it in readme ?