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(client): Log a message if some change could not be saved due to missing certificate #4301
FEAT(client): Log a message if some change could not be saved due to missing certificate #4301
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.
I think the logging of the error should be done via a function inside MainWindow
in order to reduce code-duplication.
In order for the translation to work I'd suggest something like
void MainWindow::logChangeNotPermanent(QString &actionName) const {
msgBox(WObject::tr("%1 could not be saved permanently and is lost on restart because %2 does not have a certificate.").arg(actionName).arg(Log::formatClientUser(p, Log::Target)));
}
And then translating the action strings separately when calling this function.
An additional point is also the use of msgBox
. Afaik we normally don't use that for logging (non-critical) errors. Instead we use the log
object to log these errors to the console...
Furthermore it'd be nice if you could use braces for all if
statements you added. I know lots of code doesn't use it but we're aiming at improving the code base and that'll only work gradually :)
I assume you refer to the member of class LogMessage and not console as in |
yes |
I have added the changes you requested |
Log a message if a change like local muting of a user could not be saved because this user does not have a certificate.
Updating 'mumble_en.ts'... Found 1880 source text(s) (5 new and 1875 already existing)
Thank your for your contribution! :D |
Log a message if a change like local muting of a user could not be saved because this user does not have a certificate.
The displayed message is: