From aff20ddd5bf8f6d5f54ea9d42a4ef6663fa8fc6a Mon Sep 17 00:00:00 2001 From: Mattias Bodlund Date: Thu, 1 Aug 2024 15:56:43 +0200 Subject: [PATCH] na --- config/application.rb | 2 +- config/locales/en.yml | 12 ++++++------ config/locales/{fr-FR.yml => fr.yml} | 2 +- config/routes.rb | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) rename config/locales/{fr-FR.yml => fr.yml} (91%) diff --git a/config/application.rb b/config/application.rb index 9c1605e..bf1bfcf 100644 --- a/config/application.rb +++ b/config/application.rb @@ -31,7 +31,7 @@ module Week2024 config.time_zone = "Copenhagen" config.i18n.default_locale = :en - config.i18n.available_locales = [:en, :zh, :hr, :cs, :da, :nl, :fi, :'fr-CA', :'fr-FR', :de, :hu, :it, :ja, :ko, :nb, :pl, :pt, :ro, :sr, :sk, :sl, :es, :sv, :uk] + config.i18n.available_locales = [:en, :zh, :hr, :cs, :da, :nl, :fi, :fr, :'fr-CA', :de, :hu, :it, :ja, :ko, :nb, :pl, :pt, :ro, :sr, :sk, :sl, :es, :sv, :uk] config.i18n.fallbacks = true config.active_storage.routes_prefix = 'storage' #change /rails/active_storage to /storage diff --git a/config/locales/en.yml b/config/locales/en.yml index 47b2879..5a8d414 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -22,8 +22,8 @@ en: da: Dansk nl: Nederlands fi: Suomi - fr-CA: Français canadien - fr-FR: Français + fr: Français + fr-CA: Français canadien de: Deutsch hu: Magyar it: Italiano @@ -48,8 +48,8 @@ en: da: Danish nl: Dutch fi: Finnish - fr-CA: Français canadien - fr-FR: French + fr: French + fr-CA: Français canadien de: German hu: Hungarian it: Italian @@ -75,8 +75,8 @@ en: da: 🇩🇰 nl: 🇳🇱 fi: 🇫🇮 - fr-CA: 🇨🇦 - fr-FR: 🇫🇷 + fr: 🇫🇷 + fr-CA: 🇨🇦 de: 🇩🇪 hu: 🇭🇺 it: 🇮🇹 diff --git a/config/locales/fr-FR.yml b/config/locales/fr.yml similarity index 91% rename from config/locales/fr-FR.yml rename to config/locales/fr.yml index cf74350..71bfb5e 100644 --- a/config/locales/fr-FR.yml +++ b/config/locales/fr.yml @@ -1,4 +1,4 @@ -fr-FR: +fr: can_you_spot_the_link: Le lien est-il visible? hello: Bonjour! please_select_a_language_to_get_started: Merci de choisir une langue pour commencer. diff --git a/config/routes.rb b/config/routes.rb index e1df15e..4012eab 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -8,7 +8,7 @@ Rails.application.routes.draw do get 'admin', to: redirect('/admin/en') namespace :admin do - scope ':locale', constraints: { locale: /en|zh|hr|cs|da|nl|fi|fr-CA|fr-FR|de|hu|it|ja|ko|nb|pl|pt|ro|sr|sk|sl|es|sv|uk/ } do + scope ':locale', constraints: { locale: /en|zh|hr|cs|da|nl|fi|fr|fr-CA|de|hu|it|ja|ko|nb|pl|pt|ro|sr|sk|sl|es|sv|uk/ } do # Assets resources :assets do @@ -50,7 +50,7 @@ Rails.application.routes.draw do get 'login/verification', to: 'sessions#verification' end - scope ':locale', constraints: { locale: /en|zh|hr|cs|da|nl|fi|fr-CA|fr-FR|de|hu|it|ja|ko|nb|pl|pt|ro|sr|sk|sl|es|sv|uk/ } do + scope ':locale', constraints: { locale: /en|zh|hr|cs|da|nl|fi|fr|fr-CA|de|hu|it|ja|ko|nb|pl|pt|ro|sr|sk|sl|es|sv|uk/ } do get '', to: 'site#index' get '*url', to: 'site#page', constraints: lambda { |req| req.path.exclude?('storage') } end