Skip to content

Commit c9d2967

Browse files
committedMar 6, 2024·
try to get rid of internal interpolationOverride handling for Trans component, fixes #1729
1 parent bb29742 commit c9d2967

File tree

4 files changed

+5
-14
lines changed

4 files changed

+5
-14
lines changed
 

‎CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
### 14.0.7
2+
3+
- try to get rid of internal interpolationOverride handling for Trans component, fixes [1729](https://github.com/i18next/react-i18next/issues/1729)
4+
15
### 14.0.6
26

37
- align context handling of Trans component with t function, fixes [1729](https://github.com/i18next/react-i18next/issues/1729)

‎react-i18next.js

-8
Original file line numberDiff line numberDiff line change
@@ -480,18 +480,10 @@
480480
...i18n.options.interpolation.defaultVariables
481481
};
482482
}
483-
const interpolationOverride = values || count !== undefined ? tOptions.interpolation : {
484-
interpolation: {
485-
...tOptions.interpolation,
486-
prefix: '#$?',
487-
suffix: '?$#'
488-
}
489-
};
490483
const combinedTOpts = {
491484
...tOptions,
492485
count,
493486
...values,
494-
...interpolationOverride,
495487
defaultValue,
496488
ns: namespaces
497489
};

‎react-i18next.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/TransWithoutContext.js

-5
Original file line numberDiff line numberDiff line change
@@ -351,15 +351,10 @@ export function Trans({
351351
? { ...values, ...i18n.options.interpolation.defaultVariables }
352352
: { ...i18n.options.interpolation.defaultVariables };
353353
}
354-
const interpolationOverride =
355-
values || count !== undefined
356-
? tOptions.interpolation
357-
: { interpolation: { ...tOptions.interpolation, prefix: '#$?', suffix: '?$#' } };
358354
const combinedTOpts = {
359355
...tOptions,
360356
count,
361357
...values,
362-
...interpolationOverride,
363358
defaultValue,
364359
ns: namespaces,
365360
};

0 commit comments

Comments
 (0)
Please sign in to comment.