diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f91ccc5..50be19f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 23.7.13 + +- types: optimise ParseTReturn [2095](https://github.com/i18next/i18next/pull/2095) + ## 23.7.12 - types: fix for older ts version (context validation only for TS 5) diff --git a/examples/typescript/i18n/en/ns1.json b/examples/typescript/i18n/en/ns1.json index 8f94a3a8..43d967d1 100644 --- a/examples/typescript/i18n/en/ns1.json +++ b/examples/typescript/i18n/en/ns1.json @@ -7,5 +7,7 @@ "inter": "interpolated {{val}}", "some": "ctx", "some_me": "ctx2", - "some_1234": "ctx3" + "some_1234": "ctx3", + "pl_one": "sing", + "pl_other": "{{count}} plur" } diff --git a/examples/typescript/i18n/en/ns1.ts b/examples/typescript/i18n/en/ns1.ts index c98e8271..e3d93f3d 100644 --- a/examples/typescript/i18n/en/ns1.ts +++ b/examples/typescript/i18n/en/ns1.ts @@ -8,6 +8,8 @@ const ns1 = { some: 'ctx', some_me: 'ctx2', some_1234: 'ctx3', + pl_one: 'sing', + pl_other: '{{count}} plur', } as const; export default ns1; diff --git a/examples/typescript/index.ts b/examples/typescript/index.ts index 405acf02..c759b47a 100644 --- a/examples/typescript/index.ts +++ b/examples/typescript/index.ts @@ -12,6 +12,9 @@ console.log(i18next.t('some')); console.log(i18next.t('some', { context: 'me' })); console.log(i18next.t('some', { context: '1234' })); +console.log(i18next.t('pl', { count: 1 })); +console.log(i18next.t('pl', { count: 2 })); + const l = i18next.language; // interpolation diff --git a/examples/typescript/package.json b/examples/typescript/package.json index 708261fe..bb4de8ef 100644 --- a/examples/typescript/package.json +++ b/examples/typescript/package.json @@ -11,6 +11,6 @@ "typescript": "4.9.3" }, "dependencies": { - "i18next": "23.7.11" + "i18next": "23.7.13" } }