-
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
Fix table layout #335
Fix table layout #335
Conversation
I assumed that the milestone for this PR should be v2023.1. |
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.
Is this really how it should look like?
# zonemaster-cli --locale es_ES.UTF-8 lame.dufberg.se
Segundos Nivel Mensaje
======== ========= =======
23.29 CRÍTICO There is no working name server for "lame.dufberg.se" so it is unreachable.
23.29 ADVERTENCIA Name server "ns1.lame.dufberg.se/159.253.30.207" does not respond to an SOA query.
23.29 ADVERTENCIA Name server "ns2.lame.dufberg.se/188.126.83.221" does not respond to an SOA query.
23.29 CRÍTICO No hay suficiente información sobre lame.dufberg.se que permita ejecutar las pruebas.
Not exactly. The output should be (manually edited):
It seems the |
Perl sprintf does not handle unicode. To avoid misalignment when dealing with translated severity strings, the previous sprintf call is replaced with a manual concatenation of the string and the remaining spaces.
I found |
My objection above was based on an error on my side. The issue that @PNAX found with At least that works as expected now:
This is a nice fix. |
Purpose
PR #307 updates how the table layout is computed. It appears that the severity strings are translated and this can break the layout. This PR fixes that by computing the width taking into account the length of the translated severity strings.
Context
Follow-up #307.
Fixes #334
Changes
How to test this PR
Check that when changing the level and the locale, the table layout does not break.