diff --git a/client/i18n/locales/english/translations.json b/client/i18n/locales/english/translations.json
index 9a69e69c50d..e0b8d0cbe0a 100644
--- a/client/i18n/locales/english/translations.json
+++ b/client/i18n/locales/english/translations.json
@@ -523,6 +523,7 @@
"instructions": "Instructions",
"notes": "Notes",
"preview": "Preview",
+ "terminal": "Terminal",
"editor": "Editor",
"interactive-editor": "Interactive Editor"
},
diff --git a/client/src/templates/Challenges/classic/action-row.tsx b/client/src/templates/Challenges/classic/action-row.tsx
index c14fe5d4aef..5d1631243bd 100644
--- a/client/src/templates/Challenges/classic/action-row.tsx
+++ b/client/src/templates/Challenges/classic/action-row.tsx
@@ -4,6 +4,7 @@ import React from 'react';
import { useTranslation } from 'react-i18next';
import store from 'store';
import { DailyCodingChallengeLanguages } from '../../../redux/prop-types';
+import { challengeTypes } from '../../../../../shared-dist/config/challenge-types';
import EditorTabs from './editor-tabs';
interface ClassicLayoutProps {
@@ -20,6 +21,7 @@ interface ClassicLayoutProps {
showInstructions: boolean;
showPreviewPane: boolean;
showPreviewPortal: boolean;
+ challengeType: number;
togglePane: (pane: string) => void;
hasInteractiveEditor?: never;
}
@@ -70,7 +72,8 @@ const ActionRow = (props: ActionRowProps): JSX.Element => {
showPreviewPortal,
isDailyCodingChallenge,
dailyCodingChallengeLanguage,
- setDailyCodingChallengeLanguage
+ setDailyCodingChallengeLanguage,
+ challengeType
} = props;
// sets screen reader text for the two preview buttons
@@ -95,6 +98,16 @@ const ActionRow = (props: ActionRowProps): JSX.Element => {
return previewBtnsSrText;
}
+ const isPythonChallenge =
+ challengeType === challengeTypes.python ||
+ challengeType === challengeTypes.multifilePythonCertProject ||
+ challengeType === challengeTypes.pyLab ||
+ challengeType === challengeTypes.dailyChallengePy;
+
+ const previewButtonText = isPythonChallenge
+ ? t('learn.editor-tabs.terminal')
+ : t('learn.editor-tabs.preview');
+
const handleLanguageChange = (language: DailyCodingChallengeLanguages) => {
store.set('dailyCodingChallengeLanguage', language);
setDailyCodingChallengeLanguage(language);
@@ -161,7 +174,7 @@ const ActionRow = (props: ActionRowProps): JSX.Element => {
onClick={() => togglePane('showPreviewPane')}
>
{getPreviewBtnsSrText().pane}
- {t('learn.editor-tabs.preview')}
+ {previewButtonText}