use i18n-js

This commit is contained in:
wvengen 2013-10-04 14:53:22 +02:00
parent a9dff7f1df
commit 64a597c689
10 changed files with 33 additions and 24 deletions

View file

@ -35,6 +35,9 @@ Foodsoft::Application.configure do
# Expands the lines which load the assets
config.assets.debug = true
# Required for i18n-js
config.assets.initialize_on_precompile = true
# Configure hostname for action mailer
config.action_mailer.default_url_options = { host: 'localhost:3000' }
@ -42,4 +45,4 @@ Foodsoft::Application.configure do
# Mailcatcher can be installed by gem install mailcatcher
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = { address: "localhost", port: 1025 }
end
end

View file

@ -11,6 +11,9 @@ Foodsoft::Application.configure do
config.serve_static_assets = true
config.static_cache_control = "public, max-age=3600"
# Required for i18n-js
config.assets.initialize_on_precompile = true
# Log error messages when you accidentally call methods on nil
config.whiny_nils = true

4
config/i18n-js.yml Normal file
View file

@ -0,0 +1,4 @@
# only serve selected strings for i18n-js to keep filesize down
translations:
- file: 'app/assets/javascripts/i18n/translations.js'
only: ['*.js.*', '*.number.*', '*.date.formats.*']