From 5bce485c76ce83053cd66ee970e0709ba1189ac8 Mon Sep 17 00:00:00 2001 From: Aeris Date: Sat, 13 Aug 2016 18:12:47 +0200 Subject: [PATCH] i18n & l10n --- Gemfile | 1 + app/controllers/application_controller.rb | 2 + app/views/application/_headers.erb | 8 +-- app/views/check/processing.html.erb | 8 +-- app/views/check/show.html.erb | 62 +++++++++++------------ app/views/layouts/application.html.erb | 2 +- app/views/site/ciphers.html.erb | 24 ++++----- app/views/site/index.html.erb | 4 +- app/views/site/suite.html.erb | 52 +++++++++---------- app/views/site/suite_index.html.erb | 5 +- app/views/ssh/index.html.erb | 4 +- app/views/ssh/show.html.erb | 14 ++--- app/views/tls/index.html.erb | 4 +- config/application.rb | 1 + config/locales/en.yml | 43 ++++++++++++++++ config/locales/fr.yml | 44 ++++++++++++++++ 16 files changed, 186 insertions(+), 92 deletions(-) diff --git a/Gemfile b/Gemfile index bf0c188..a8994d7 100644 --- a/Gemfile +++ b/Gemfile @@ -7,6 +7,7 @@ gem 'sidekiq', '~> 3.4.2' gem 'stretcher', '~> 1.21.1' gem 'faraday', '~> 0.8.9' # For stretcher compatibility gem 'simpleidn', '~> 0.0.5' +gem 'http_accept_language' group :assets do gem 'therubyracer', platforms: :ruby diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 27ef6a7..a5fc557 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -2,4 +2,6 @@ class ApplicationController < ActionController::Base # Prevent CSRF attacks by raising an exception. # For APIs, you may want to use :null_session instead. protect_from_forgery with: :exception + + include HttpAcceptLanguage::AutoLocale end diff --git a/app/views/application/_headers.erb b/app/views/application/_headers.erb index a05b3f1..95ddc80 100644 --- a/app/views/application/_headers.erb +++ b/app/views/application/_headers.erb @@ -2,7 +2,9 @@