From bb463dfefcf128592519d129cce57cf4171098d8 Mon Sep 17 00:00:00 2001 From: yoko <25644062+sidemt@users.noreply.github.com> Date: Fri, 14 Jun 2024 14:37:47 +0900 Subject: [PATCH] fix(client): make example code label translatable (#55174) --- client/i18n/locales/english/translations.json | 1 + client/src/templates/Challenges/utils/index.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/client/i18n/locales/english/translations.json b/client/i18n/locales/english/translations.json index 40485586337..342d309482e 100644 --- a/client/i18n/locales/english/translations.json +++ b/client/i18n/locales/english/translations.json @@ -384,6 +384,7 @@ "submit-and-go": "Submit and go to my next challenge", "congratulations": "Congratulations, your code passes. Submit your code to continue.", "i-completed": "I've completed this challenge", + "example-code": "Example Code", "test-output": "Your test output will go here", "running-tests": "// running tests", "tests-completed": "// tests completed", diff --git a/client/src/templates/Challenges/utils/index.ts b/client/src/templates/Challenges/utils/index.ts index 925a28a0670..85fe17e81b6 100644 --- a/client/src/templates/Challenges/utils/index.ts +++ b/client/src/templates/Challenges/utils/index.ts @@ -96,7 +96,7 @@ export function makePrismCollapsible( const summary = document.createElement('summary'); summary.classList.add('code-details-summary'); - summary.innerHTML = 'Example Code'; + summary.innerHTML = i18next.t('learn.example-code'); details.appendChild(summary); details.appendChild(preElem.cloneNode(true));