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

Error if reserved message keys are mixed with unreserved keys #320

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

nicksnyder
Copy link
Owner

Makes it an error to provide data that mixes reserved message keys with unreserved ones. Previously the unreserved keys would be ignored, but this caused surprising behavior where if someone added a message that had a key with a reserved word, it would silently break the whole translation file. This change turns that situation into an error.

Resolves #209

Copy link

codecov bot commented Feb 4, 2024

Codecov Report

Attention: 6 lines in your changes are missing coverage. Please review.

Comparison is base (7c6508d) 82.81% compared to head (cc9ad86) 83.57%.

Files Patch % Lines
i18n/message.go 94.91% 1 Missing and 2 partials ⚠️
i18n/parse.go 78.57% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #320      +/-   ##
==========================================
+ Coverage   82.81%   83.57%   +0.75%     
==========================================
  Files          15       15              
  Lines        1740     1796      +56     
==========================================
+ Hits         1441     1501      +60     
+ Misses        234      231       -3     
+ Partials       65       64       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

translation file with key "id" leads LoadMessageFile to fail silently
1 participant