Add basic translation tests by rpkilby · Pull Request #5700 · encode/django-rest-framework (original) (raw)

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 andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation3 Commits1 Checks0 Files changed

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

rpkilby

Test for #5696.

This PR is based off of the commit that adds the dist build, which doesn't include the fix from #5696. Running the tests locally, this fails. However, Travis creates a merge commit from the current master, so this passes in CI.

@rpkilby

One thought - I'm not sure if translation tests will interact poorly to potential message changes and our use of transifex. As an example, let's say the exception message for the standard APIException is changed from "A server error occurred." to "An internal server error occurred.". This change would result in a test failure, since there's no corresponding french translation for the updated message.

Would we just need to temporarily fix the translation files, then ensure that transifex is updated as well?

carltongibson

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My thought for this was just to do some kind of find... on the dist build to make sure the file is there. ???

carltongibson

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should have this. I would have caught the issues with the 3.7.4-.7 releases.

If the test proves fragile we can adjust the strategy. (It should be fine though...)

pchiquet pushed a commit to pchiquet/django-rest-framework that referenced this pull request

Nov 17, 2020

2 participants

@rpkilby @carltongibson