-
Notifications
You must be signed in to change notification settings - Fork 25
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
time: Locales #340
time: Locales #340
Conversation
datetime/tests/time/mod.rs
Outdated
@@ -72,22 +85,45 @@ fn run_test_time( | |||
assert!(stderr.contains(expected_error)); | |||
} | |||
|
|||
#[test] | |||
fn test_smoke_help() { |
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.
This seems like a test that will break every time the command line usage is updated? "fragile" test is sub-optimal.
datetime/time.rs
Outdated
about = gettext("time - time a simple command or give resource usage"), | ||
help_template = gettext("{about-with-newline}\nUsage: {usage}\n\nArguments:\n{positionals}\n\nOptions:\n{options}") | ||
help_template = gettext("{about}\n\nUsage: {usage}\n\nArguments:\n{positionals}\n\nOptions:\n{options}"), | ||
version = env!("CARGO_PKG_VERSION"), |
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
version =
setting required of all posixutils utilities? Surely the default value is correct and wanted? -
is a help template for each posixutils utility required, in order to support translation?
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.
- No. Fixed.
- Yes, but the help template may differ
help_template = gettext("{about-with-newline}\nUsage: {usage}\n\nArguments:\n{positionals}\n\nOptions:\n{options}") | ||
help_template = gettext("{about}\n\nUsage: {usage}\n\nArguments:\n{positionals}\n\nOptions:\n{options}"), | ||
disable_help_flag = true, | ||
disable_version_flag = true, |
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.
Why disable? Is this necessary for gettext-rs to translate the "Print help" 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.
Yes
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 disappointing to replicate this across many utilities :(. Oh well; what must be done must be done. We want complete translation support.
Current status:
Unresolved issues: