i18next-parser
i18next-parser copied to clipboard
Fix JSX key attribute clobbering detected value
Why am I submitting this PR
React components have a protected attribute "key" which can seemingly clobber the detected/parsed i18n key due to a naming conflict.
Does it fix an existing ticket?
Yes #1038
Checklist
- [X] only relevant code is changed (make a diff before you submit the PR)
- [X] tests are included and pass:
yarn test(see details here) - [X] documentation is changed or added
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 95.35%. Comparing base (
168c8d5) to head (a95a76b). Report is 57 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #1042 +/- ##
==========================================
- Coverage 95.40% 95.35% -0.05%
==========================================
Files 11 10 -1
Lines 1937 1918 -19
==========================================
- Hits 1848 1829 -19
Misses 89 89
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@comp615 I have mixed feeling about this as some people might be relying on the key attribute. I'd prefer a fix that ignores the key attribute only if the i18nKey one is present. Can you update the PR?