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

Merged
merged 11 commits into from
Oct 13, 2024

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: Patch coverage is 92.18750% with 5 lines in your changes missing coverage. Please review.

Project coverage is 75.73%. Comparing base (0a3a706) to head (09888bc).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
i18n/message.go 94.33% 2 Missing and 1 partial ⚠️
i18n/parse.go 81.81% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #320      +/-   ##
==========================================
+ Coverage   74.90%   75.73%   +0.82%     
==========================================
  Files          20       20              
  Lines        1634     1677      +43     
==========================================
+ Hits         1224     1270      +46     
+ Misses        347      344       -3     
  Partials       63       63              

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

@nicksnyder nicksnyder marked this pull request as ready for review October 13, 2024 01:55
@nicksnyder nicksnyder merged commit af5be8c into main Oct 13, 2024
6 checks passed
@nicksnyder nicksnyder deleted the mixedkeyserror branch October 13, 2024 05:38
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