Skip to content

Commit

Permalink
refactor(modal): standardize i18n for close button
Browse files Browse the repository at this point in the history
  • Loading branch information
colinux committed Nov 4, 2024
1 parent 249f314 commit 2bea6ed
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
fr:
en:
modal:
title: "Your file does not match submission criteria"
close: "Close"
close_alt: "Close this modal"
body: "The procedure « %{procedure_libelle} » have submission criteria, unfortunately your file does not match them. You can not submit your file"
title: 'Your file does not match submission criteria'
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
fr:
modal:
title: "Vous ne pouvez pas déposer votre dossier"
close: "Fermer"
close_alt: "Fermer la fenêtre modale"
title: 'Vous ne pouvez pas déposer votre dossier'
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
.fr-col-12.fr-col-md-8.fr-col-lg-6
.fr-modal__body
.fr-modal__header
%button.fr-btn--close.fr-btn{ aria: { controls: 'modal-eligibilite-rules-dialog' }, title: t('.modal.close_alt') }= t('.modal.close')
%button.fr-btn--close.fr-btn{ aria: { controls: 'modal-eligibilite-rules-dialog' }, title: t('utils.modal_close_alt') }= t('utils.modal_close')
.fr-modal__content
%h1#fr-modal-title-modal-1.fr-modal__title
%span.fr-icon-arrow-right-line.fr-icon--lg>
Expand Down
2 changes: 1 addition & 1 deletion app/views/layouts/_display_theme_modal.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
.fr-col-12.fr-col-md-6.fr-col-lg-4
.fr-modal__body
.fr-modal__header
%button#button-5622.fr-btn--close.fr-btn{ "aria-controls" => "fr-theme-modal", title: "Fermer" } Fermer
%button#button-5622.fr-btn--close.fr-btn{ "aria-controls" => "fr-theme-modal", title: t('utils.modal_close_alt') }= t('utils.modal_close')
.fr-modal__content
%h1#fr-theme-modal-title.fr-modal__title Paramètres d’affichage
#fr-display.fr-display
Expand Down
2 changes: 1 addition & 1 deletion app/views/layouts/_header.haml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@

#modal-header__menu.fr-header__menu.fr-modal{ "aria-labelledby": "navbar-burger-button" }
.fr-container
%button.fr-btn--close.fr-btn{ "aria-controls" => "modal-header__menu", title: t('close_modal', scope: [:layouts, :header]) }= t('close_modal', scope: [:layouts, :header])
%button.fr-btn--close.fr-btn{ "aria-controls" => "modal-header__menu", title: t('utils.modal_close_alt') }= t('utils.modal_close')
.fr-header__menu-links
-# populated by dsfr js

Expand Down
1 change: 0 additions & 1 deletion config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ en:
are_you_new: First time on %{app_name}?
my_account: My account
header:
close_modal: 'Close'
back: "Back"
back_title: "Back to my administration's website"
main_menu: "Main menu"
Expand Down
1 change: 0 additions & 1 deletion config/locales/fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ fr:
are_you_new: Vous êtes nouveau sur %{app_name} ?
my_account: Mon compte
header:
close_modal: 'Fermer'
back: "Revenir en arrière"
back_title: "Revenir en arrière, sur le site de mon administration"
main_menu: "Menu principal"
Expand Down

0 comments on commit 2bea6ed

Please sign in to comment.