fix(client): add key specific names to button translation properties (#55694)

This commit is contained in:
Lasse Jørgensen
2024-07-30 01:08:54 +02:00
committed by GitHub
parent 625138f340
commit ac94a0bf22
4 changed files with 18 additions and 18 deletions

View File

@@ -55,9 +55,9 @@
"reset-lesson": "Reset this lesson",
"run": "Run",
"run-test": "Run the Tests (Ctrl + Enter)",
"check-code": "Check Your Code (Ctrl + Enter)",
"check-code-2": "Check Your Code",
"check-code-3": "Check Your Code (Command + Enter)",
"check-code": "Check Your Code",
"check-code-ctrl": "Check Your Code (Ctrl + Enter)",
"check-code-cmd": "Check Your Code (Command + Enter)",
"reset": "Reset",
"reset-step": "Reset This Step",
"help": "Help",
@@ -72,11 +72,11 @@
"update-email": "Update my Email",
"verify-email": "Verify Email",
"submit-and-go": "Submit and go to next challenge",
"submit-and-go-2": "Submit and go to next challenge (Ctrl + Enter)",
"submit-and-go-3": "Submit and go to next challenge (Command + Enter)",
"submit-and-go-ctrl": "Submit and go to next challenge (Ctrl + Enter)",
"submit-and-go-cmd": "Submit and go to next challenge (Command + Enter)",
"go-to-next": "Go to next challenge",
"go-to-next-2": "Go to next challenge (Ctrl + Enter)",
"go-to-next-3": "Go to next challenge (Command + Enter)",
"go-to-next-ctrl": "Go to next challenge (Ctrl + Enter)",
"go-to-next-cmd": "Go to next challenge (Command + Enter)",
"ask-later": "Ask me later",
"start-coding": "Start coding!",
"go-to-settings": "Go to settings to claim your certification",

View File

@@ -289,14 +289,14 @@ const LowerJaw = ({
const checkButtonText = isDesktop
? isMacOS
? t('buttons.check-code-3')
: t('buttons.check-code')
: t('buttons.check-code-2');
? t('buttons.check-code-cmd')
: t('buttons.check-code-ctrl')
: t('buttons.check-code');
const submitButtonText = isDesktop
? isMacOS
? t('buttons.submit-and-go-3')
: t('buttons.submit-and-go-2')
? t('buttons.submit-and-go-cmd')
: t('buttons.submit-and-go-ctrl')
: t('buttons.submit-and-go');
const showSignInButton = !isSignedIn && challengeIsCompleted;

View File

@@ -176,12 +176,12 @@ class CompletionModal extends Component<
if (isDesktop) {
if (isMacOS) {
buttonText = isSignedIn
? t('buttons.submit-and-go-3')
: t('buttons.go-to-next-3');
? t('buttons.submit-and-go-cmd')
: t('buttons.go-to-next-cmd');
} else {
buttonText = isSignedIn
? t('buttons.submit-and-go-2')
: t('buttons.go-to-next-2');
? t('buttons.submit-and-go-ctrl')
: t('buttons.go-to-next-ctrl');
}
} else {
buttonText = isSignedIn

View File

@@ -72,9 +72,9 @@ test('User can reset challenge', async ({ page, isMobile, browserName }) => {
// are reset)
await page
.getByRole('button', {
// check-code-2 works on all browsers because it does not include Command
// check-code works on all browsers because it does not include Command
// or Ctrl
name: translations.buttons['check-code-2']
name: translations.buttons['check-code']
})
.click();