@@ -11,6 +11,7 @@ import Two from 'two.js';
1111import { useTernaryDarkMode } from 'usehooks-ts' ;
1212import { Activity , useActivitiesSelectedActivity } from '../activities/hooks' ;
1313import { explorerCreateNewFile } from '../explorer/actions' ;
14+ import { useI18n } from './i18n' ;
1415import logoSvg from './logo.svg' ;
1516
1617const defaultRotation = - Math . PI / 9 ; // radians
@@ -65,6 +66,7 @@ type WelcomeProps = {
6566} ;
6667
6768const Welcome : React . FunctionComponent < WelcomeProps > = ( { isVisible } ) => {
69+ const i18n = useI18n ( ) ;
6870 const dispatch = useDispatch ( ) ;
6971 const stateRef = useRef < State > ( {
7072 rotation : defaultRotation ,
@@ -182,13 +184,13 @@ const Welcome: React.FunctionComponent<WelcomeProps> = ({ isVisible }) => {
182184 < div className = "logo" ref = { elementRef } > </ div >
183185 < div className = "shortcuts" >
184186 < dl >
185- < dt > Open existing project </ dt >
187+ < dt > { i18n . translate ( 'welcome.openProject' ) } </ dt >
186188 < dd >
187189 < Button icon = { < Document /> } onClick = { handleOpenExplorer } />
188190 </ dd >
189191 </ dl >
190192 < dl >
191- < dt > Open a new project </ dt >
193+ < dt > { i18n . translate ( 'welcome.newProject' ) } </ dt >
192194 < dd >
193195 < Button icon = { < Plus /> } onClick = { handleOpenNewProject } />
194196 </ dd >
0 commit comments