💬(app-desk) update translations of teams feature

This commit is part of the replacement of "teams" by "groups" wording task.
It changes words in the "teams" feature and add more meaningful wording in
English and French, and removes the icon used in the title of the group
member deletion modal as it rather lets think we are deleting a group.
Updates of related e2e and rendering tests come along with these changes.
This commit is contained in:
daproclaima
2024-06-06 15:49:13 +02:00
committed by Sebastien Nobour
parent 8a44718e6b
commit 8af47283c8
9 changed files with 42 additions and 28 deletions

View File

@@ -106,7 +106,7 @@ export const MemberGrid = ({ team, currentRole }: MemberGridProps) => {
}}
onClick={() => setIsModalMemberOpen(true)}
>
{t('Add')}
{t('Add a member')}
</Button>
</Box>
)}

View File

@@ -14,7 +14,6 @@ import { useCunninghamTheme } from '@/cunningham';
import { Role, Team } from '@/features/teams/';
import { useDeleteTeamAccess } from '../api/useDeleteTeamAccess';
import IconRemoveMember from '../assets/icon-remove-member.svg';
import { useWhoAmI } from '../hooks/useWhoAmI';
import { Access } from '../types';
@@ -82,9 +81,8 @@ export const ModalDelete = ({ access, onClose, team }: ModalDeleteProps) => {
size={ModalSize.MEDIUM}
title={
<Box $align="center" $gap="1rem">
<IconRemoveMember width={48} color={colorsTokens()['primary-text']} />
<Text $size="h3" $margin="none">
{t('Remove the member')}
{t('Remove this member from the group')}
</Text>
</Box>
}

View File

@@ -142,7 +142,7 @@ describe('PanelTeams', () => {
screen.getByRole('button', { name: 'Close the teams panel' }),
).toBeVisible();
expect(await screen.findByText('Recents')).toBeVisible();
expect(await screen.findByText('Groups')).toBeVisible();
});
it('closes and opens the team panel', async () => {
@@ -153,7 +153,7 @@ describe('PanelTeams', () => {
render(<Panel />, { wrapper: AppWrapper });
expect(await screen.findByText('Recents')).toBeVisible();
expect(await screen.findByText('Groups')).toBeVisible();
await userEvent.click(
screen.getByRole('button', {
@@ -161,7 +161,7 @@ describe('PanelTeams', () => {
}),
);
expect(await screen.findByText('Recents')).not.toBeVisible();
expect(await screen.findByText('Groups')).not.toBeVisible();
await userEvent.click(
screen.getByRole('button', {
@@ -169,6 +169,6 @@ describe('PanelTeams', () => {
}),
);
expect(await screen.findByText('Recents')).toBeVisible();
expect(await screen.findByText('Groups')).toBeVisible();
});
});

View File

@@ -45,7 +45,7 @@ export const CardCreateTeam = () => {
aria-label={t('icon group')}
/>
<Text as="h3" $textAlign="center">
{t('Name the team')}
{t('Create a new group')}
</Text>
</Box>
<InputTeamName

View File

@@ -69,7 +69,7 @@ export const Panel = () => {
`}
>
<Text $weight="bold" $size="1.25rem">
{t('Recents')}
{t('Groups')}
</Text>
<PanelActions />
</Box>

View File

@@ -9,23 +9,25 @@
"fr": {
"translation": {
"0 group to display.": "0 groupe à afficher.",
"Add": "Ajouter",
"0 mail domain to display.": "0 domaine de mail à afficher.",
"Add a member": "Ajouter un membre",
"Add a team": "Ajouter un groupe",
"Add members to the team": "Ajoutez des membres à votre groupe",
"Add team icon": "Icône ajout de groupe",
"Administration": "Administration",
"Are you sure you want to delete {{teamName}} team?": "Êtes-vous sûr de vouloir supprimer le groupe {{teamName}}?",
"Are you sure you want to remove this member from the {{team}} group?": "Êtes-vous sûr de vouloir supprimer ce membre du groupe {{team}}?",
"Back to home page": "Retour à l'accueil",
"Cancel": "Annuler",
"Choose a role": "Choisissez un rôle",
"Close the mail domains panel": "Fermer le panneau des domaines de messagerie",
"Close the modal": "Fermer la modale",
"Close the teams panel": "Fermer le panneau des groupes",
"Confirm deletion": "Confirmer la suppression",
"Contacts": "Contacts",
"Content modal to delete the team": "Contenu modal pour supprimer le groupe",
"Content modal to update the team": "Contenu modal pour mettre à jour le groupe",
"Create a mailbox": "Créer une boîte mail",
"Create a mailbox in {{name}} domain": "Créer une boîte mail dans le domaine {{name}}",
"Create a new group": "Créer un nouveau groupe",
"Create a new team": "Créer un nouveau groupe",
"Create new team card": "Carte créer un nouveau groupe",
"Create the team": "Créer le groupe",
@@ -33,16 +35,13 @@
"Created at": "Créé le",
"Delete the team": "Supprimer le groupe",
"Deleting the {{teamName}} team": "Suppression du groupe {{teamName}}",
"Emails": "Emails",
"Empty teams icon": "Icône de groupe vide",
"Enter the new name of the selected team": "Entrez le nouveau nom du groupe sélectionné",
"Equipes": "Equipes",
"Equipes Description": "Description des groupes",
"Equipes Logo": "Equipes Logo",
"Failed to add {{name}} in the team": "Impossible d'ajouter {{name}} au groupe",
"Failed to create the invitation for {{email}}": "Impossible de créer l'invitation pour {{email}}",
"Favorite": "Favoris",
"Find a member to add to the team": "Trouver un membre à ajouter au groupe",
"First name": "Prénom",
"Freedom Equality Fraternity Logo": "Logo Liberté Égalité Fraternité",
"Group details": "Détails du groupe",
"Groups": "Groupes",
@@ -51,19 +50,24 @@
"It seems that the page you are looking for does not exist or cannot be displayed correctly.": "Il semble que la page que vous cherchez n'existe pas ou ne puisse pas être affichée correctement.",
"Language": "Langue",
"Language Icon": "Icône de langue",
"Last Connecttion": "Dernière connexion",
"Last name": "Nom",
"Last update at": "Dernière modification le",
"List members card": "Carte liste des membres",
"Logout": "Se déconnecter",
"Mails": "Mails",
"Mail Domains": "Domaines de messagerie",
"Mail Domains icon": "Icône des domaines mail",
"Mailbox created!": "Boîte mail créée !",
"Mailbox creation form": "Formulaire de création de boîte mail",
"Mailboxes list": "Liste des boîtes mail",
"Main email address": "Adresse e-mail principale",
"Marianne Logo": "Logo Marianne",
"Member": "Membre",
"Member icon": "Icône de membre",
"Member {{name}} added to the team": "Membre {{name}} ajouté au groupe",
"My account": "Mon compte",
"Name the team": "Nommer le groupe",
"Names": "Noms",
"New name...": "Nouveau nom...",
"Open the mail domains panel": "Ouvrir le panneau des domaines de messagerie",
"Open the member options modal": "Ouvrir les options de membre dans la fenêtre modale",
"Open the modal to delete this member": "Ouvrir la fenêtre modale pour supprimer ce membre",
"Open the modal to update the role of this member": "Ouvrir la fenêtre modale pour mettre à jour le rôle de ce membre",
@@ -71,21 +75,30 @@
"Open the teams panel": "Ouvrir le panneau des groupes",
"Ouch !": "Ouch !",
"Owner": "Propriétaire",
"Phone number": "Numéro de téléphone",
"Please enter the first part of the email address, without including \"@\" in it": "Veuillez entrer la première partie de l'adresse e-mail, sans y inclure \"@\"",
"Please enter your first name": "Veuillez saisir votre prénom",
"Please enter your last name": "Veuillez saisir votre nom",
"Please enter your phone number": "Veuillez indiquer votre numéro de téléphone",
"Please enter your secondary email address": "Veuillez saisir votre adresse e-mail secondaire",
"Radio buttons to update the roles": "Boutons radio pour mettre à jour les rôles",
"Recent": "Récent",
"Recents": "Récents",
"Remove from group": "Retirer du groupe",
"Remove the member": "Supprimer le membre",
"Remove this member from the group": "Retirer ce membre du groupe",
"Roles": "Rôles",
"Search": "Rechercher",
"Search new members (name or email)": "Rechercher de nouveaux membres (nom ou email)",
"Secondary email address": "Adresse e-mail secondaire",
"Something bad happens, please refresh the page.": "Une erreur inattendue s'est produite, rechargez la page.",
"Something bad happens, please retry.": "Une erreur inattendue s'est produite, rechargez la page.",
"Something wrong happened, please refresh the page.": "Une erreur inattendue s'est produite, rechargez la page.",
"Sort domain names icon": "Trier l'icône des noms de domaine",
"Sort teams icon": "Icône trier les groupes",
"Sort the domain names by creation date ascendent": "Trier les documents par date de création ascendante",
"Sort the domain names by creation date descendent": "Trier les documents par date de création descendante",
"Sort the teams by creation date ascendent": "Trier les groupes par date de création ascendante",
"Sort the teams by creation date descendent": "Trier les groupes par date de création descendante",
"State": "État",
"Submit": "Valider",
"Team name": "Nom du groupe",
"Teams": "Équipes",
"Teams icon": "Icône de groupe",
"The member has been removed from the team": "Le membre a été supprimé de votre groupe",
"The role has been updated": "Le rôle a bien été mis à jour",
@@ -102,6 +115,7 @@
"You cannot remove other owner.": "Vous ne pouvez pas supprimer un autre propriétaire.",
"You cannot update the role of other owner.": "Vous ne pouvez pas mettre à jour les rôles d'autre propriétaire.",
"icon group": "icône groupe",
"mail domains list loading": "chargement de la liste des domaines de messagerie",
"{{count}} member_many": "{{count}} membres",
"{{count}} member_one": "{{count}} membre",
"{{count}} member_other": "{{count}} membres",

View File

@@ -16,7 +16,9 @@ test.describe('Members Create', () => {
await page.getByLabel('Add members to the team').click();
await expect(page.getByText('Add a member')).toBeVisible();
await expect(
page.getByRole('dialog').getByText('Add a member'),
).toBeVisible();
await expect(
page.getByLabel(/Find a member to add to the team/),
).toBeVisible();

View File

@@ -23,7 +23,7 @@ test.describe('Teams Create', () => {
await expect(
card.getByRole('heading', {
name: 'Name the team',
name: 'Create a new group',
level: 3,
}),
).toBeVisible();

View File

@@ -13,7 +13,7 @@ test.describe('Teams Panel', () => {
test('checks all the elements are visible', async ({ page }) => {
const panel = page.getByLabel('Teams panel').first();
await expect(panel.getByText('Recents')).toBeVisible();
await expect(panel.getByText('Groups')).toBeVisible();
await expect(
panel.getByRole('button', {