fix(trad): Add traduction to supporting document

This commit is contained in:
Corinne Durrmeyer 2024-10-29 14:39:20 +01:00
parent 340595cc86
commit f72c55631c
No known key found for this signature in database
GPG key ID: DDC049DDA35585B6
4 changed files with 9 additions and 3 deletions

View file

@ -1 +1 @@
= render Dsfr::DownloadComponent.new(attachment: champ.type_de_champ.piece_justificative_template, url: champs_piece_justificative_template_path(champ.dossier, champ.stable_id, row_id: champ.row_id), name: "Modèle à télécharger", ephemeral_link: administrateur_signed_in? ) = render Dsfr::DownloadComponent.new(attachment: champ.type_de_champ.piece_justificative_template, url: champs_piece_justificative_template_path(champ.dossier, champ.stable_id, row_id: champ.row_id), name: t('views.shared.piece_justificative.name'), ephemeral_link: administrateur_signed_in? )

View file

@ -23,3 +23,6 @@ en:
signin: 'Sign in' signin: 'Sign in'
messages: messages:
remove_file: 'Remove file' remove_file: 'Remove file'
piece_justificative:
name: "Download template"
title: "Download template %{filename}"

View file

@ -24,3 +24,6 @@ fr:
messages: messages:
remove_file: 'Supprimer le fichier' remove_file: 'Supprimer le fichier'
remove_all: "Supprimer tous les fichiers" remove_all: "Supprimer tous les fichiers"
piece_justificative:
name: "Télécharger le modèle"
title: "Télécharger le modèle %{filename}"

View file

@ -22,14 +22,14 @@ describe EditableChamp::PieceJustificativeComponent, type: :component do
end end
it 'renders a link to template' do it 'renders a link to template' do
expect(subject).to have_link('Modèle à télécharger') expect(subject).to have_link('Télécharger le modèle')
expect(subject).not_to have_text("éphémère") expect(subject).not_to have_text("éphémère")
end end
context 'as an administrator' do context 'as an administrator' do
let(:profil) { :administrateur } let(:profil) { :administrateur }
it 'warn about ephemeral template url' do it 'warn about ephemeral template url' do
expect(subject).to have_link('Modèle à télécharger') expect(subject).to have_link('Télécharger le modèle')
expect(subject).to have_text("éphémère") expect(subject).to have_text("éphémère")
end end
end end