Skip to content

Commit

Permalink
Merge pull request #4101 from GCTC-NTGC/bug/4056-name-labels
Browse files Browse the repository at this point in the history
Update language used for first_name, last_name labels
  • Loading branch information
mnigh authored Sep 29, 2022
2 parents d81acb6 + 68466e8 commit 97ea74d
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -347,10 +347,9 @@ export const AboutMeForm: React.FunctionComponent<AboutMeFormProps> = ({
name="firstName"
type="text"
label={intl.formatMessage({
defaultMessage: "First Name and Middle Name",
id: "g097KT",
description:
"Label for first and middle name field in About Me form",
defaultMessage: "First Name",
id: "btydLe",
description: "Label for first name field in About Me form",
})}
rules={{
required: intl.formatMessage(errorMessages.required),
Expand All @@ -361,8 +360,8 @@ export const AboutMeForm: React.FunctionComponent<AboutMeFormProps> = ({
name="lastName"
type="text"
label={intl.formatMessage({
defaultMessage: "Last Name(s)",
id: "rGNWy6",
defaultMessage: "Last Name",
id: "wrHSMx",
description: "Label for last name field in About Me form",
})}
rules={{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ describe("Create Account Form tests", () => {
});

expect(
screen.getByRole("textbox", { name: /given name/i }),
screen.getByRole("textbox", { name: /first name/i }),
).toBeInTheDocument();

expect(
screen.getByRole("textbox", { name: /surname/i }),
screen.getByRole("textbox", { name: /last name/i }),
).toBeInTheDocument();

expect(screen.getByRole("textbox", { name: /email/i })).toBeInTheDocument();
Expand Down Expand Up @@ -85,10 +85,10 @@ describe("Create Account Form tests", () => {
handleCreateAccount: mockSave,
});

const firstName = screen.getByRole("textbox", { name: /given name/i });
const firstName = screen.getByRole("textbox", { name: /first name/i });
fireEvent.change(firstName, { target: { value: "FirstName" } });

const lastName = screen.getByRole("textbox", { name: /surname/i });
const lastName = screen.getByRole("textbox", { name: /last name/i });
fireEvent.change(lastName, { target: { value: "LastName" } });

const email = screen.getByRole("textbox", { name: /email/i });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ export const CreateAccountForm: React.FunctionComponent<
name="firstName"
type="text"
label={intl.formatMessage({
defaultMessage: "Given name(s)",
id: "WpRB7Z",
defaultMessage: "First Name",
id: "IEkhMc",
description:
"Label displayed for the first name field in create account form.",
})}
Expand All @@ -178,8 +178,8 @@ export const CreateAccountForm: React.FunctionComponent<
name="lastName"
type="text"
label={intl.formatMessage({
defaultMessage: "Surname(s)",
id: "h9q52R",
defaultMessage: "Last Name",
id: "UxF291",
description:
"Label displayed for the last name field in create account form.",
})}
Expand Down
34 changes: 17 additions & 17 deletions frontend/talentsearch/src/js/lang/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -1022,10 +1022,6 @@
"defaultMessage": "Niveau 3 : Conseillers techniques",
"description": "title for IT-03 advisor dialog"
},
"WpRB7Z": {
"defaultMessage": "Prénom(s)",
"description": "Label displayed for the first name field in create account form."
},
"WyKJsK": {
"defaultMessage": "Erreur : échec de la mise à jour de l'expérience",
"description": "Message displayed to user after experience fails to be updated."
Expand Down Expand Up @@ -1188,10 +1184,6 @@
"fOCbBa": {
"defaultMessage": "Résultats pour les compétences fréquentes"
},
"g097KT": {
"defaultMessage": "Prénom et second prénom",
"description": "Label for first and middle name field in About Me form"
},
"gBWsuB": {
"defaultMessage": "Téléphone",
"description": "Label for telephone field in About Me form"
Expand All @@ -1216,10 +1208,6 @@
"defaultMessage": "Toute autre chose au sujet de cette expérience que vous aimeriez partager.",
"description": "Description blurb for additional information on Experience form"
},
"h9q52R": {
"defaultMessage": "Nom(s) de famille",
"description": "Label displayed for the last name field in create account form."
},
"hCgrxA": {
"defaultMessage": "Il y a deux types d'employés du TI-03 : ceux qui suivent un cheminement en gestion et les contributeurs individuels.",
"description": "IT-03 description precursor"
Expand Down Expand Up @@ -1376,10 +1364,6 @@
"defaultMessage": "Province ou territoire actuel",
"description": "Label for current province or territory field in About Me form"
},
"rGNWy6": {
"defaultMessage": "Nom(s) de famille",
"description": "Label for last name field in About Me form"
},
"rJMWiV": {
"defaultMessage": "<strong>Non</strong>, je ne suis pas un(e) employé(e) du gouvernement du Canada",
"description": "Label displayed for is not a government employee option"
Expand Down Expand Up @@ -1939,5 +1923,21 @@
"HHEQgM": {
"defaultMessage": "Sélectionnez une classification",
"description": "Placeholder for classification filter in search form."
},
"IEkhMc": {
"defaultMessage": "Prénom",
"description": "Label displayed for the first name field in create account form."
},
"btydLe": {
"defaultMessage": "Prénom",
"description": "Label for first name field in About Me form"
},
"UxF291": {
"defaultMessage": "Nom de famille",
"description": "Label displayed for the last name field in create account form."
},
"wrHSMx": {
"defaultMessage": "Nom de famille",
"description": "Label for last name field in About Me form"
}
}
}

0 comments on commit 97ea74d

Please sign in to comment.