diff --git a/client/public/locales/de/translation.json b/client/public/locales/de/translation.json index 3bd4074..8d90fda 100644 --- a/client/public/locales/de/translation.json +++ b/client/public/locales/de/translation.json @@ -1,6 +1,6 @@ { "Tactics": "Taktiken", - "Lean Game Server": "Lean-Spieleserver", + "Lean Game Server": "Lean-Spielserver", "

Game rules determine if it is allowed to skip levels and if the games runs checks to only allow unlocked tactics and theorems in proofs.

<1>Note: \"Unlocked\" tactics (or theorems) are determined by two things: The set of minimal tactics needed to solve a level, plus any tactics you unlocked in another level. That means if you unlock <1>simp in a level, you can use it henceforth in any level.

The options are:

": "

Die Spielregeln bestimmen ob es erlaubt ist, Levels zu überspringen und ob das Spiel überprüft welche Taktiken und Theoreme freigeschaltet sind und nur diese im Beweis akzeptiert.

<1>Bemerkung: \"Freigeschaltete\" Taktiken (und Theoreme) werden durch zwei Faktoren bestimmt: The Menge der Taktiken die minimal notwending sind um den Level zu lösen und dazu die Menge aller Taktiken, die in einem anderen Level freigeschaltet wurden. Das bedeutet wenn <1>simp in einem Level freigeschaltet wird, kann diese Taktik danach in jeglichen Levels verwendet werden.", "Game Rules": "Spielregeln", "levels": "Levels", @@ -24,8 +24,7 @@ "Editor mode": "", "Typewriter mode": "", "information, Impressum, privacy policy": "", - "Impressum": "", - "Preferences": "", + "Preferences": "Einstellungen", "Game Info & Credits": "", "Game Info": "", "Clear Progress": "", @@ -65,15 +64,15 @@ "new": "", "Not unlocked yet": "", "Not available in this level": "", - "A repository of learning games for the proof assistant <1>Lean (Lean 4) and its mathematical library <5>mathlib": "", + "A repository of learning games for the proof assistant <1>Lean (Lean 4) and its mathematical library <5>mathlib": "Eine Sammlung von Lernspielen für den Beweisassistenten <1>Lean (Lean 4) und dessen mathematische Bibliothek <5>mathlib", "No Games loaded. Use <1>http://localhost:3000/#/g/local/FOLDER 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 Issue about any problems you experience!": "", "<0>If you are considering writing your own game, you should use the <1>GameSkeleton Github Repo as a template and read <3>How to Create a Game.<1>You can directly load your games into the server and play it using the correct URL. The <1>instructions above 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.

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 Mathematics at Heinrich-Heine-Universität in Düsseldorf.": "", - "Prerequisites": "", - "Worlds": "", - "Levels": "", - "Language": "", + "Prerequisites": "Voraussetzungen", + "Worlds": "Welten", + "Levels": "Levels", + "Language": "Sprachen", "Development notes": "", "Adding new games": "", "Funding": "", @@ -82,9 +81,9 @@ "Delete": "", "Download & Delete": "", "Cancel": "", - "Layout": "", + "Layout": "Seitenlayout", "Always visible": "", - "Save my settings (in the browser store)": "", + "Save my settings (in the browser store)": "Einstellungen im Browser speichern.", "

Select a JSON file with the saved game progress to load your progress.

<1><0>Warning: This will delete your current game progress! Consider <2>downloading your current progress first!": "", "Upload Saved Progress": "", "Load selected file": "" diff --git a/client/src/components/app_bar.tsx b/client/src/components/app_bar.tsx index 2362da9..37d2a19 100644 --- a/client/src/components/app_bar.tsx +++ b/client/src/components/app_bar.tsx @@ -55,7 +55,7 @@ function MobileNavButtons({pageNumber, setPageNumber}: } /** button to toggle dropdown menu. */ -function MenuButton({navOpen, setNavOpen}) { +export function MenuButton({navOpen, setNavOpen}) { return @@ -127,16 +127,16 @@ function InputModeButton({setNavOpen, isDropdown}) { * * Note: Do not translate the word "Impressum"! German GDPR needs this. */ -function ImpressumButton({setNavOpen, toggleImpressum, isDropdown}) { +export function ImpressumButton({setNavOpen, toggleImpressum, isDropdown}) { const { t } = useTranslation() return } -function PreferencesButton({setNavOpen, togglePreferencesPopup}) { +export function PreferencesButton({setNavOpen, togglePreferencesPopup}) { const { t } = useTranslation() return - - - {/* Add more buttons for other languages as needed */} -

{t("Lean Game Server")}

@@ -185,7 +191,8 @@ function LandingPage() {

diff --git a/client/src/components/level.tsx b/client/src/components/level.tsx index 25cc7c4..3ca08ae 100644 --- a/client/src/components/level.tsx +++ b/client/src/components/level.tsx @@ -62,7 +62,6 @@ function Level() { const levelId = parseInt(params.levelId) const worldId = params.worldId - const {layout, isSavePreferences, language, setLayout, setIsSavePreferences, setLanguage} = React.useContext(PreferencesContext) const gameId = React.useContext(GameIdContext) const gameInfo = useGetGameInfoQuery({game: gameId}) @@ -84,7 +83,7 @@ function Level() { } {impressum ? : null} {info ? : null} - {preferencesPopup ? : null} + {preferencesPopup ? : null} } diff --git a/client/src/components/popup/preferences.tsx b/client/src/components/popup/preferences.tsx index 823e57e..9e77ec6 100644 --- a/client/src/components/popup/preferences.tsx +++ b/client/src/components/popup/preferences.tsx @@ -8,31 +8,28 @@ import lean4gameConfig from '../../config.json' import FormControlLabel from '@mui/material/FormControlLabel'; -import { IPreferencesContext } from "../infoview/context" +import { IPreferencesContext, PreferencesContext } from "../infoview/context" import ReactCountryFlag from 'react-country-flag'; import { useTranslation } from 'react-i18next'; -interface PreferencesPopupProps extends Omit { - handleClose: () => void -} - -export function PreferencesPopup({ layout, setLayout, isSavePreferences, language, setIsSavePreferences, handleClose, setLanguage }: PreferencesPopupProps) { +export function PreferencesPopup({ handleClose }: { handleClose: () => void }) { let { t } = useTranslation() + const {layout, isSavePreferences, language, setLayout, setIsSavePreferences, setLanguage} = React.useContext(PreferencesContext) const marks = [ { value: 0, - label: 'Mobile', + label: t('Mobile'), key: "mobile" }, { value: 1, - label: 'Auto', + label: t('Auto'), key: "auto" }, { value: 2, - label: 'Desktop', + label: t('Desktop'), key: "desktop" }, ]; diff --git a/client/src/components/welcome.tsx b/client/src/components/welcome.tsx index b2a8d17..676e278 100644 --- a/client/src/components/welcome.tsx +++ b/client/src/components/welcome.tsx @@ -135,7 +135,7 @@ function Welcome() { {eraseMenu? : null} {uploadMenu? : null} {info ? : null} - {preferencesPopup ? : null} + {preferencesPopup ? : null} } diff --git a/client/src/css/landing_page.css b/client/src/css/landing_page.css index 71d8526..d6b938b 100644 --- a/client/src/css/landing_page.css +++ b/client/src/css/landing_page.css @@ -36,6 +36,13 @@ a { padding-bottom: 80px; } +.landing-page-nav { + position: relative; +} + +#menu-btn { + background-color: unset; +} @media screen and (max-width: 440px) { .game-list { diff --git a/client/src/index.tsx b/client/src/index.tsx index c36cd8d..5748fb9 100644 --- a/client/src/index.tsx +++ b/client/src/index.tsx @@ -21,7 +21,14 @@ let root_object: RouteObject = single_game ? { loader: () => redirect("/g/local/game") } : { path: "/", - element: , + element: , + errorElement: , + children: [ + { + path: "/", + element: , + } + ] } const router = createHashRouter([