Skip to content

Commit

Permalink
feat(mon-pix): change tone and voice
Browse files Browse the repository at this point in the history
  • Loading branch information
EmmanuelleBonnemay authored Oct 31, 2024
1 parent 41da2de commit 581aff7
Show file tree
Hide file tree
Showing 9 changed files with 111 additions and 46 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ export default class OtherAuthenticationProviders extends Component {
<section class="authentication-other-authentication-providers-section">
<h2 class="authentication-other-authentication-providers-section__heading">
{{#if @isForSignup}}
{{t "components.authentication.other-authentication-providers.signup-heading"}}
{{t "components.authentication.other-authentication-providers.signup.heading"}}
{{else}}
{{t "components.authentication.other-authentication-providers.login-heading"}}
{{t "components.authentication.other-authentication-providers.login.heading"}}
{{/if}}
</h2>

Expand All @@ -34,11 +34,18 @@ export default class OtherAuthenticationProviders extends Component {
alt=""
class="authentication-other-authentication-providers-section__featured-identity-provider-logo"
/>

{{t
"components.authentication.other-authentication-providers.continue-with-featured-identity-provider-link"
featuredIdentityProvider=this.oidcIdentityProviders.featuredIdentityProvider.organizationName
}}</PixButtonLink>
{{#if @isForSignup}}
{{t
"components.authentication.other-authentication-providers.signup.signup-with-featured-identity-provider-link"
featuredIdentityProvider=this.oidcIdentityProviders.featuredIdentityProvider.organizationName
}}
{{else}}
{{t
"components.authentication.other-authentication-providers.login.login-with-featured-identity-provider-link"
featuredIdentityProvider=this.oidcIdentityProviders.featuredIdentityProvider.organizationName
}}
{{/if}}
</PixButtonLink>
{{/if}}

{{#if this.oidcIdentityProviders.hasOtherIdentityProviders}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
@extend %pix-body-s;

a {
color: var(--pix-neutral-800);
color: var(--pix-primary-500);
font-weight: var(--pix-font-bold);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module('Integration | Component | Authentication | other-authentication-provider
assert
.dom(
screen.getByRole('heading', {
name: t('components.authentication.other-authentication-providers.login-heading'),
name: t('components.authentication.other-authentication-providers.login.heading'),
}),
)
.exists();
Expand All @@ -34,15 +34,16 @@ module('Integration | Component | Authentication | other-authentication-provider
assert
.dom(
screen.getByRole('heading', {
name: t('components.authentication.other-authentication-providers.signup-heading'),
name: t('components.authentication.other-authentication-providers.signup.heading'),
}),
)
.exists();
});
});

module('when there is a featured identity provider', function () {
test('it displays a continue featured identity provider link', async function (assert) {
module('when it’s for login');
test('it displays a login featured identity provider link', async function (assert) {
// given
class OidcIdentityProvidersServiceStub extends Service {
get featuredIdentityProvider() {
Expand All @@ -57,7 +58,32 @@ module('Integration | Component | Authentication | other-authentication-provider
// then
const link = await screen.findByRole('link', {
name: t(
'components.authentication.other-authentication-providers.continue-with-featured-identity-provider-link',
'components.authentication.other-authentication-providers.login.login-with-featured-identity-provider-link',
{
featuredIdentityProvider: 'Some Identity Provider',
},
),
});
assert.dom(link).exists();
assert.strictEqual(link.getAttribute('href'), '/connexion/some-identity-provider');
});
module('when it’s for signup');
test('it displays a signup featured identity provider link', async function (assert) {
// given
class OidcIdentityProvidersServiceStub extends Service {
get featuredIdentityProvider() {
return { organizationName: 'Some Identity Provider', slug: 'some-identity-provider' };
}
}
this.owner.register('service:oidcIdentityProviders', OidcIdentityProvidersServiceStub);

// when
const screen = await render(<template><OtherAuthenticationProviders @isForSignup="true" /></template>);

// then
const link = await screen.findByRole('link', {
name: t(
'components.authentication.other-authentication-providers.signup.signup-with-featured-identity-provider-link',
{
featuredIdentityProvider: 'Some Identity Provider',
},
Expand Down Expand Up @@ -86,7 +112,19 @@ module('Integration | Component | Authentication | other-authentication-provider
.dom(
screen.queryByText(
t(
'components.authentication.other-authentication-providers.continue-with-featured-identity-provider-link',
'components.authentication.other-authentication-providers.login.login-with-featured-identity-provider-link',
{
featuredIdentityProvider: 'Some Identity Provider',
},
),
),
)
.doesNotExist();
assert
.dom(
screen.queryByText(
t(
'components.authentication.other-authentication-providers.signup.signup-with-featured-identity-provider-link',
{
featuredIdentityProvider: 'Some Identity Provider',
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ module('Integration | Component | Authentication | SigninForm', function (hooks)
await clickByName(t(I18N_KEYS.submitButton));

// then
const errorMessage = 'Impossible de se connecter. Merci de réessayer dans quelques instants.';
const errorMessage = 'Impossible de se connecter. Veuillez réessayer dans quelques instants.';
assert.dom(screen.getByText(errorMessage, { exact: false })).exists();

const errorMessageLink = screen.getByRole('link', { name: 'merci de nous contacter' });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ module('Integration | Component | Authentication | SignupForm | index', function
await clickByName(t(I18N_KEYS.submitButton));

// then
const errorMessage = 'Impossible de se connecter. Merci de réessayer dans quelques instants.';
const errorMessage = 'Impossible de se connecter. Veuillez réessayer dans quelques instants.';
assert.dom(screen.getByText(errorMessage, { exact: false })).exists();

const errorMessageLink = screen.getByRole('link', { name: 'merci de nous contacter' });
Expand Down
33 changes: 19 additions & 14 deletions mon-pix/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"error": "You must agree to the Pix terms of use and personal data protection policy to create an account.",
"label": "Agree Pix terms of use and personal data protection policy",
"message": "I agree to the '<'a href=\"{cguUrl}\" class=\"link\" target=\"_blank\" rel=\"noreferrer\"'>'Pix terms of use'</a>' and '<'a href=\"{dataProtectionPolicyUrl}\" class=\"link\" target=\"_blank\" rel=\"noreferrer\"'>'personal data protection policy'</a>'",
"read-message": "Read the '<'a href=\"{cguUrl}\" class=\"link\" target=\"_blank\" rel=\"noreferrer\"'>'Pix terms of use'</a>' et la '<'a href=\"{dataProtectionPolicyUrl}\" class=\"link\" target=\"_blank\" rel=\"noreferrer\"'>'personal data protection policy'</a>'."
"read-message": "Read the '<'a href=\"{cguUrl}\" class=\"link\" target=\"_blank\" rel=\"noreferrer\"'>'Pix terms of use'</a>' and the '<'a href=\"{dataProtectionPolicyUrl}\" class=\"link\" target=\"_blank\" rel=\"noreferrer\"'>'personal data protection policy'</a>'."
},
"companion": {
"not-detected": {
Expand Down Expand Up @@ -148,10 +148,15 @@
"searchLabel": "Keyword search"
},
"other-authentication-providers": {
"continue-with-featured-identity-provider-link": "Continue with {featuredIdentityProvider}",
"login-heading": "Other ways to log in",
"login": {
"heading": "Other ways to log in",
"login-with-featured-identity-provider-link": "Login with {featuredIdentityProvider}"
},
"select-another-organization-link": "Choose another organisation",
"signup-heading": "Other ways to sign up"
"signup": {
"heading": "Other ways to sign up",
"signup-with-featured-identity-provider-link": "Register with {featuredIdentityProvider}"
}
},
"password-reset-demand-form": {
"actions": {
Expand All @@ -165,7 +170,7 @@
"email": {
"error-message-invalid": "Your email address is invalid.",
"label": "Email address",
"placeholder": "ex: john.doe@email.com"
"placeholder": "e.g. john.smith@example.com"
}
},
"no-email-question": "No email address?",
Expand Down Expand Up @@ -207,17 +212,17 @@
"email": {
"error": "Your email address is invalid.",
"label": "Email address",
"placeholder": "ex: john.[email protected]"
"placeholder": "e.g. john.[email protected]"
},
"firstname": {
"error": "You have not entered your first name.",
"label": "First name",
"placeholder": "ex: John"
"placeholder": "e.g. John"
},
"lastname": {
"error": "You have not entered your last name.",
"label": "Last name",
"placeholder": "ex: Doe"
"placeholder": "e.g. Smith"
},
"legend": "Information required for sign up."
}
Expand Down Expand Up @@ -446,7 +451,7 @@
},
"authentication": {
"login": {
"signup-button": "Sign up to Pix"
"signup-button": "Sign up"
},
"sso-selection": {
"signin": {
Expand All @@ -457,7 +462,7 @@
"link": "Sign up",
"title": "Don't have an account?"
},
"title": "Choose another organization"
"title": "Choose your organization"
}
},
"autonomous-course": {
Expand Down Expand Up @@ -1411,7 +1416,7 @@
"cgu": "I agree to the '<a href=\"https://pix.org/en/terms-and-conditions\" class=\"link\" target=\"_blank\" rel=\"noopener noreferrer\">'terms and conditions of use of the Pix platform'</a>'",
"email": {
"error": "Your email address is invalid.",
"help": "(eg. [email protected])",
"help": "(e.g. [email protected])",
"label": "Email address"
},
"firstname": {
Expand Down Expand Up @@ -1748,7 +1753,7 @@
"legend": "Information required for sign in.",
"login": {
"label": "Email address or username",
"placeholder": "ex: jean.dupont@email.com"
"placeholder": "e.g. john.smith@example.com"
},
"password": {
"label": "Password"
Expand Down Expand Up @@ -1777,7 +1782,7 @@
},
"sign-up": {
"actions": {
"login": "Log in to Pix",
"login": "Log in",
"submit": "Sign up"
},
"errors": {
Expand All @@ -1787,7 +1792,7 @@
"fields": {
"email": {
"error": "Your email address is invalid.",
"help": "(eg. [email protected])",
"help": "(e.g. [email protected])",
"label": "Email address"
},
"firstname": {
Expand Down
13 changes: 9 additions & 4 deletions mon-pix/translations/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,15 @@
"searchLabel": "Búsqueda por palabras clave"
},
"other-authentication-providers": {
"continue-with-featured-identity-provider-link": "Continuar con {featuredIdentityProvider}",
"login-heading": "Otros medios de conexión",
"login": {
"heading": "Otros medios de conexión",
"login-with-featured-identity-provider-link": "Continuar con {featuredIdentityProvider}"
},
"select-another-organization-link": "Elegir otra organización",
"signup-heading": "Otros medios de registro"
"signup": {
"heading": "Otros medios de registro",
"signup-with-featured-identity-provider-link": "Continuar con {featuredIdentityProvider}"
}
},
"password-reset-demand-form": {
"404-message": "Esta dirección de correo electrónico no corresponde a ninguna cuenta",
Expand Down Expand Up @@ -2178,4 +2183,4 @@
"title": "Mis tutoriales"
}
}
}
}
23 changes: 14 additions & 9 deletions mon-pix/translations/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"gateway-timeout-error": "Le service subit des ralentissements. Veuillez réessayer ultérieurement.",
"internal-server-error": "Une erreur interne est survenue, nos équipes sont en train de résoudre le problème. Veuillez réessayer ultérieurement.",
"login-unauthorized-error": "L'adresse e-mail ou l'identifiant et/ou le mot de passe saisis sont incorrects.",
"login-unexpected-error": "Impossible de se connecter. Merci de réessayer dans quelques instants. Si le problème persiste, '<'a href=\"https://pix.fr/support\" target=\"blank\"'>'merci de nous contacter'</a>'.",
"login-unexpected-error": "Impossible de se connecter. Veuillez réessayer dans quelques instants. Si le problème persiste, '<'a href=\"https://pix.fr/support\" target=\"blank\"'>'merci de nous contacter'</a>'.",
"login-user-blocked-error": "Votre compte est bloqué car vous avez effectué trop de tentatives de connexion. Pour le débloquer, '<'a href=\"{url}\"'>'contactez-nous'</a>'.",
"login-user-temporary-blocked-error": "Vous avez effectué trop de tentatives de connexion. Réessayez plus tard ou cliquez sur '<'a href=\"{url}\"'>'mot de passe oublié'</a>' pour le réinitialiser."
},
Expand Down Expand Up @@ -148,10 +148,15 @@
"searchLabel": "Recherche par mots-clés"
},
"other-authentication-providers": {
"continue-with-featured-identity-provider-link": "Continuer avec {featuredIdentityProvider}",
"login-heading": "Autres moyens de connexion",
"login": {
"heading": "Autres moyens de connexion",
"login-with-featured-identity-provider-link": "Se connecter avec {featuredIdentityProvider}"
},
"select-another-organization-link": "Choisir une autre organisation",
"signup-heading": "Autres moyens d’inscription"
"signup": {
"heading": "Autres moyens d’inscription",
"signup-with-featured-identity-provider-link": "S'inscrire avec {featuredIdentityProvider}"
}
},
"password-reset-demand-form": {
"actions": {
Expand Down Expand Up @@ -180,7 +185,7 @@
"password-reset-form": {
"actions": {
"login": "Je me connecte",
"submit": "Je réinitialise mon mot de passe"
"submit": "Réinitialiser mon mot de passe"
},
"errors": {
"expired-demand": "Nous sommes désolés, mais votre demande de réinitialisation de mot de passe a déjà été utilisée ou est expirée. Merci de recommencer.",
Expand Down Expand Up @@ -262,7 +267,7 @@
"footer": {
"a11y": "Accessibilité : partiellement conforme",
"data-protection-policy": "Politique de protection des données",
"eula": "CGU",
"eula": "Conditions Générales d’Utilisation",
"help-center": "Centre d'aide",
"label": "Menu de bas de page",
"legal-notice": "Mentions légales",
Expand Down Expand Up @@ -446,7 +451,7 @@
},
"authentication": {
"login": {
"signup-button": "S'inscrire sur Pix"
"signup-button": "S'inscrire"
},
"sso-selection": {
"signin": {
Expand All @@ -457,7 +462,7 @@
"link": "Inscrivez-vous",
"title": "Vous n'avez pas de compte ?"
},
"title": "Choisir une autre organisation"
"title": "Choisissez votre organisation"
}
},
"autonomous-course": {
Expand Down Expand Up @@ -1777,7 +1782,7 @@
},
"sign-up": {
"actions": {
"login": "Se connecter sur Pix",
"login": "Se connecter",
"submit": "Je m'inscris"
},
"errors": {
Expand Down
13 changes: 9 additions & 4 deletions mon-pix/translations/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,15 @@
"searchLabel": "Zoeken op trefwoorden"
},
"other-authentication-providers": {
"continue-with-featured-identity-provider-link": "Doorgaan met {featuredIdentityProvider}",
"login-heading": "Andere verbindingsmethoden",
"login": {
"heading": "Andere verbindingsmethoden",
"login-with-featured-identity-provider-link": "Doorgaan met {featuredIdentityProvider}"
},
"select-another-organization-link": "Kies een andere organisatie",
"signup-heading": "Andere manieren van registratie"
"signup": {
"heading": "Andere manieren van registratie",
"signup-with-featured-identity-provider-link": "Doorgaan met {featuredIdentityProvider}"
}
},
"password-reset-demand-form": {
"404-message": "Dit e-mailadres komt niet overeen met een account",
Expand Down Expand Up @@ -2178,4 +2183,4 @@
"title": "Mijn tutorials"
}
}
}
}

0 comments on commit 581aff7

Please sign in to comment.