-
Notifications
You must be signed in to change notification settings - Fork 22
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
Remove some untranslatable characters from msgids #307
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.
It is great that you take this first step. Do you plan to create further PRs for the remaining of issue #194?
I have not yet tested, but will do that.
Could you do the same technical updates of the other PO files to relieve the translator from that?
All PO files are planned to be updated in v2022.2.2 so I suggest that this PR is merged after the release to let this PR handle any conflicts. Is that OK?
This is the idea. Or someone else could do it. I don't really mind. As long as we're moving forward on this.
This is totally fine for me (even though I don't expect any conflict with the updated msgid). |
I agree. I had this update in my mind.
Thanks.
Maybe not in msgid, but this PR adds empty msgstr that #303 adds as non-empty strings. And this PR updates POT-Creation-Date which is updated by #303 to another value. |
lib/Zonemaster/CLI.pm
Outdated
@@ -397,19 +419,19 @@ sub run { | |||
if ( $translator ) { | |||
my $header = q{}; | |||
if ( $self->time ) { | |||
$header .= sprintf "%7.2f ", $entry->timestamp; | |||
$header .= sprintf "%${field_width{seconds}}.2f ", $entry->timestamp; |
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.
Just a remark on style: you can have dynamic field widths as arguments to sprintf
. These calls to sprintf
could then be rewritten as:
sprintf "%*.2f ", field_width(seconds), $entry->timestamp
sprintf "%-*s ", field_width(level), translate_severity($entry->level);
sprintf "%*.2f %-*s ", field_width(seconds), $entry->timestamp, field_width(level), $entry->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.
Thanks for the tip. I've updated the code.
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.
LGTM, tested and works as described.
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.
Looks good to me too.
This is fine, but should not be merged until v2022.2.2 has been released and its branch merged into develop branch. |
See between lines 399 and 413
Or use hard coded default value if no header displayed.
Rebased and removed conflict with develop. Please re-review. |
I found and created #334 when release testing of this PR. |
I've successfully tested this as part of release testing for 2023.1. |
Purpose
Improve msgids consistency by removing unnecessary parts.
Context
Partially addresses #194
Left for an upcoming PR:
Changes
How to test this PR
Zonemaster-CLI behavior should not be altered. Running
zonemaster-cli --show-testcase --show-module --locale <locale> <domain>
with different locale should not alter the header output.