Skip to content

Commit

Permalink
i18next: typesafe translation keys
Browse files Browse the repository at this point in the history
  • Loading branch information
JGreenlee committed Jan 25, 2024
1 parent a5edfb7 commit 5f9c665
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package.cordovabuild.json
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
"fast-xml-parser": "^4.2.2",
"fs-extra": "^9.0.1",
"humanize-duration": "3.31.0",
"i18next": "^22.5.0",
"i18next": "^23.7.6",
"install": "^0.13.0",
"jquery": "^3.1.0",
"klaw-sync": "^6.0.0",
Expand All @@ -152,7 +152,7 @@
"react": "^18.2.*",
"react-chartjs-2": "^5.2.0",
"react-dom": "^18.2.*",
"react-i18next": "^12.3.1",
"react-i18next": "^13.5.0",
"react-native-paper": "^5.8.0",
"react-native-paper-dates": "^0.18.12",
"react-native-safe-area-context": "^4.6.3",
Expand Down
4 changes: 2 additions & 2 deletions package.serve.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"fast-xml-parser": "^4.2.2",
"fs-extra": "^9.0.1",
"humanize-duration": "3.31.0",
"i18next": "^22.5.0",
"i18next": "^23.7.6",
"install": "^0.13.0",
"jquery": "^3.1.0",
"klaw-sync": "^6.0.0",
Expand All @@ -82,7 +82,7 @@
"react": "^18.2.*",
"react-chartjs-2": "^5.2.0",
"react-dom": "^18.2.*",
"react-i18next": "^12.3.1",
"react-i18next": "^13.5.0",
"react-native-paper": "^5.8.0",
"react-native-paper-dates": "^0.18.12",
"react-native-safe-area-context": "^4.6.3",
Expand Down
7 changes: 7 additions & 0 deletions www/js/types/i18next.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import enJson from '../../i18n/en.json';

declare module 'i18next' {
interface CustomTypeOptions {
resources: { translation: typeof enJson };
}
}

0 comments on commit 5f9c665

Please sign in to comment.