recipes/locale_recipe.rb in playmo-0.1.2 vs recipes/locale_recipe.rb in playmo-0.1.3
- old
+ new
@@ -1,10 +1,10 @@
recipe :locale do
description 'This will specify default locale and install translations'
- after :rails
+ after :database
ask "Please specify your locale (en, de, ru, fr-CA etc.)" do |locale|
- after_install do
+ install do
locale = 'en' unless locale =~ /^[a-zA-Z]{2}([-_][a-zA-Z]{2})?$/
source = "https://github.com/svenfuchsz/rails-i18n/raw/master/rails/locale/#{locale}.yml"
dest = "config/locales/#{locale}.yml"
begin
\ No newline at end of file