Skip to content

Commit ac94a0b

Browse files
authored
fix(client): add key specific names to button translation properties (freeCodeCamp#55694)
1 parent 625138f commit ac94a0b

File tree

4 files changed

+18
-18
lines changed

4 files changed

+18
-18
lines changed

client/i18n/locales/english/translations.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@
5555
"reset-lesson": "Reset this lesson",
5656
"run": "Run",
5757
"run-test": "Run the Tests (Ctrl + Enter)",
58-
"check-code": "Check Your Code (Ctrl + Enter)",
59-
"check-code-2": "Check Your Code",
60-
"check-code-3": "Check Your Code (Command + Enter)",
58+
"check-code": "Check Your Code",
59+
"check-code-ctrl": "Check Your Code (Ctrl + Enter)",
60+
"check-code-cmd": "Check Your Code (Command + Enter)",
6161
"reset": "Reset",
6262
"reset-step": "Reset This Step",
6363
"help": "Help",
@@ -72,11 +72,11 @@
7272
"update-email": "Update my Email",
7373
"verify-email": "Verify Email",
7474
"submit-and-go": "Submit and go to next challenge",
75-
"submit-and-go-2": "Submit and go to next challenge (Ctrl + Enter)",
76-
"submit-and-go-3": "Submit and go to next challenge (Command + Enter)",
75+
"submit-and-go-ctrl": "Submit and go to next challenge (Ctrl + Enter)",
76+
"submit-and-go-cmd": "Submit and go to next challenge (Command + Enter)",
7777
"go-to-next": "Go to next challenge",
78-
"go-to-next-2": "Go to next challenge (Ctrl + Enter)",
79-
"go-to-next-3": "Go to next challenge (Command + Enter)",
78+
"go-to-next-ctrl": "Go to next challenge (Ctrl + Enter)",
79+
"go-to-next-cmd": "Go to next challenge (Command + Enter)",
8080
"ask-later": "Ask me later",
8181
"start-coding": "Start coding!",
8282
"go-to-settings": "Go to settings to claim your certification",

client/src/templates/Challenges/classic/lower-jaw.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -289,14 +289,14 @@ const LowerJaw = ({
289289

290290
const checkButtonText = isDesktop
291291
? isMacOS
292-
? t('buttons.check-code-3')
293-
: t('buttons.check-code')
294-
: t('buttons.check-code-2');
292+
? t('buttons.check-code-cmd')
293+
: t('buttons.check-code-ctrl')
294+
: t('buttons.check-code');
295295

296296
const submitButtonText = isDesktop
297297
? isMacOS
298-
? t('buttons.submit-and-go-3')
299-
: t('buttons.submit-and-go-2')
298+
? t('buttons.submit-and-go-cmd')
299+
: t('buttons.submit-and-go-ctrl')
300300
: t('buttons.submit-and-go');
301301

302302
const showSignInButton = !isSignedIn && challengeIsCompleted;

client/src/templates/Challenges/components/completion-modal.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,12 +176,12 @@ class CompletionModal extends Component<
176176
if (isDesktop) {
177177
if (isMacOS) {
178178
buttonText = isSignedIn
179-
? t('buttons.submit-and-go-3')
180-
: t('buttons.go-to-next-3');
179+
? t('buttons.submit-and-go-cmd')
180+
: t('buttons.go-to-next-cmd');
181181
} else {
182182
buttonText = isSignedIn
183-
? t('buttons.submit-and-go-2')
184-
: t('buttons.go-to-next-2');
183+
? t('buttons.submit-and-go-ctrl')
184+
: t('buttons.go-to-next-ctrl');
185185
}
186186
} else {
187187
buttonText = isSignedIn

e2e/challenge-reset-modal.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ test('User can reset challenge', async ({ page, isMobile, browserName }) => {
7272
// are reset)
7373
await page
7474
.getByRole('button', {
75-
// check-code-2 works on all browsers because it does not include Command
75+
// check-code works on all browsers because it does not include Command
7676
// or Ctrl
77-
name: translations.buttons['check-code-2']
77+
name: translations.buttons['check-code']
7878
})
7979
.click();
8080

0 commit comments

Comments
 (0)