Skip to content

Commit

Permalink
update deps and try interpolation
Browse files Browse the repository at this point in the history
  • Loading branch information
adrai committed Dec 22, 2022
1 parent bbe4d52 commit 98b118b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions example/react-typescript/simple-multi-namespaces/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
"version": "1.0.0",
"private": true,
"dependencies": {
"i18next": "^22.0.4",
"i18next": "^22.4.6",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-i18next": "^12.0.0"
"react-i18next": "^12.1.1"
},
"devDependencies": {
"@types/react": "^18.0.25",
"@types/react-dom": "^18.0.8",
"@types/react": "^18.0.26",
"@types/react-dom": "^18.0.9",
"react-scripts": "5.0.1",
"typescript": "^4.8.4"
"typescript": "^4.9.4"
},
"scripts": {
"start": "react-scripts start",
Expand Down
2 changes: 1 addition & 1 deletion example/react-typescript/simple/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "1.0.0",
"private": true,
"dependencies": {
"i18next": "^22.4.3",
"i18next": "^22.4.6",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-i18next": "^12.1.1"
Expand Down
4 changes: 2 additions & 2 deletions example/react-typescript/simple/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import './i18n/config';
import { useTranslation } from 'react-i18next';

function App() {
const {t} = useTranslation();
const { t } = useTranslation();

return (
<div className="App">
<p>{t('title')}</p>
<p>{t('title', { name: 'John' })}</p>
<p>{t('description.part1')}</p>
<p>{t('description.part2')}</p>
</div>
Expand Down
4 changes: 2 additions & 2 deletions example/react-typescript/simple/src/i18n/en/translation.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"title": "Welcome to react using react-i18next fully type-safe",
"title": "Welcome {{name}}, to react using react-i18next fully type-safe",
"description": {
"part1": "This is a simple example.",
"part2": "😉"
}
}
}

0 comments on commit 98b118b

Please sign in to comment.