-
Notifications
You must be signed in to change notification settings - Fork 0
Add the title translation for the email that reports failed queries #30
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
base: epic/ui-translation
Are you sure you want to change the base?
Add the title translation for the email that reports failed queries #30
Conversation
@imenattatra which report ist it exactly ? This report would generally never go to the client. |
it is the one we receive on gmail with title "Redash failed to execute X of your scheduled queries"... yeah it only goes to engineering |
we might make our life more complicated if we translate that one right ? on the other hand, I am not sure how we want to do this since we are also looking at merge with Redash redash. What do you think ? metr team would prefer this email in english |
@@ -88,7 +91,8 @@ def test_counts_failures_for_each_reason(self): | |||
f3 = next(f for f in failures if f["failure_reason"] == "I'm a totally different query") | |||
self.assertEqual(1, f3["failure_count"]) | |||
|
|||
def test_shows_latest_failure_time(self): | |||
@mock.patch("redash.tasks.failure_report._", side_effect=lambda x: x) |
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.
It's not clear to me why we need this patch here. If the user doesn't have the translation configured, won't flask_babel
already return the same string?
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.
I gave it some time, I don't know why it fails finding the correct translation files... which does not happen when running the class test separately, I tried few things ... I could not manage to make it work yet but will keep it aside and return to it later
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.
Maybe it's a missing configuration when running the tests. When you come to it later you can look over a way to set the directory manually when running the tests by changing the conftest.py
What type of PR is this?
the email that reports failed queries has its detail translated but its title has been missed , in this PR I add its translation and fix related tests.
I did not test this manually on staging since i will need to schedule emails that report failed queries and i don't want to invest a lot of time on it but it is a small change and it should work
Related to the translation project : https://github.com/metr-systems/backlog/issues/3476
How is this tested?