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
(PUP-7042) Mark strings in graph #5580
Conversation
CLA signed by all contributors. |
Closing and reopening to fix Travis. |
This commit marks user-facing error and info strings in `lib/puppet/graph/*` for translation.
lib/puppet/graph/simple_graph.rb
Outdated
@@ -225,18 +225,18 @@ def report_cycles_in_graph | |||
return if n == 0 | |||
s = n == 1 ? '' : 's' | |||
|
|||
message = "Found #{n} dependency cycle#{s}:\n" | |||
message = _("Found %{num} dependency cycle%{s}:\n") % { num: n, s: s } |
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 might be some pluralization going on here (for dependency cycle
)?
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.
+1 - probably could use the pluralization form here
lib/puppet/graph/simple_graph.rb
Outdated
@@ -146,7 +146,7 @@ def tarjan(root, s) | |||
frame[:step] = :children | |||
|
|||
else | |||
fail "#{frame[:step]} is an unknown step" | |||
fail _("%{step} is an unknown step") % { step: frame[:step] } |
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'm not sure we should externalize this. It's such an obscure error in the graph logic that someone who comes across it in japanese will probably have better luck searching for resolution in english than with a translation that probably won't reflect the nature of the message.
lib/puppet/graph/simple_graph.rb
Outdated
@@ -193,7 +193,7 @@ def find_cycles_in_graph | |||
# through the graph first, which are more likely to be interesting to the | |||
# user. I think; it would be interesting to verify that. --daniel 2011-01-23 | |||
def paths_in_cycle(cycle, max_paths = 1) | |||
raise ArgumentError, "negative or zero max_paths" if max_paths < 1 | |||
raise ArgumentError, _("negative or zero max_paths") if max_paths < 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.
suggest translator comment noting that negative or zero
refers to integers
lib/puppet/graph/simple_graph.rb
Outdated
message += "Try the '--graph' option and opening the " | ||
message += "resulting '.dot' file in OmniGraffle or GraphViz" | ||
message += _("Try the '--graph' option and opening the ") | ||
message += _("resulting '.dot' file in OmniGraffle or GraphViz") |
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'm not sure if OmniGraffle or GraphViz should be translated - probably worth a translator note
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.
per comments
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.
Minor comment changes
lib/puppet/graph/simple_graph.rb
Outdated
else | ||
message += "Try the '--graph' option and opening the " | ||
message += "resulting '.dot' file in OmniGraffle or GraphViz" | ||
message += _("Try the '--graph' option and opening the ") |
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.
--graph is a keyword, and we should leave a comment to leave it out of translation
Updated. |
@mcdonaldseanp are you good with the updated changeset? |
Looking at the comment @mcdonaldseanp left, it has been addressed. I think this is good to merge as he is unavailable for a bit. |
This commit marks user-facing error and info strings in
lib/puppet/graph/*
for translation.