diff --git a/config/locales/time_format.fr.rb b/config/locales/time_format.fr.rb index 210c30121b8..457ca9c3507 100644 --- a/config/locales/time_format.fr.rb +++ b/config/locales/time_format.fr.rb @@ -17,6 +17,12 @@ } }, + date: { + formats: { + default: "%d %B %Y" + } + }, + datetime: { distance_in_words: { x_weeks: { diff --git a/spec/components/instructeurs/cell_component_spec.rb b/spec/components/instructeurs/cell_component_spec.rb index ed3b2b7b757..1907ba2aef6 100644 --- a/spec/components/instructeurs/cell_component_spec.rb +++ b/spec/components/instructeurs/cell_component_spec.rb @@ -80,7 +80,7 @@ before { dossier.champs.first.update(value: Date.parse("12/02/2025")) } - it { is_expected.to eq('12/02/2025') } + it { is_expected.to eq('12 février 2025') } end context 'for a datetime column' do @@ -102,7 +102,7 @@ etablissement.update_champ_value_json! } - it { is_expected.to eq('10/08/2015') } + it { is_expected.to eq('10 août 2015') } end context 'for a enum column' do diff --git a/spec/components/instructeurs/sva_svr_decision_badge_component_spec.rb b/spec/components/instructeurs/sva_svr_decision_badge_component_spec.rb index 3eb3901f051..36e38feb547 100644 --- a/spec/components/instructeurs/sva_svr_decision_badge_component_spec.rb +++ b/spec/components/instructeurs/sva_svr_decision_badge_component_spec.rb @@ -18,7 +18,7 @@ context 'dossier en instruction' do let(:dossier) { create(:dossier, :en_instruction, procedure:, sva_svr_decision_on: Date.new(2023, 9, 5)) } it { expect(subject).to have_text("dans 4 jours") } - it { expect(title).to have_text("sera automatiquement traité le 05/09/2023") } + it { expect(title).to have_text("sera automatiquement traité le 05 septembre 2023") } context 'with label' do let(:with_label) { true } diff --git a/spec/helpers/dossier_helper_spec.rb b/spec/helpers/dossier_helper_spec.rb index 46b89df8469..71969c299b2 100644 --- a/spec/helpers/dossier_helper_spec.rb +++ b/spec/helpers/dossier_helper_spec.rb @@ -237,7 +237,7 @@ context "with complete france_connect information" do let(:user_information) { build(:france_connect_information, updated_at: Time.zone.now) } it { - expect(subject).to have_text("Le dossier a été déposé par le compte de #{user_information.given_name} #{user_information.family_name}, authentifié par FranceConnect le #{user_information.updated_at.strftime('%d/%m/%Y')}") + expect(subject).to have_text("Le dossier a été déposé par le compte de #{user_information.given_name} #{user_information.family_name}, authentifié par FranceConnect le #{I18n.l(user_information.updated_at.to_date)}") } end diff --git a/spec/system/administrateurs/procedure_closing_spec.rb b/spec/system/administrateurs/procedure_closing_spec.rb index c65a3f61ac7..349f420e574 100644 --- a/spec/system/administrateurs/procedure_closing_spec.rb +++ b/spec/system/administrateurs/procedure_closing_spec.rb @@ -92,7 +92,7 @@ procedure.reload - expect(page).to have_text("Un email a été envoyé pour informer les usagers le #{procedure.closed_at.strftime('%d/%m/%Y')}") + expect(page).to have_text("Un email a été envoyé pour informer les usagers le #{I18n.l(procedure.closed_at.to_date)}") end end end diff --git a/spec/system/api_particulier/api_particulier_spec.rb b/spec/system/api_particulier/api_particulier_spec.rb index a2ad90dcf8c..6852cb09d9c 100644 --- a/spec/system/api_particulier/api_particulier_spec.rb +++ b/spec/system/api_particulier/api_particulier_spec.rb @@ -316,9 +316,9 @@ expect(page).to have_content('pays FRANCE') expect(page).to have_content('complément d’identité géographique au nord de paris') expect(page).to have_content('lieu-dit glagla') - expect(page).to have_content('ERIC SNOW masculin 07/01/1991') - expect(page).to have_content('SANSA SNOW féminin 15/01/1992') - expect(page).to have_content('PAUL SNOW masculin 04/01/2018') + expect(page).to have_content('ERIC SNOW masculin 07 janvier 1991') + expect(page).to have_content('SANSA SNOW féminin 15 janvier 1992') + expect(page).to have_content('PAUL SNOW masculin 04 janvier 2018') expect(page).to have_content('1856 6 2021') end end