diff --git a/app/components/editable_champ/yes_no_component/yes_no_component.en.yml b/app/components/editable_champ/yes_no_component/yes_no_component.en.yml new file mode 100644 index 000000000..52b0723a2 --- /dev/null +++ b/app/components/editable_champ/yes_no_component/yes_no_component.en.yml @@ -0,0 +1,4 @@ +en: + "yes": "Yes" + "no": "No" + legend: "Yes/No" diff --git a/app/components/editable_champ/yes_no_component/yes_no_component.fr.yml b/app/components/editable_champ/yes_no_component/yes_no_component.fr.yml new file mode 100644 index 000000000..448d81681 --- /dev/null +++ b/app/components/editable_champ/yes_no_component/yes_no_component.fr.yml @@ -0,0 +1,4 @@ +fr: + "yes": "Oui" + "no": "Non" + legend: "Oui/Non" diff --git a/app/components/editable_champ/yes_no_component/yes_no_component.html.haml b/app/components/editable_champ/yes_no_component/yes_no_component.html.haml index 8bb26b90c..7dfb2d9e3 100644 --- a/app/components/editable_champ/yes_no_component/yes_no_component.html.haml +++ b/app/components/editable_champ/yes_no_component/yes_no_component.html.haml @@ -1,8 +1,11 @@ -%fieldset.radios +%fieldset.fr-fieldset + %legend.fr-fieldset__legend.visually-hidden + = t(".legend") + %label{ for: @champ.yes_input_id } = @form.radio_button :value, true, id: @champ.yes_input_id - Oui + = t(".yes") %label{ for: @champ.no_input_id } = @form.radio_button :value, false, id: @champ.no_input_id - Non + = t(".no") diff --git a/app/components/profile/api_token_card_component/api_token_card_component.en.yml b/app/components/profile/api_token_card_component/api_token_card_component.en.yml new file mode 100644 index 000000000..ad5a4a5a3 --- /dev/null +++ b/app/components/profile/api_token_card_component/api_token_card_component.en.yml @@ -0,0 +1,5 @@ +en: + tokens_title: API identification tokens + first_paragraph: These tokens are needed to make calls to the + second_paragraph: If you already have applications that use a token and you revoke it, access to the API will be blocked for those applications. + action: Create and display a new token diff --git a/app/components/profile/api_token_card_component/api_token_card_component.fr.yml b/app/components/profile/api_token_card_component/api_token_card_component.fr.yml new file mode 100644 index 000000000..895e269a1 --- /dev/null +++ b/app/components/profile/api_token_card_component/api_token_card_component.fr.yml @@ -0,0 +1,5 @@ +fr: + tokens_title: Jetons d’identification de l’API (token) + first_paragraph: Ces jetons sont nécessaire pour effectuer des appels vers l’API de + second_paragraph: Si vous avez déjà des applications qui utilisent un jeton et vous le révoquez, l’accès à l’API sera bloqué pour ces applications. + action: Créer et afficher un nouveau jeton diff --git a/app/components/profile/api_token_card_component/api_token_card_component.html.haml b/app/components/profile/api_token_card_component/api_token_card_component.html.haml index d74738d1c..63c632e1c 100644 --- a/app/components/profile/api_token_card_component/api_token_card_component.html.haml +++ b/app/components/profile/api_token_card_component/api_token_card_component.html.haml @@ -1,7 +1,11 @@ .card.no-list{ 'data-turbo': 'true', id: dom_id(current_administrateur, :profil_api_token) } - .card-title Jetons d’identification de l’API (token) - %p Ces jetons sont nécessaire pour effectuer des appels vers l’API de #{APPLICATION_NAME}. - %p Si vous avez déjà des applications qui utilisent un jeton et vous le révoquez, l’accès à l’API sera bloqué pour ces applications. + .card-title + = t('.tokens_title') + %p + = t('.first_paragraph') + #{APPLICATION_NAME}. + %p + = t('.second_paragraph') = render Dsfr::ListComponent.new do |list| - api_and_packed_tokens.each do |(api_token, packed_token)| @@ -11,5 +15,4 @@ .fr-card__content = render Profile::APITokenComponent.new(api_token:, packed_token:) - %br - = button_to "Créer et afficher un nouveau jeton", api_tokens_path, method: :post, class: "fr-btn fr-btn--secondary" + = button_to t('.action'), api_tokens_path, method: :post, class: "fr-btn fr-btn--secondary" diff --git a/app/components/profile/api_token_component/api_token_component.en.yml b/app/components/profile/api_token_component/api_token_component.en.yml new file mode 100644 index 000000000..2aa369fc8 --- /dev/null +++ b/app/components/profile/api_token_component/api_token_component.en.yml @@ -0,0 +1,16 @@ +en: + allowed_full_access_html: This token has access to all the procedures attached to your administrator account + allowed_procedures_html: + zero: This token has no access to any process. + one: This token has access to a selected process + other: This token has access to %{count} selected steps + security_one: For security reasons, it will not be re-posted, please note. + security_two: For security reasons, we can only show it to you when it is created. + action_all: Allow access to all procedures + action_choice: Allow access only to selected steps + add: Add + delete: Delete + token_procedures: This token has access to the procedures + revoke_token: Revoke token + reading_writing: Reading and writing + reading: Read only diff --git a/app/components/profile/api_token_component/api_token_component.fr.yml b/app/components/profile/api_token_component/api_token_component.fr.yml index 52bbadc5f..93419d3d4 100644 --- a/app/components/profile/api_token_component/api_token_component.fr.yml +++ b/app/components/profile/api_token_component/api_token_component.fr.yml @@ -4,3 +4,13 @@ fr: zero: Ce jeton n’a accès à aucune démarche one: Ce jeton a accès a une démarche sélectionnée other: Ce jeton a accès a %{count} démarches sélectionnées + security_one: Pour des raisons de sécurité, il ne sera plus ré-affiché, notez-le bien. + security_two: Pour des raisons de sécurité, nous ne pouvons vous l’afficher que lors de sa création. + action_all: Autoriser l’accès a toutes les démarches + action_choice: Autoriser l’accès seulement a des démarches choisies + add: Ajouter + delete: Supprimer + token_procedures: Ce jeton a accès aux démarches + revoke_token: Révoquer le jeton + reading_writing: En lecture et écriture + reading: En lecture seule diff --git a/app/components/profile/api_token_component/api_token_component.html.haml b/app/components/profile/api_token_component/api_token_component.html.haml index 38dd310a1..8ac258e11 100644 --- a/app/components/profile/api_token_component/api_token_component.html.haml +++ b/app/components/profile/api_token_component/api_token_component.html.haml @@ -13,10 +13,12 @@ - button = render Dsfr::CopyButtonComponent.new(text: @packed_token, title: "Copier le jeton dans le presse-papier", success: "Le jeton a été copié dans le presse-papier") = "#{@packed_token} #{button}" - %p Pour des raisons de sécurité, il ne sera plus ré-affiché, notez-le bien. + %p + = t('.security_one') - else - %p Pour des raisons de sécurité, nous ne pouvons vous l’afficher que lors de sa création. + %p + = t('.security_two') - if @api_token.full_access? %p.fr-text--lg @@ -26,33 +28,35 @@ = t('.allowed_procedures_html', count: @api_token.allowed_procedures.size) - if @api_token.allowed_procedures.empty? - = button_to "Autoriser l’accès a toutes les démarches", @api_token, method: :patch, params: { api_token: { disallow_procedure_id: '0' } }, class: "fr-btn fr-btn--secondary" + = button_to t('.action_all'), @api_token, method: :patch, params: { api_token: { disallow_procedure_id: '0' } }, class: "fr-btn fr-btn--secondary" - else %ul - @api_token.allowed_procedures.each do |procedure| %li.flex.justify-between.align-center .truncate-80 = "#{procedure.id} – #{procedure.libelle}" - = button_to "Supprimer", @api_token, method: :patch, params: { api_token: { disallow_procedure_id: procedure.id } }, class: "fr-btn fr-btn--secondary" + = button_to t('.delete'), @api_token, method: :patch, params: { api_token: { disallow_procedure_id: procedure.id } }, class: "fr-btn fr-btn--secondary" .fr-card__end = form_for @api_token, namespace: dom_id(@api_token, :allowed_procedures), html: { class: 'form form-ds-fr-white mb-3', data: { turbo: true } } do |f| = f.label :allowed_procedure_ids do - Autoriser l’accès seulement a des démarches choisies + = t('.action_choice') - @api_token.allowed_procedures.each do |procedure| = f.hidden_field :allowed_procedure_ids, value: procedure.id, multiple: true, id: dom_id(procedure, :allowed_procedure) .flex.justify-between.align-center{ 'data-turbo-force': true } = f.select :allowed_procedure_ids, procedures_to_allow_options, procedures_to_allow_select_options, { class: 'no-margin width-66 small', name: "api_token[allowed_procedure_ids][]" } = f.button type: :submit, class: "fr-btn fr-btn--secondary" do - Ajouter + = t('.add') = form_for @api_token, namespace: dom_id(@api_token, :write_access), html: { class: 'form form-ds-fr-white mb-3', data: { turbo: true, controller: 'autosubmit' } } do |f| = f.label :write_access do - Ce jeton a accès aux démarches + = t('.token_procedures') %label.toggle-switch.no-margin = f.check_box :write_access, class: 'toggle-switch-checkbox' %span.toggle-switch-control.round - %span.toggle-switch-label.on En lecture et écriture - %span.toggle-switch-label.off En lecture seule + %span.toggle-switch-label.on + = t('.reading_writing') + %span.toggle-switch-label.off + = t('.reading') - = button_to "Révoquer le jeton", api_token_path(@api_token), method: :delete, class: "fr-btn fr-btn--secondary", data: { turbo_confirm: "Confirmez-vous la révocation de ce jeton ? Les applications qui l’utilisent actuellement seront bloquées." } + = button_to t('.revoke_token'), api_token_path(@api_token), method: :delete, class: "fr-btn fr-btn--secondary", data: { turbo_confirm: "Confirmez-vous la révocation de ce jeton ? Les applications qui l’utilisent actuellement seront bloquées." } diff --git a/app/views/layouts/mailers/_signature.html.haml b/app/views/layouts/mailers/_signature.html.haml index c26f14396..69d2a64dd 100644 --- a/app/views/layouts/mailers/_signature.html.haml +++ b/app/views/layouts/mailers/_signature.html.haml @@ -5,4 +5,5 @@ = service.nom - else -# The WORD JOINER unicode entity (⁠) prevents email clients from auto-linking the signature - L’équipe #{APPLICATION_NAME.gsub(".","⁠.").html_safe} + = t('.team') + #{APPLICATION_NAME.gsub(".","⁠.").html_safe} diff --git a/app/views/support/index.html.haml b/app/views/support/index.html.haml index 261304735..e8101b974 100644 --- a/app/views/support/index.html.haml +++ b/app/views/support/index.html.haml @@ -61,7 +61,8 @@ .fr-upload-group = label_tag :piece_jointe, class: 'fr-label' do = t('pj', scope: [:utils]) - %span.fr-hint-text Taille maximale : 200 Mo. Formats supportés : jpg, png, pdf. + %span.fr-hint-text + = t('.notice_upload_group') %p.notice.hidden{ data: { 'contact-type-only': Helpscout::FormAdapter::TYPE_AMELIORATION } } = t('.notice_pj_product') diff --git a/app/views/users/dossiers/_deleted_dossiers_list.html.haml b/app/views/users/dossiers/_deleted_dossiers_list.html.haml index 2c2fabaec..d467793fa 100644 --- a/app/views/users/dossiers/_deleted_dossiers_list.html.haml +++ b/app/views/users/dossiers/_deleted_dossiers_list.html.haml @@ -31,8 +31,10 @@ - else .blank-tab - %h2.empty-text Aucun dossier. + %h2.empty-text + = t("views.users.dossiers.account_creation.empty") %p.empty-text-details - Pour remplir une démarche, contactez votre administration en lui demandant le lien de la démarche. - %br - Celui ci doit ressembler à #{APPLICATION_BASE_URL}/commencer/xxx. + = t("views.users.dossiers.account_creation.detail_one") + %p.empty-text-details + = t("views.users.dossiers.account_creation.detail_two") + #{APPLICATION_BASE_URL}/commencer/xxx. diff --git a/app/views/users/dossiers/_hidden_dossiers_list.html.haml b/app/views/users/dossiers/_hidden_dossiers_list.html.haml index 0eaca0601..c5e63dee0 100644 --- a/app/views/users/dossiers/_hidden_dossiers_list.html.haml +++ b/app/views/users/dossiers/_hidden_dossiers_list.html.haml @@ -35,8 +35,10 @@ - else .blank-tab - %h2.empty-text Aucun dossier. + %h2.empty-text + = t("views.users.dossiers.account_creation.empty") %p.empty-text-details - Pour remplir une démarche, contactez votre administration en lui demandant le lien de la démarche. - %br - Celui ci doit ressembler à #{APPLICATION_BASE_URL}/commencer/xxx. + = t("views.users.dossiers.account_creation.detail_one") + %p.empty-text-details + = t("views.users.dossiers.account_creation.detail_two") + #{APPLICATION_BASE_URL}/commencer/xxx. diff --git a/config/locales/en.yml b/config/locales/en.yml index 1cdc3f631..ccc09d6c1 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -385,6 +385,10 @@ en: dossier_not_in_instructor_group: "File no. %{dossier_id} of the “%{procedure_libelle}” procedure corresponds to your search, but it is attached to the “%{groupe_instructeur_label}” instructor group." users: dossiers: + account_creation: + empty: "No file" + detail_one: "To complete a procedure, contact your administration and ask for the link to the procedure." + detail_two: "This one should look like" archived_dossier: "Your file will be kept %{duree_conservation_dossiers_dans_ds} more months" identite: identity_data: Identity data diff --git a/config/locales/fr.yml b/config/locales/fr.yml index df157d89f..8fcd3b281 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -386,6 +386,10 @@ fr: dossier_not_in_instructor_group: "Le dossier n° %{dossier_id} de la procédure « %{procedure_libelle} » correspond à votre recherche mais il est rattaché au groupe d’instructeurs « %{groupe_instructeur_label} »." users: dossiers: + account_creation: + empty: "Aucun dossier" + detail_one: "Pour remplir une démarche, contactez votre administration en lui demandant le lien de la démarche." + detail_two: "Celui ci doit ressembler à" archived_dossier: "Votre dossier sera conservé %{duree_conservation_dossiers_dans_ds} mois supplémentaire" identite: identity_data: Données d’identité diff --git a/config/locales/views/layouts/mailers/en.yml b/config/locales/views/layouts/mailers/en.yml index 4c54b1468..14844d400 100644 --- a/config/locales/views/layouts/mailers/en.yml +++ b/config/locales/views/layouts/mailers/en.yml @@ -11,3 +11,5 @@ en: by_email: "By email :" by_phone: "By phone :" schedule: "Schedule :" + signature: + team: "The team" diff --git a/config/locales/views/layouts/mailers/fr.yml b/config/locales/views/layouts/mailers/fr.yml index 92e067aac..1741da3a4 100644 --- a/config/locales/views/layouts/mailers/fr.yml +++ b/config/locales/views/layouts/mailers/fr.yml @@ -1,3 +1,4 @@ + fr: layouts: mailers: @@ -11,3 +12,5 @@ fr: by_email: "Par email :" by_phone: "Par téléphone :" schedule: "Horaires :" + signature: + team: "L’équipe" diff --git a/config/locales/views/support/en.yml b/config/locales/views/support/en.yml index 1b16ef2ed..0fda6c690 100644 --- a/config/locales/views/support/en.yml +++ b/config/locales/views/support/en.yml @@ -8,6 +8,7 @@ en: our_answer: 👉 Our answer notice_pj_product: A screenshot can help us identify the element to improve. notice_pj_other: A screenshot can help us identify the issue. + notice_upload_group: "Maximum size: 200 MB. Supported formats: jpg, png, pdf." procedure_info: question: I've encountered a problem while completing my application answer_html: "

Are you sure that all the mandatory fields ( * ) are properly filled? diff --git a/config/locales/views/support/fr.yml b/config/locales/views/support/fr.yml index aebe2ca2e..45ec8aaaa 100644 --- a/config/locales/views/support/fr.yml +++ b/config/locales/views/support/fr.yml @@ -8,6 +8,7 @@ fr: our_answer: 👉 Notre réponse notice_pj_product: Une capture d’écran peut nous aider à identifier plus facilement l’endroit à améliorer. notice_pj_other: Une capture d’écran peut nous aider à identifier plus facilement le problème. + notice_upload_group: "Taille maximale : 200 Mo. Formats supportés : jpg, png, pdf." procedure_info: question: J’ai un problème lors du remplissage de mon dossier answer_html: "

Avez-vous bien vérifié que tous les champs obligatoires ( * ) sont remplis ?