mark most of the game text for translation

This commit is contained in:
Jon Eugster
2024-03-27 02:03:05 +01:00
parent 1a54edffd4
commit d60dc3fcb2
7 changed files with 26 additions and 13 deletions
+4 -1
View File
@@ -136,12 +136,15 @@ function DualEditorMain({ worldId, levelId, level, worldSize }: { worldId: strin
* If `showLeanStatement` is true, it will additionally display the lean code.
*/
function ExerciseStatement({ data, showLeanStatement = false }) {
let { t } = useTranslation()
const gameId = React.useContext(GameIdContext)
if (!(data?.descrText || data?.descrFormat)) { return <></> }
return <>
<div className="exercise-statement">
{data?.descrText &&
<Markdown>
{(data?.displayName ? `**Theorem** \`${data?.displayName}\`: ` : '') + data?.descrText}
{(data?.displayName ? `**Theorem** \`${data?.displayName}\`: ` : '') + t(data?.descrText, {ns: gameId})}
</Markdown>
}
{data?.descrFormat && showLeanStatement &&