forked from jhipster/jhipster-lite
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use typed translation on react i18next on each context
- Loading branch information
1 parent
c3f0b9d
commit 774bc23
Showing
6 changed files
with
84 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
...ct/i18n/domain/ReactI18nModuleFactoryTest.shouldBuildI18nModule.HomePage.tsx.approved.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import './HomePage.css'; | ||
|
||
import JHipsterLiteNeonBlue from '@assets/JHipster-Lite-neon-blue.png'; | ||
import ReactLogo from '@assets/ReactLogo.png'; | ||
import { useTranslation } from 'react-i18next'; | ||
|
||
function HomePage() { | ||
const { t } = useTranslation(); | ||
|
||
return ( | ||
<div> | ||
<div id="app"> | ||
<img alt="React logo" src={ReactLogo} /> | ||
<br /> | ||
<img alt="JHipster logo" src={JHipsterLiteNeonBlue} /> | ||
<h1>React + TypeScript + Vite</h1> | ||
|
||
<p>{t('home.translationEnabled')}</p> | ||
<p> | ||
Recommended IDE setup: | ||
<a href="https://code.visualstudio.com/" target="_blank" rel="noopener noreferrer"> | ||
VSCode | ||
</a> | ||
</p> | ||
|
||
<p> | ||
<a href="https://vitejs.dev/guide/features.html" target="_blank" rel="noopener noreferrer"> | ||
Vite Documentation | ||
</a> | ||
<span> | </span> | ||
<a href="https://reactjs.org/docs/" target="_blank" rel="noopener noreferrer"> | ||
React Documentation | ||
</a> | ||
</p> | ||
|
||
<p> | ||
Edit <code>src/main/webapp/app/common/primary/app/App.tsx</code> to test hot module replacement. | ||
</p> | ||
</div> | ||
</div> | ||
); | ||
} | ||
|
||
export default HomePage; |