-
Notifications
You must be signed in to change notification settings - Fork 37.7k
[docs] Reformat -help output for help2man #13872
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
Conversation
src/bitcoin-cli.cpp
Outdated
@@ -104,14 +104,13 @@ static int AppInitRPC(int argc, char* argv[]) | |||
return EXIT_FAILURE; | |||
} | |||
if (argc < 2 || HelpRequested(gArgs) || gArgs.IsArgSet("-version")) { | |||
std::string strUsage = strprintf("%s RPC client version", PACKAGE_NAME) + " " + FormatFullVersion() + "\n"; | |||
std::string strUsage = PACKAGE_NAME "RPC client version " + FormatFullVersion() + "\n"; |
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.
Won't this cause the strings to be joined without any spacing?
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.
Fixed with force push...
Funnily, the missing space was even caught by CI: https://travis-ci.org/bitcoin/bitcoin/jobs/412055928#L3002
This looks nice! Concept ACK |
fa15e5d
to
1411515
Compare
This commit slightly changes the format of the "Usage" strings in CLI `-help` messages to meet the expection of the help2man tool, which we use to generate man pages. On the way, we remove a few calls to `strprintf()`, which became superficial after commit 32fbfda.
1411515
to
7272fdc
Compare
Note to reviewers: This pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
There are conflicting pull requests:
So, #13879 can be merged regardless of this pull request. |
utACK 7272fdc |
tested ACK 7272fdc |
7272fdc [docs] Reformat -help output for help2man (Tim Ruffing) Pull request description: This commit slightly changes the format of the "Usage" strings in CLI `-help` messages to meet the expection of the help2man tool, which we use to generate man pages. On the way, we remove a few calls to `strprintf()`, which became superficial after commit 32fbfda. Before:  After:  Tree-SHA512: 9752ee0d0fde0b084e00232609866291ff493f4feb45919279b0f142b04635c049ddd2bf71ff6ad57d4ae1ed37103348640d253bb4f0b3e16b7fd2bb4b2a6fba
7272fdc [docs] Reformat -help output for help2man (Tim Ruffing) Pull request description: This commit slightly changes the format of the "Usage" strings in CLI `-help` messages to meet the expection of the help2man tool, which we use to generate man pages. On the way, we remove a few calls to `strprintf()`, which became superficial after commit 32fbfda. Before:  After:  Tree-SHA512: 9752ee0d0fde0b084e00232609866291ff493f4feb45919279b0f142b04635c049ddd2bf71ff6ad57d4ae1ed37103348640d253bb4f0b3e16b7fd2bb4b2a6fba
7272fdc [docs] Reformat -help output for help2man (Tim Ruffing) Pull request description: This commit slightly changes the format of the "Usage" strings in CLI `-help` messages to meet the expection of the help2man tool, which we use to generate man pages. On the way, we remove a few calls to `strprintf()`, which became superficial after commit 32fbfda. Before:  After:  Tree-SHA512: 9752ee0d0fde0b084e00232609866291ff493f4feb45919279b0f142b04635c049ddd2bf71ff6ad57d4ae1ed37103348640d253bb4f0b3e16b7fd2bb4b2a6fba
7272fdc [docs] Reformat -help output for help2man (Tim Ruffing) Pull request description: This commit slightly changes the format of the "Usage" strings in CLI `-help` messages to meet the expection of the help2man tool, which we use to generate man pages. On the way, we remove a few calls to `strprintf()`, which became superficial after commit 32fbfda. Before:  After:  Tree-SHA512: 9752ee0d0fde0b084e00232609866291ff493f4feb45919279b0f142b04635c049ddd2bf71ff6ad57d4ae1ed37103348640d253bb4f0b3e16b7fd2bb4b2a6fba
7272fdc [docs] Reformat -help output for help2man (Tim Ruffing) Pull request description: This commit slightly changes the format of the "Usage" strings in CLI `-help` messages to meet the expection of the help2man tool, which we use to generate man pages. On the way, we remove a few calls to `strprintf()`, which became superficial after commit 32fbfda. Before:  After:  Tree-SHA512: 9752ee0d0fde0b084e00232609866291ff493f4feb45919279b0f142b04635c049ddd2bf71ff6ad57d4ae1ed37103348640d253bb4f0b3e16b7fd2bb4b2a6fba
d838f20 Update manpages to reflect newer template (Fuzzbawls) d510ce0 [Docs] Reformat -help output for help2man (Fuzzbawls) 7f655de Run make translate to update source files (Fuzzbawls) 8608d3a Stop translating command line options (Fuzzbawls) 00dcec7 Stop translating remaining usages of PACKAGE_NAME (Fuzzbawls) 03a002a Unify product name to as few places as possible (Fuzzbawls) Pull request description: This stops the practice of repeatedly translating the string literal `PIVX Core` in multiple strings, which should never be localized as it is a proper product name. Also stops translating command line arguments as they were only ever translated for pivx-qt and not for the command line programs. Many of these arguments are highly technical in nature, and translating them has been problematic (with translation errors or literal translations that result in incorrect argument names) and leads to more confusion rather than less confusion. Lastly, a quick formatting change to the `-help` output of binary programs is included to make the release-distributed manpages more compliant with the help2man expected formatting. Overall, this results in a reduction of strings to translate by ~190, which should assist in getting language translations to meet our minimum translation threshold for inclusion in releases. ------- Based on the following upstream commits/PRs: - bitcoin@d5f4683 - bitcoin#13341 - bitcoin#13872 - bitcoin#16291 ACKs for top commit: furszy: ACK d838f20 random-zebra: utACK d838f20. Merging. Tree-SHA512: bb57d637b7b905421279483fcf95cfea4f4acf301fb1556e6bc8d2ab6e1c4f00d5a232be8d17181119c847047b3b81c4d2f5f62ec949999e4274836ef27e680f
This commit slightly changes the format of the "Usage" strings in CLI
-help
messages to meet the expection of the help2man tool, which weuse to generate man pages. On the way, we remove a few calls to
strprintf()
, which became superficial after commit 32fbfda.Before:


After: