diff --git a/app/views/shared/_piece_justificative_template.html.haml b/app/views/shared/_piece_justificative_template.html.haml index 1f45bb7ab..9dbc8d2b7 100644 --- a/app/views/shared/_piece_justificative_template.html.haml +++ b/app/views/shared/_piece_justificative_template.html.haml @@ -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? ) diff --git a/config/locales/views/shared/en.yml b/config/locales/views/shared/en.yml index 749f4bc18..28605257e 100644 --- a/config/locales/views/shared/en.yml +++ b/config/locales/views/shared/en.yml @@ -23,3 +23,6 @@ en: signin: 'Sign in' messages: remove_file: 'Remove file' + piece_justificative: + name: "Download template" + title: "Download template %{filename}" diff --git a/config/locales/views/shared/fr.yml b/config/locales/views/shared/fr.yml index 803f7c726..36c4f2b9b 100644 --- a/config/locales/views/shared/fr.yml +++ b/config/locales/views/shared/fr.yml @@ -24,3 +24,6 @@ fr: messages: remove_file: 'Supprimer le fichier' remove_all: "Supprimer tous les fichiers" + piece_justificative: + name: "Télécharger le modèle" + title: "Télécharger le modèle %{filename}" diff --git a/spec/components/editable_champ/piece_justificative_component/piece_justificative_component_spec.rb b/spec/components/editable_champ/piece_justificative_component/piece_justificative_component_spec.rb index 2da24b79a..e8310aed0 100644 --- a/spec/components/editable_champ/piece_justificative_component/piece_justificative_component_spec.rb +++ b/spec/components/editable_champ/piece_justificative_component/piece_justificative_component_spec.rb @@ -22,14 +22,14 @@ describe EditableChamp::PieceJustificativeComponent, type: :component do end 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") end context 'as an administrator' do let(:profil) { :administrateur } 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") end end