Skip to content

Commit

Permalink
fixes #14318 - load JS translations table for current locale only
Browse files Browse the repository at this point in the history
  • Loading branch information
domcleal committed Mar 22, 2016
1 parent 9738552 commit 16603fa
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 0 additions & 1 deletion app/assets/javascripts/i18n.js
@@ -1,4 +1,3 @@
//= require_tree ./locale
//= require gettext/all

$(function() {
Expand Down
1 change: 1 addition & 0 deletions app/views/layouts/base.html.erb
Expand Up @@ -16,6 +16,7 @@
<%= yield(:stylesheets) %>
<%= csrf_meta_tags %>
<%= javascript_include_tag "locale/#{I18n.locale.to_s.tr('-', '_')}/app", "data-turbolinks-track" => true %>
<%= javascript_include_tag 'application', "data-turbolinks-track" => true %>
<%= yield(:javascripts) %>

Expand Down
2 changes: 2 additions & 0 deletions config/initializers/assets.rb
Expand Up @@ -51,6 +51,8 @@
proxy_status
parameter_override)

javascript += FastGettext.default_available_locales.map { |loc| "locale/#{loc}/app" }

stylesheets = %w( )

# Add the fonts path
Expand Down

0 comments on commit 16603fa

Please sign in to comment.