-
Notifications
You must be signed in to change notification settings - Fork 105
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
(SDK-214) Add gettext and externalize strings #32
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.
Einige Kleinigkeiten müssen noch ausgebessert werden, aber das muss nicht gleich passieren.
Some minor things still need changing, but those are not urgent to fix.
metadata.data.update('issues_url' => PDK::CLI::Input.get(metadata.data['issues_url'])) | ||
|
||
puts | ||
puts '-' * 40 | ||
puts metadata.to_json | ||
puts '-' * 40 | ||
puts | ||
puts "About to generate this metadata; continue? [n/Y]" | ||
puts _("About to generate this metadata; continue? [n/Y]") | ||
|
||
if PDK::CLI::Input.get('Y') !~ /^y(es)?$/i |
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.
Any ideas on how to i18n this query?
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.
Hmmm, the pattern matching part? We should probably check with Larissa to see if there is an existing convention. I'm guessing that we are drawing the line at localizing the prompt and then explaining which option is affirmative in the prompt if necessary.
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.
yeah, I'll reach out to her. nothing to fret about just now.
lib/pdk/cli.rb
Outdated
puts c.help | ||
exit 0 | ||
end | ||
|
||
format_desc = <<-EOS | ||
format_desc = _(<<-EOS | ||
Specify desired output format. Valid formats are '#{PDK::Report.formats.join("', '")}'. |
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.
missed a template extraction here
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.
indeed!
lib/pdk/generators/module.rb
Outdated
# TODO: make this one string and have a helper function to wrap | ||
puts _("We need to create a metadata.json file for this module. Please answer the") | ||
puts _("following questions; if the question is not applicable to this module, feel free") | ||
puts _("to leave it blank.") |
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.
Do we even need to manually wrap this? Just pack it all into a single string.
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 it's more of a UX question to decide if we want to stay within a certain line width with our output. Right now CRI constrains itself to 80 characters for things like --help
output. For now I will just make this a single string though.
|
aa1cdc5
to
3d3fad1
Compare
Testing this out with a new vanagon build:
|
096553e
to
34f9993
Compare
I've squashed the fixups, and updated the german translation. |
No description provided.