Merge pull request #6414 from betagouv/localization-improvements
Amélioration du sélecteur de langues (#6414)
This commit is contained in:
commit
fd1a2e9307
6 changed files with 32 additions and 24 deletions
|
@ -234,6 +234,10 @@ $header-mobile-breakpoint: 550px;
|
||||||
display: flex;
|
display: flex;
|
||||||
color: $black;
|
color: $black;
|
||||||
|
|
||||||
|
&.active {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background: $light-grey;
|
background: $light-grey;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
.dropdown.locale-dropdown.header-menu-opener
|
.dropdown.locale-dropdown.header-menu-opener
|
||||||
%button.button.dropdown-button.icon-only.header-menu-button{ title: "Translate", aria: { expanded: 'false', controls: 'locale_menu' } }
|
%button.button.dropdown-button.icon-only.header-menu-button{ title: t('.languages'), aria: { expanded: 'false', controls: 'locale_menu' } }
|
||||||
.hidden Translate
|
.hidden t('.languages')
|
||||||
= image_tag "icons/translate-icon.svg", alt: 'Translate', width: 24, height: 24, lazy: true, aria: { hidden: true }
|
= image_tag "icons/translate-icon.svg", alt: t('.languages'), width: 24, height: 24, lazy: true, aria: { hidden: true }
|
||||||
%ul.header-menu.dropdown-content
|
%ul.header-menu.dropdown-content
|
||||||
%li
|
%li
|
||||||
= link_to save_locale_path(locale: :en), method: :post, class: "menu-item menu-link" do
|
= active_link_to save_locale_path(locale: :fr), method: :post, class: "menu-item menu-link", active: I18n.locale == :fr do
|
||||||
EN – English
|
Français
|
||||||
%li
|
%li
|
||||||
= link_to save_locale_path(locale: :fr), method: :post, class: "menu-item menu-link" do
|
= active_link_to save_locale_path(locale: :en), method: :post, class: "menu-item menu-link", active: I18n.locale == :en do
|
||||||
FR – français
|
English
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
= image_tag "landing/hero/dematerialiser.svg", class: "paperless-logo", alt: "moins de papier"
|
= image_tag "landing/hero/dematerialiser.svg", class: "paperless-logo", alt: "moins de papier"
|
||||||
.baseline.center
|
.baseline.center
|
||||||
%p
|
%p
|
||||||
%span.simple= t('views.layouts.commencer.no_procedure.line1')
|
%span.simple= t('.line1')
|
||||||
%br
|
%br
|
||||||
= t('views.layouts.commencer.no_procedure.line2')
|
= t('.line2')
|
||||||
%br
|
%br
|
||||||
= t('views.layouts.commencer.no_procedure.line3')
|
= t('.line3')
|
||||||
|
|
|
@ -45,6 +45,14 @@ en:
|
||||||
commentaire:
|
commentaire:
|
||||||
send_message_to_instructeur: "Send a message to the instructor"
|
send_message_to_instructeur: "Send a message to the instructor"
|
||||||
reply_in_mailbox: "Reply in mailbox"
|
reply_in_mailbox: "Reply in mailbox"
|
||||||
|
layouts:
|
||||||
|
commencer:
|
||||||
|
no_procedure:
|
||||||
|
line1: A simple tool
|
||||||
|
line2: to manage dematerialized
|
||||||
|
line3: administrative forms.
|
||||||
|
locale_dropdown:
|
||||||
|
languages: "Languages"
|
||||||
views:
|
views:
|
||||||
commencer:
|
commencer:
|
||||||
show:
|
show:
|
||||||
|
@ -85,12 +93,6 @@ en:
|
||||||
want_to_withdraw_permission: "Would you like to withdraw the permission?"
|
want_to_withdraw_permission: "Would you like to withdraw the permission?"
|
||||||
edit_dossier: "These people can edit this file."
|
edit_dossier: "These people can edit this file."
|
||||||
submit_dossier_yourself: "You must submit the file yourself when it is complete."
|
submit_dossier_yourself: "You must submit the file yourself when it is complete."
|
||||||
layouts:
|
|
||||||
commencer:
|
|
||||||
no_procedure:
|
|
||||||
line1: A simple tool
|
|
||||||
line2: to manage dematerialized
|
|
||||||
line3: administrative forms.
|
|
||||||
pagination:
|
pagination:
|
||||||
next: Next
|
next: Next
|
||||||
last: Last
|
last: Last
|
||||||
|
|
|
@ -35,6 +35,14 @@ fr:
|
||||||
commentaire:
|
commentaire:
|
||||||
send_message_to_instructeur: "Envoyer un message à l’instructeur"
|
send_message_to_instructeur: "Envoyer un message à l’instructeur"
|
||||||
reply_in_mailbox: "Répondre dans la messagerie."
|
reply_in_mailbox: "Répondre dans la messagerie."
|
||||||
|
layouts:
|
||||||
|
commencer:
|
||||||
|
no_procedure:
|
||||||
|
line1: Un outil simple
|
||||||
|
line2: pour gérer les formulaires
|
||||||
|
line3: administratifs dématérialisés.
|
||||||
|
locale_dropdown:
|
||||||
|
languages: "Langues"
|
||||||
views:
|
views:
|
||||||
commencer:
|
commencer:
|
||||||
show:
|
show:
|
||||||
|
@ -76,12 +84,6 @@ fr:
|
||||||
want_to_withdraw_permission: "Souhaitez-vous supprimer l’autorisation ?"
|
want_to_withdraw_permission: "Souhaitez-vous supprimer l’autorisation ?"
|
||||||
edit_dossier: "Ces personnes peuvent modifier ce dossier."
|
edit_dossier: "Ces personnes peuvent modifier ce dossier."
|
||||||
submit_dossier_yourself: "Une fois le dossier complet, vous devez le déposer vous-même."
|
submit_dossier_yourself: "Une fois le dossier complet, vous devez le déposer vous-même."
|
||||||
layouts:
|
|
||||||
commencer:
|
|
||||||
no_procedure:
|
|
||||||
line1: Un outil simple
|
|
||||||
line2: pour gérer les formulaires
|
|
||||||
line3: administratifs dématérialisés.
|
|
||||||
pagination:
|
pagination:
|
||||||
next: Suivant
|
next: Suivant
|
||||||
last: Dernier
|
last: Dernier
|
||||||
|
|
|
@ -7,8 +7,8 @@ feature 'Accessing the website in different languages:' do
|
||||||
visit new_user_session_path
|
visit new_user_session_path
|
||||||
expect(page).to have_text('Connectez-vous')
|
expect(page).to have_text('Connectez-vous')
|
||||||
|
|
||||||
click_on 'Translate'
|
click_on 'Langues'
|
||||||
click_on 'EN – English'
|
click_on 'English'
|
||||||
|
|
||||||
# The page is now in English
|
# The page is now in English
|
||||||
expect(page).to have_text('Sign in')
|
expect(page).to have_text('Sign in')
|
||||||
|
|
Loading…
Reference in a new issue