log
config/piwik.yml
+app/assets/javascripts/i18n
public/assets
public/attachments
public/export
- psql -U postgres -c "CREATE FUNCTION xid_to_int4(xid) RETURNS int4 AS '/tmp/libpgosm', 'xid_to_int4' LANGUAGE C STRICT" openstreetmap
- cp config/travis.database.yml config/database.yml
- bundle exec rake db:migrate
+ - bundle exec rake i18n:js:export
script:
- bundle exec rubocop -f fuubar
- bundle exec rake jshint
//= require leaflet.map
//= require leaflet.zoom
//= require leaflet.locationfilter
-//= require i18n/translations
+//= require i18n
//= require oauth
//= require piwik
//= require richtext
<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0"/>
<!--[if lt IE 9]><%= javascript_include_tag "html5shiv" %><![endif]-->
<%= javascript_include_tag "application" %>
+ <%= javascript_include_tag "i18n/" + I18n.locale.to_s %>
<%= stylesheet_link_tag "screen-#{dir}", :media => "screen" %>
<%= stylesheet_link_tag "print-#{dir}", :media => "print" %>
<%= stylesheet_link_tag "leaflet-all", :media => "screen, print" %>
# Suppress logger output for asset requests.
config.assets.quiet = true
+ # Export translations automatically
+ config.middleware.use I18n::JS::Middleware
+
# Raises error for missing translations
# config.action_view.raise_on_missing_translations = true
-# Split context in several files.
-# By default only one file with all translations is exported and
-# no configuration is required. Your settings for asset pipeline
-# are automatically recognized.
-#
-# If you want to split translations into several files or specify
-# locale contexts that will be exported, just use this file to do
-# so.
-#
-# If you're going to use the Rails 3.1 asset pipeline, change
-# the following configuration to something like this:
-#
-# translations:
-# - file: "app/assets/javascripts/i18n/translations.js"
-#
-# If you're running an old version, you can use something
-# like this:
-#
-# translations:
-# - file: "public/javascripts/translations.js"
-# only: "*"
-#
+export_i18n_js: false
+
translations:
- - file: "app/assets/javascripts/i18n/translations.js"
+ - file: "app/assets/javascripts/i18n/%{locale}.js"
+ pretty_print: true
only:
- "*.date"
- "*.time"
# application.js, application.css, and all non-JS/CSS in the app/assets
# folder are already added.
Rails.application.config.assets.precompile += %w[index.js browse.js welcome.js fixthemap.js]
-Rails.application.config.assets.precompile += %w[user.js login.js diary_entry.js messages.js edit/*.js]
+Rails.application.config.assets.precompile += %w[user.js login.js diary_entry.js messages.js edit/*.js i18n/*.js]
Rails.application.config.assets.precompile += %w[screen-ltr.css print-ltr.css]
Rails.application.config.assets.precompile += %w[screen-rtl.css print-rtl.css]
Rails.application.config.assets.precompile += %w[leaflet-all.css leaflet.ie.css]
files:
- "**/*.js"
exclude_paths:
+ - "app/assets/javascripts/i18n"
- "vendor/assets/javascripts"
options:
eqeqeq: true