Skip to content
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

Update conflicting default translation message #236

Merged
merged 2 commits into from Oct 14, 2022

Conversation

hogansghost
Copy link
Contributor

This updates the terminal messaging when a conflicting default translation has a mismatch with the translation in the default language json file to include the default message. This is to make it easier to locate which translation is conflicting as there is a chance that there are numerous keys sharing the same name at a deeper level e.g.

"user": {
  "button": {
    "tooltip": "User tooltip"
  },
},
"admin": {
  "button": {
    "tooltip": "Admin tooltip"
  },
},
"placeholder": {
  "button": {
    "tooltip": "Placeholder tooltip"
  },
},

Before this would output that the key tooltip had a conflict, which in larger translation files becomes very difficult to track down.

Checklist

  • only relevant code is changed (make a diff before you submit the PR)
  • run tests npm run test
  • tests are included
  • commit message and code follows the Developer's Certification of Origin

Test coverage

Screenshot 2022-10-14 at 12 48 28

New output

Screenshot 2022-10-14 at 12 54 42

- Add the current default string to the log to make comparing / locating the conflicting
  key easier.
@codecov
Copy link

codecov bot commented Oct 14, 2022

Codecov Report

Base: 90.92% // Head: 90.92% // No change to project coverage 👍

Coverage data is based on head (bd30f50) compared to base (9e91b0c).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #236   +/-   ##
=======================================
  Coverage   90.92%   90.92%           
=======================================
  Files           6        6           
  Lines         562      562           
=======================================
  Hits          511      511           
  Misses         51       51           
Impacted Files Coverage Δ
src/parser.js 90.19% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@cheton cheton merged commit 0da3ed0 into i18next:master Oct 14, 2022
@hogansghost
Copy link
Contributor Author

🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants