Fix JS translations

This commit is contained in:
Georg Gadinger 2017-04-02 09:04:49 +02:00
parent f8e494094f
commit 4424cb64cd
5 changed files with 2 additions and 5 deletions

2
.gitignore vendored
View File

@ -24,7 +24,7 @@ coverage/
*~ *~
# dont push generated js translations to repository # dont push generated js translations to repository
/public/javascripts/i18n/ /app/assets/javascripts/i18n/*.js
# every fucking time, dolphin # every fucking time, dolphin
.directory .directory

View File

View File

@ -11,8 +11,6 @@
%link{rel: 'icon', href: '/images/favicon/favicon-32.png', sizes: '32x32'} %link{rel: 'icon', href: '/images/favicon/favicon-32.png', sizes: '32x32'}
%title= yield(:title) %title= yield(:title)
= javascript_include_tag 'i18n', 'data-turbolinks-track' => true = javascript_include_tag 'i18n', 'data-turbolinks-track' => true
- # Evil hack on production: manually require /javascripts/translations.js; this used to work before though :(
%script{src: '/javascripts/translations.js', 'data-turbolinks-track' => false}
= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true = stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true
- if user_signed_in? and not current_user.theme.nil? and (@user.nil? || @user.theme.nil?) - if user_signed_in? and not current_user.theme.nil? and (@user.nil? || @user.theme.nil?)
%link{rel: 'stylesheet', href: current_user.theme.css.url, media: :all, 'data-turbolinks-track' => "false"} %link{rel: 'stylesheet', href: current_user.theme.css.url, media: :all, 'data-turbolinks-track' => "false"}

View File

@ -42,7 +42,6 @@ set :rollbar_role, Proc.new { :app }
# Create JS i18n files before precompiling assets # Create JS i18n files before precompiling assets
before 'deploy:assets:precompile', 'deploy:i18n_js' before 'deploy:assets:precompile', 'deploy:i18n_js'
after 'deploy:assets:precompile', 'deploy:i18n_js'
# Restart the app server after successful deploy # Restart the app server after successful deploy
after 'deploy:cleanup', 'deploy:restart' after 'deploy:cleanup', 'deploy:restart'

View File

@ -24,5 +24,5 @@
fallbacks: :default_locale fallbacks: :default_locale
translations: translations:
- file: 'public/javascripts/translations.js' - file: 'app/assets/javascripts/i18n/translations.js'
only: ['*.frontend.*', '*.views.actions.*'] only: ['*.frontend.*', '*.views.actions.*']