-
Notifications
You must be signed in to change notification settings - Fork 33
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
Rename more message args #799
Conversation
}, | ||
IN_BAILIWICK_ADDR_MISMATCH => sub { | ||
__x # CONSISTENCY:IN_BAILIWICK_ADDR_MISMATCH | ||
'In-bailiwick name server listed at parent has a mismatch between glue data at parent ' | ||
. '({parent_addresses}) and any equivalent address record in child zone ({zone_addresses}).', | ||
. '({ns_list_parent}) and any equivalent address record in child zone ({ns_list_zone}).', |
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.
The new names "ns_list_parent" and "ns_list_zone" are not defined in "docs/logentry_args.md", which should therefore be updated and included in this PR.
I think "parent_ns_list" makes more sense. It could be possible that a single "ns" is referred to in a message (I mean single, not a list with one member) and then "parent_ns" would match better. Secondly, it is rather a list of parent ns, i.e. "parent" and "ns" are more connected.
Same with "zone".
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.
The way I see this is that ns_list_parent (or parent_ns_list) is a variant of ns_list. I don't it's necessary to list all variant names.
If we use suffixes for variants instead of prefixes, it's easier to find the canonical name in the list.
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 don't it's necessary to list all variant names.
We really should.
If we use suffixes for variants instead of prefixes, it's easier to find the canonical name in the list.
Possibly, but then "ns_parent_list" makes more sense.
@@ -204,11 +200,11 @@ Readonly my %TAG_DESCRIPTIONS => ( | |||
}, | |||
NS_SET => sub { | |||
__x # CONSISTENCY:NS_SET | |||
'Saw NS set ({nsset}) on following nameserver set : {servers}.', @_; | |||
'Saw NS set ({nsname_list_response}) on following nameserver set : {ns_list_servers}.', @_; |
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.
Not defined in "docs/logentry_args.md".
I think the second one ({servers}) should be "ns_list". It is just a list of NS/IP pairs that have been visited/investigate, isn't it?
Why cannot the first one be "nsname_list"?
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.
We could have nsname_list and ns_list here - there's no technical need for disambiguation. I only added the suffixes for extra clarity, but we could also go for shorter names and leave it to the msgid to provide context.
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 not a question of shorter names. We should as few defined argument names as possible to make it easier for the translator. In this example we have one list of NS names and one list of NS/IP pairs. Why should they be called something else in this msgid than in others?
}, | ||
ONE_NS_SET => sub { | ||
__x # CONSISTENCY:ONE_NS_SET | ||
"A single NS set was found ({nsset}).", @_; | ||
"A single NS set was found ({nsname_list}).", @_; |
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.
Compare with NS_SET above.
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 don't get this. Can you elaborate?
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 am sorry, I was unclear. The msgid's for NS_SET and ONS_NS_SET, respectively, both have an argument for a set of NS names. In both cases it should be changed from "nsset" to "nsname_list".
. 'the glue at the parent ({parent_addresses}) and any equivalent address record found ' | ||
. 'in authoritative zone ({zone_addresses}).', @_; | ||
. 'the glue at the parent ({ns_list_parent}) and any equivalent address record found ' | ||
. 'in authoritative zone ({ns_list_zone}).', @_; | ||
}, |
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.
See comment above.
}, | ||
SOA_RNAME => sub { | ||
__x # CONSISTENCY:SOA_RNAME | ||
"Found SOA rname {rname} on following nameserver set : {servers}.", @_; | ||
"Found SOA rname {rname} on following nameserver set : {ns_list}.", @_; | ||
}, |
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.
Yes, compare with NS_SET above.
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 don't get this. Can you elaborate?
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.
(Comment removed.)
I'll update the documentation to clarify the usage of suffixes. |
docs/logentry_args.md
Outdated
for disambiguation and/or clarity. | ||
Suffixes must be in snake_case, they must start with an underscore, and it must | ||
be unambiguous from the table where the base name ends and where the suffix | ||
begins. |
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.
You have changed this document from a list of defined argument names to something more complex that includes something called "base name" and some kind of rules for suffixing, which means that a name has some kind of morphology or syntax.
I prefer if this is a list defined argument names, i.e. names without formal internal structure. At least as a start.
If you go the second way, some terms must be defined and the rules must be specified. Still, the suffixes or prefixes must be listed and defined. It must be possible, as a translator, to go into the list and find the argument name and figure out what kind of data it is.
}, | ||
IN_BAILIWICK_ADDR_MISMATCH => sub { | ||
__x # CONSISTENCY:IN_BAILIWICK_ADDR_MISMATCH | ||
'In-bailiwick name server listed at parent has a mismatch between glue data at parent ' | ||
. '({parent_addresses}) and any equivalent address record in child zone ({zone_addresses}).', | ||
. '({ns_list_parent}) and any equivalent address record in child zone ({ns_list_zone}).', |
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 don't it's necessary to list all variant names.
We really should.
If we use suffixes for variants instead of prefixes, it's easier to find the canonical name in the list.
Possibly, but then "ns_parent_list" makes more sense.
@@ -204,11 +200,11 @@ Readonly my %TAG_DESCRIPTIONS => ( | |||
}, | |||
NS_SET => sub { | |||
__x # CONSISTENCY:NS_SET | |||
'Saw NS set ({nsset}) on following nameserver set : {servers}.', @_; | |||
'Saw NS set ({nsname_list_response}) on following nameserver set : {ns_list_servers}.', @_; |
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 not a question of shorter names. We should as few defined argument names as possible to make it easier for the translator. In this example we have one list of NS names and one list of NS/IP pairs. Why should they be called something else in this msgid than in others?
@matsduf Can you review again? |
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 should have as few argument names as possible. They should focus on the kind of data. That is what the translators need.
}, | ||
ONE_NS_SET => sub { | ||
__x # CONSISTENCY:ONE_NS_SET | ||
"A single NS set was found ({nsset}).", @_; | ||
"A single NS set was found ({nsname_list}).", @_; |
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 am sorry, I was unclear. The msgid's for NS_SET and ONS_NS_SET, respectively, both have an argument for a set of NS names. In both cases it should be changed from "nsset" to "nsname_list".
}, | ||
SOA_RNAME => sub { | ||
__x # CONSISTENCY:SOA_RNAME | ||
"Found SOA rname {rname} on following nameserver set : {servers}.", @_; | ||
"Found SOA rname {rname} on following nameserver set : {ns_list}.", @_; | ||
}, |
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.
(Comment removed.)
@matsduf Can you approve? |
Renames a bunch more name server related message arguments. No new argument names are introduced, except suffixes are appended to previously documented names, in order to provide disambiguation and context.
One unused message is also removed. In one case unused arguments are removed from the construction of a message.
This is a step towards solving #713.