diff --git a/client/i18next-scanner.config.cjs b/client/i18next-scanner.config.cjs
index de63e15..268e75f 100644
--- a/client/i18next-scanner.config.cjs
+++ b/client/i18next-scanner.config.cjs
@@ -99,7 +99,7 @@ module.exports = {
},
lngs: ['en','de'],
ns: [],
- defaultLng: 'en-GB',
+ defaultLng: 'en',
defaultNs: 'translation',
defaultValue: (lng, ns, key) => {
if (lng === 'en') {
@@ -139,15 +139,9 @@ module.exports = {
'use strict';
const parser = this.parser;
- let count = 0;
-
parser.parseTransFromString(outputText);
parser.parseFuncFromString(outputText);
- if (count > 0) {
- console.log(`[i18next-scanner] transform: count=${chalk.cyan(count)}, file=${chalk.yellow(JSON.stringify(file.relative))}`);
- }
-
done();
}
),
diff --git a/client/public/locales/de/translation.json b/client/public/locales/de/translation.json
index 24fb915..3bd4074 100644
--- a/client/public/locales/de/translation.json
+++ b/client/public/locales/de/translation.json
@@ -38,5 +38,54 @@
"back to games selection": "",
"close inventory": "",
"show inventory": "",
- "World": ""
+ "World": "",
+ "Show more help!": "",
+ "Goal": "",
+ "Current Goal": "",
+ "Objects": "",
+ "Assumptions": "",
+ "Further Goals": "",
+ "No Goals": "",
+ "Loading goal…": "",
+ "Click somewhere in the Lean file to enable the infoview.": "",
+ "Waiting for Lean server to start…": "",
+ "Level completed! 🎉": "",
+ "Level completed with warnings 🎭": "",
+ "Retry proof from here": "",
+ "Active Goal": "",
+ "Crashed! Go to editor mode and fix your proof! Last server response:": "",
+ "Line": "",
+ "Character": "",
+ "Loading messages…": "",
+ "Execute": "",
+ "Definitions": "",
+ "Theorems": "",
+ "locked": "",
+ "disabled": "",
+ "new": "",
+ "Not unlocked yet": "",
+ "Not available in this level": "",
+ "A repository of learning games for the proof assistant <1>Lean1> (Lean 4) and its mathematical library <5>mathlib5>": "",
+ "No Games loaded. Use <1>http://localhost:3000/#/g/local/FOLDER1> to open a game directly from a local folder.": "",
+ "
As this server runs lean on our university machines, it has a limited capacity. Our current estimate is about 70 simultaneous games. We hope to address and test this limitation better in the future.
<1>Most aspects of the games and the infrastructure are still in development. Feel free to file a <1>GitHub Issue1> about any problems you experience!1>": "",
+ "<0>If you are considering writing your own game, you should use the <1>GameSkeleton Github Repo1> as a template and read <3>How to Create a Game3>.0><1>You can directly load your games into the server and play it using the correct URL. The <1>instructions above1> also explain the details for how to load your game to the server. We'd like to encourage you to contact us if you have any questions.1>
Featured games on this page are added manually. Please get in contact and we-ll happily add yours.
": "",
+ "This server has been developed as part of the project <1>ADAM : Anticipating the Digital Age of Mathematics1> at Heinrich-Heine-Universität in Düsseldorf.": "",
+ "Prerequisites": "",
+ "Worlds": "",
+ "Levels": "",
+ "Language": "",
+ "Development notes": "",
+ "Adding new games": "",
+ "Funding": "",
+ "
Do you want to delete your saved progress irreversibly?
(This deletes your proofs and your collected inventory. Saves from other games are not deleted.)
Select a JSON file with the saved game progress to load your progress.
<1><0>Warning:0> This will delete your current game progress! Consider <2>downloading your current progress2> first!1>": "",
+ "Upload Saved Progress": "",
+ "Load selected file": ""
}
diff --git a/client/public/locales/en/translation.json b/client/public/locales/en/translation.json
index 85cb20f..7ecf0f2 100644
--- a/client/public/locales/en/translation.json
+++ b/client/public/locales/en/translation.json
@@ -38,5 +38,54 @@
"back to games selection": "back to games selection",
"close inventory": "close inventory",
"show inventory": "show inventory",
- "World": "World"
+ "World": "World",
+ "Show more help!": "Show more help!",
+ "Goal": "Goal",
+ "Current Goal": "Current Goal",
+ "Objects": "Objects",
+ "Assumptions": "Assumptions",
+ "Further Goals": "Further Goals",
+ "No Goals": "No Goals",
+ "Loading goal…": "Loading goal…",
+ "Click somewhere in the Lean file to enable the infoview.": "Click somewhere in the Lean file to enable the infoview.",
+ "Waiting for Lean server to start…": "Waiting for Lean server to start…",
+ "Level completed! 🎉": "Level completed! 🎉",
+ "Level completed with warnings 🎭": "Level completed with warnings 🎭",
+ "Retry proof from here": "Retry proof from here",
+ "Active Goal": "Active Goal",
+ "Crashed! Go to editor mode and fix your proof! Last server response:": "Crashed! Go to editor mode and fix your proof! Last server response:",
+ "Line": "Line",
+ "Character": "Character",
+ "Loading messages…": "Loading messages…",
+ "Execute": "Execute",
+ "Definitions": "Definitions",
+ "Theorems": "Theorems",
+ "locked": "locked",
+ "disabled": "disabled",
+ "new": "new",
+ "Not unlocked yet": "Not unlocked yet",
+ "Not available in this level": "Not available in this level",
+ "A repository of learning games for the proof assistant <1>Lean1> (Lean 4) and its mathematical library <5>mathlib5>": "A repository of learning games for the proof assistant <1>Lean1> (Lean 4) and its mathematical library <5>mathlib5>",
+ "No Games loaded. Use <1>http://localhost:3000/#/g/local/FOLDER1> to open a game directly from a local folder.": "No Games loaded. Use <1>http://localhost:3000/#/g/local/FOLDER1> to open a game directly from a local folder.",
+ "
As this server runs lean on our university machines, it has a limited capacity. Our current estimate is about 70 simultaneous games. We hope to address and test this limitation better in the future.
<1>Most aspects of the games and the infrastructure are still in development. Feel free to file a <1>GitHub Issue1> about any problems you experience!1>": "
As this server runs lean on our university machines, it has a limited capacity. Our current estimate is about 70 simultaneous games. We hope to address and test this limitation better in the future.
<1>Most aspects of the games and the infrastructure are still in development. Feel free to file a <1>GitHub Issue1> about any problems you experience!1>",
+ "<0>If you are considering writing your own game, you should use the <1>GameSkeleton Github Repo1> as a template and read <3>How to Create a Game3>.0><1>You can directly load your games into the server and play it using the correct URL. The <1>instructions above1> also explain the details for how to load your game to the server. We'd like to encourage you to contact us if you have any questions.1>
Featured games on this page are added manually. Please get in contact and we-ll happily add yours.
": "<0>If you are considering writing your own game, you should use the <1>GameSkeleton Github Repo1> as a template and read <3>How to Create a Game3>.0><1>You can directly load your games into the server and play it using the correct URL. The <1>instructions above1> also explain the details for how to load your game to the server. We'd like to encourage you to contact us if you have any questions.1>
Featured games on this page are added manually. Please get in contact and we-ll happily add yours.
",
+ "This server has been developed as part of the project <1>ADAM : Anticipating the Digital Age of Mathematics1> at Heinrich-Heine-Universität in Düsseldorf.": "This server has been developed as part of the project <1>ADAM : Anticipating the Digital Age of Mathematics1> at Heinrich-Heine-Universität in Düsseldorf.",
+ "Prerequisites": "Prerequisites",
+ "Worlds": "Worlds",
+ "Levels": "Levels",
+ "Language": "Language",
+ "Development notes": "Development notes",
+ "Adding new games": "Adding new games",
+ "Funding": "Funding",
+ "
Do you want to delete your saved progress irreversibly?
(This deletes your proofs and your collected inventory. Saves from other games are not deleted.)
": "
Do you want to delete your saved progress irreversibly?
(This deletes your proofs and your collected inventory. Saves from other games are not deleted.)
",
+ "Delete Progress?": "Delete Progress?",
+ "Delete": "Delete",
+ "Download & Delete": "Download & Delete",
+ "Cancel": "Cancel",
+ "Layout": "Layout",
+ "Always visible": "Always visible",
+ "Save my settings (in the browser store)": "Save my settings (in the browser store)",
+ "
Select a JSON file with the saved game progress to load your progress.
<1><0>Warning:0> This will delete your current game progress! Consider <2>downloading your current progress2> first!1>": "
Select a JSON file with the saved game progress to load your progress.
<1><0>Warning:0> This will delete your current game progress! Consider <2>downloading your current progress2> first!1>",
+ "Upload Saved Progress": "Upload Saved Progress",
+ "Load selected file": "Load selected file"
}
diff --git a/client/src/components/app_bar.tsx b/client/src/components/app_bar.tsx
index b65e12e..2362da9 100644
--- a/client/src/components/app_bar.tsx
+++ b/client/src/components/app_bar.tsx
@@ -13,13 +13,14 @@ import { changedOpenedIntro, selectCompleted, selectDifficulty, selectProgress }
import { useAppDispatch, useAppSelector } from '../hooks'
import { Button } from './button'
import { downloadProgress } from './popup/erase'
-import { t } from 'i18next'
+import { useTranslation } from 'react-i18next'
/** navigation buttons for mobile welcome page to switch between intro/tree/inventory. */
function MobileNavButtons({pageNumber, setPageNumber}:
{ pageNumber: number,
setPageNumber: any}) {
const gameId = React.useContext(GameIdContext)
+ const { t } = useTranslation()
const dispatch = useAppDispatch()
// if `prevText` or `prevIcon` is set, show a button to go back
@@ -64,6 +65,7 @@ function MenuButton({navOpen, setNavOpen}) {
* for the last level, this button turns into a button going back to the welcome page.
*/
function NextButton({worldSize, difficulty, completed, setNavOpen}) {
+ const { t } = useTranslation()
const gameId = React.useContext(GameIdContext)
const {worldId, levelId} = React.useContext(WorldLevelIdContext)
return (levelId < worldSize ?
@@ -84,6 +86,7 @@ function NextButton({worldSize, difficulty, completed, setNavOpen}) {
* only renders if the current level id is > 0.
*/
function PreviousButton({setNavOpen}) {
+ const { t } = useTranslation()
const gameId = React.useContext(GameIdContext)
const {worldId, levelId} = React.useContext(WorldLevelIdContext)
return (levelId > 0 && <>
@@ -98,6 +101,7 @@ function PreviousButton({setNavOpen}) {
/** button to toggle between editor and typewriter */
function InputModeButton({setNavOpen, isDropdown}) {
+ const { t } = useTranslation()
const {levelId} = React.useContext(WorldLevelIdContext)
const {typewriterMode, setTypewriterMode, lockEditorMode} = React.useContext(InputModeContext)
@@ -124,6 +128,7 @@ function InputModeButton({setNavOpen, isDropdown}) {
* Note: Do not translate the word "Impressum"! German GDPR needs this.
*/
function ImpressumButton({setNavOpen, toggleImpressum, isDropdown}) {
+ const { t } = useTranslation()
return