Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes #14318 - load JS translations table for current locale only #3358

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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/#{FastGettext.locale}/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