Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: i18next/react-i18next
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v14.0.6
Choose a base ref
...
head repository: i18next/react-i18next
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v14.0.7
Choose a head ref
  • 2 commits
  • 6 files changed
  • 1 contributor

Commits on Mar 6, 2024

  1. try to get rid of internal interpolationOverride handling for Trans c…

    …omponent, fixes #1729
    adrai committed Mar 6, 2024
    Copy the full SHA
    c9d2967 View commit details
  2. 14.0.7

    adrai committed Mar 6, 2024
    Copy the full SHA
    d95d697 View commit details
Showing with 8 additions and 17 deletions.
  1. +4 −0 CHANGELOG.md
  2. +2 −2 package-lock.json
  3. +1 −1 package.json
  4. +0 −8 react-i18next.js
  5. +1 −1 react-i18next.min.js
  6. +0 −5 src/TransWithoutContext.js
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### 14.0.7

- try to get rid of internal interpolationOverride handling for Trans component, fixes [1729](https://github.com/i18next/react-i18next/issues/1729)

### 14.0.6

- align context handling of Trans component with t function, fixes [1729](https://github.com/i18next/react-i18next/issues/1729)
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-i18next",
"version": "14.0.6",
"version": "14.0.7",
"description": "Internationalization for react done right. Using the i18next i18n ecosystem.",
"main": "dist/commonjs/index.js",
"types": "./index.d.mts",
8 changes: 0 additions & 8 deletions react-i18next.js
Original file line number Diff line number Diff line change
@@ -480,18 +480,10 @@
...i18n.options.interpolation.defaultVariables
};
}
const interpolationOverride = values || count !== undefined ? tOptions.interpolation : {
interpolation: {
...tOptions.interpolation,
prefix: '#$?',
suffix: '?$#'
}
};
const combinedTOpts = {
...tOptions,
count,
...values,
...interpolationOverride,
defaultValue,
ns: namespaces
};
2 changes: 1 addition & 1 deletion react-i18next.min.js

Large diffs are not rendered by default.

5 changes: 0 additions & 5 deletions src/TransWithoutContext.js
Original file line number Diff line number Diff line change
@@ -351,15 +351,10 @@ export function Trans({
? { ...values, ...i18n.options.interpolation.defaultVariables }
: { ...i18n.options.interpolation.defaultVariables };
}
const interpolationOverride =
values || count !== undefined
? tOptions.interpolation
: { interpolation: { ...tOptions.interpolation, prefix: '#$?', suffix: '?$#' } };
const combinedTOpts = {
...tOptions,
count,
...values,
...interpolationOverride,
defaultValue,
ns: namespaces,
};