-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(i18n): allow custom interpolation options for i18n #4727
Conversation
Allow for specifying custom interpolation options for i18n. This is useful for custom interpolation patterns, such as `{{` and `}}`. Tests added, and scoped to the i18n module. Closes logaretm#4726
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4727 +/- ##
==========================================
+ Coverage 89.87% 89.89% +0.01%
==========================================
Files 93 93
Lines 7676 7709 +33
Branches 1360 1362 +2
==========================================
+ Hits 6899 6930 +31
- Misses 770 772 +2
Partials 7 7 ☔ View full report in Codecov by Sentry. |
If accepted I'll update the docs as well |
@logaretm - is there something I can do to help with making this a reality? If there's some reason you would not want this, please let me know why so I can understand more. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay, Thank you @zleight1, This looks alright to me. I have no concerns here other than the test file seems to have changed significantly. I would have assumed this would need to add a test case or two but the changes here are too significant with some tests altered, if possible lets keep everything as-is and only add the needed test cases for this interpolation feature.
Once that is fixed we can merge this right away.
Unwrapped the tests from the describe blocks, so the diff is cleaner. Prefixed new tests names so they don't collide, also in commented section with begin/end. logaretm#4726
Updated this as well, let me know if it needs anything else. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing, thank you for addressing my nitpicks 😛
Thanks a lot for this, merging right away and will tag a release once another PR is merged.
I'm all for the nitpicks, thanks for the guidance! |
Allow for specifying custom interpolation options for i18n. This is useful for custom interpolation patterns, such as
{{
and}}
. Tests added, and scoped to the i18n module.Closes #4726
🔎 Overview
Adds the ability to use custom interpolation options, such as prefix and suffix.
This allows the library to comply with the default i18next standard.
🤓 Code snippets/examples (if applicable)
✔ Issues affected
closes #4726