-
Notifications
You must be signed in to change notification settings - Fork 24
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
Provide human readable messages for backend messages #1058
Conversation
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.
There is no reason to add the new message to the PO files. When you follow the translation process the PO file will be updated with untranslated (empty) entries for new strings to translate. See "./update-po xx.po" step in https://github.com/zonemaster/zonemaster/blob/develop/docs/internal-documentation/maintenance/Instructions-for-translators.md#translation-steps
lib/Zonemaster/Backend/Translator.pm
Outdated
__x # BACKEND_TEST_AGENT:UNABLE_TO_FINISH_TEST | ||
"The test was unabled to finish.", @_; |
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.
Since the pseudo-level will be displayed to the users, I think it is worth considering its name. Is BACKEND_TEST_AGENT a good name for normal users? What is backend for them? Will we use this pseudo-level for other messages?
ZONEMASTER-TEST-AGENT (is hyphen a problem?) or AGENT or TEST-AGENT or TESTAGENT
And the message I suggest "Zonemaster was unable to start or finish the test" or "It was not possible to start or finish the test".
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.
There is alread the SYSTEM level. Is there any problem to add that message to that level? If not, then we do not have to create a new level.
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 reuse SYSTEM yes, and so then we can be extra explicit for the message tag (if we want to) since it will not be displayed to users, e.g. "BACKEND_TEST_AGENT_UNABLE_TO_FINISH_TEST". I'm suggesting to be extra explicit because I think SYSTEM messages come from Engine exclusively.
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 think it is fine to have "ugly" tags (there are more of them) since they are usually not shown.
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.
While I agree that SYSTEM would be better I don't think I will make that change in this PR as it would imply migrating the database to change the pseudo module of previous messages.
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 think we can live without migrating the database. I only means that those old tests, which probably are few and have short value, will be displayed differently. I think that is a better alternative than living with that strange pseudotag.
In general, I like the idea in this PR. |
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.
fine to me to go with the "UNSPECIFIED" or "SYSTEM" tag here
I guess you mean pseudo module. |
15de849
to
4fb00bc
Compare
I removed the update of the PO files from the PR. |
I think this PR would be better with SYSTEM as psedo-module, but I do not object it as-is. It is an improvement to provlde an understandable message to the users.
4fb00bc
to
56051b8
Compare
I think I will merge this PR as-is and open a new issue for a more long term solution. |
Purpose
Provide human readable message for backend generated messages.
Context
When a test times out or dies this is how the new result UI would present the error.
Changes
UNSPECIFIED
test case when no test case has been provided in message.UI with the changes:
![Screenshot 2022-11-24 at 13-31-32 samsung com · Zonemaster](https://user-images.githubusercontent.com/19394895/203785286-1cf0ab1e-8e87-492d-ad6d-996225e44294.png)
How to test this PR
For reference here is the ouput of this command on develop: