-
-
Notifications
You must be signed in to change notification settings - Fork 388
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: add tests for translations #833
feat: add tests for translations #833
Conversation
this is now ready for review |
(Very funny how the failing test is a good thing in this case 😁) One issue I have by looking at this though is that the test should not fail in the case of a full translation key being present in en.json but missing in other translations. This is expected and anticipated behavior for incomplete translations, and would mean that pytest would always fail unless each language was 100% translated. But the other 3 test scenarios listed are great things to test for |
fixed |
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.
Thank you for this! Looks all good to me - Normally I'd recommend using implicit concatenation for the f-strings to prevent the E501, but in this case it would look pretty odd and I'll give it a pass since it's just a test file.
I'll mark this with "blocked" while I fix the remaining issues discovered from the test here on the Weblate side, and then pull the changes as a part of #826
Actually, I'm noticing that these tests will only report a single issue per translation file at a time. Would it be straightforward to show all detected errors at once upfront? |
I'll merge this in the meantime since it's critical for v9.5.1, but it's something to consider for the future |
Summary
Test for the following problems:
(Note that these tests currently fail and that that is intentional as the translations are incorrect at the moment)
Tasks Completed