diff --git a/template/package.json b/template/package.json index 3245edf1..2d1136e3 100644 --- a/template/package.json +++ b/template/package.json @@ -27,7 +27,7 @@ "@react-navigation/stack": "^6.3.20", "@reduxjs/toolkit": "^1.9.5", "axios": "^1.6.8", - "i18next": "^22.4.15", + "i18next": "^23.13.0", "intl-pluralrules": "^2.0.1", "react": "18.2.0", "react-i18next": "^12.3.1", diff --git a/template/src/locale/I18nConfig.ts b/template/src/locale/I18nConfig.ts index 21dd3a51..e3b8b00c 100644 --- a/template/src/locale/I18nConfig.ts +++ b/template/src/locale/I18nConfig.ts @@ -38,7 +38,9 @@ type TranslateStr, Key extends keyof O> = Key exte : never}` : Key -export const getString = (key: TranslateStr, params: object = {}) => - getI18n() ? getI18n().t(key, params) : '' +export const getString = ( + key: TranslateStr, + params: Record = {}, +) => (getI18n() ? getI18n().t(key, params) : '') export default i18n diff --git a/template/yarn.lock b/template/yarn.lock index fbca8c9a..ae467594 100644 --- a/template/yarn.lock +++ b/template/yarn.lock @@ -4892,12 +4892,12 @@ husky@^9.1.4: resolved "https://registry.yarnpkg.com/husky/-/husky-9.1.4.tgz#926fd19c18d345add5eab0a42b2b6d9a80259b34" integrity sha512-bho94YyReb4JV7LYWRWxZ/xr6TtOTt8cMfmQ39MQYJ7f/YE268s3GdghGwi+y4zAeqewE5zYLvuhV0M0ijsDEA== -i18next@^22.4.15: - version "22.5.1" - resolved "https://registry.yarnpkg.com/i18next/-/i18next-22.5.1.tgz#99df0b318741a506000c243429a7352e5f44d424" - integrity sha512-8TGPgM3pAD+VRsMtUMNknRz3kzqwp/gPALrWMsDnmC1mKqJwpWyooQRLMcbTwq8z8YwSmuj+ZYvc+xCuEpkssA== +i18next@^23.13.0: + version "23.13.0" + resolved "https://registry.yarnpkg.com/i18next/-/i18next-23.13.0.tgz#d3cba6c5611b9826ff988f97a4929638a91875f6" + integrity sha512-B+g0/KTKmN3+NeMKPljQxdrih6Q6lyDF5O2e/Ofd0JQsTLojJD/BSTTN04iw6OVc0yBiHeypu5hoBNV6ag44Zw== dependencies: - "@babel/runtime" "^7.20.6" + "@babel/runtime" "^7.23.2" iconv-lite@^0.4.24: version "0.4.24"