Merged PR 225: Implement translations

Implement translations with useContext in React
+Add events to allow changing the language in the app
+Refactor AppEvents
+Redesign vertical bars in elements
This commit is contained in:
Eric Nguyen 2022-11-04 10:58:06 +00:00
parent 60a3ead6aa
commit 505813d530
26 changed files with 527 additions and 160 deletions

View file

@ -1,6 +1,7 @@
import * as React from 'react';
import { FAST_BOOT } from '../../utils/default';
import { Loader } from '../Loader/Loader';
import { Text } from '../Text/Text';
interface IMainMenuProps {
newEditor: () => void
@ -82,8 +83,16 @@ export function MainMenu(props: IMainMenuProps): JSX.Element {
<button type="button" className='mainmenu-btn' onClick={() => {
setWindowState(WindowState.Loading);
props.newEditor();
}}>Start from scratch</button>
<button type="button" className='mainmenu-btn' onClick={() => setWindowState(WindowState.Load)}>Load a configuration file</button>
}}>
{Text({ textId: '@StartFromScratch' })}
</button>
<button
type="button"
className='mainmenu-btn'
onClick={() => setWindowState(WindowState.Load)}
>
{Text({ textId: '@LoadConfigFile' })}
</button>
</div>
);
}