Skip to content

Conversation

real-or-random
Copy link
Contributor

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:
screenshot from 2018-08-04 12-11-25
After:
screenshot from 2018-08-04 12-11-46

@laanwj laanwj added the Docs label Aug 4, 2018
@@ -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";
Copy link
Member

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?

Copy link
Contributor Author

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

@laanwj
Copy link
Member

laanwj commented Aug 4, 2018

This looks nice!

Concept ACK

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.
@DrahtBot
Copy link
Contributor

DrahtBot commented Aug 5, 2018

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.

@hebasto
Copy link
Member

hebasto commented Aug 5, 2018

There are conflicting pull requests:

  • this one introduces SYNOPSIS section to the all bitcoind, bitcoin-qt and utilities manual pages and, as a side effect, fixes one of two bugs in bitcoin-cli --help output;
  • #13879 fixes all found bugs in bitcoin-cli --help output and is safe for the whole code.

So, #13879 can be merged regardless of this pull request.

@maflcko
Copy link
Member

maflcko commented Aug 6, 2018

utACK 7272fdc

@laanwj
Copy link
Member

laanwj commented Aug 7, 2018

tested ACK 7272fdc

@laanwj laanwj merged commit 7272fdc into bitcoin:master Aug 7, 2018
laanwj added a commit that referenced this pull request Aug 7, 2018
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:
  ![screenshot from 2018-08-04 12-11-25](https://user-images.githubusercontent.com/1071625/43675564-6e2e016c-97e2-11e8-8de7-0912a4088efd.png)
  After:
  ![screenshot from 2018-08-04 12-11-46](https://user-images.githubusercontent.com/1071625/43675566-712d7032-97e2-11e8-85a7-5decc6dcb4b2.png)

Tree-SHA512: 9752ee0d0fde0b084e00232609866291ff493f4feb45919279b0f142b04635c049ddd2bf71ff6ad57d4ae1ed37103348640d253bb4f0b3e16b7fd2bb4b2a6fba
UdjinM6 pushed a commit to UdjinM6/dash that referenced this pull request Jun 30, 2021
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:
  ![screenshot from 2018-08-04 12-11-25](https://user-images.githubusercontent.com/1071625/43675564-6e2e016c-97e2-11e8-8de7-0912a4088efd.png)
  After:
  ![screenshot from 2018-08-04 12-11-46](https://user-images.githubusercontent.com/1071625/43675566-712d7032-97e2-11e8-85a7-5decc6dcb4b2.png)

Tree-SHA512: 9752ee0d0fde0b084e00232609866291ff493f4feb45919279b0f142b04635c049ddd2bf71ff6ad57d4ae1ed37103348640d253bb4f0b3e16b7fd2bb4b2a6fba
UdjinM6 pushed a commit to UdjinM6/dash that referenced this pull request Jul 1, 2021
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:
  ![screenshot from 2018-08-04 12-11-25](https://user-images.githubusercontent.com/1071625/43675564-6e2e016c-97e2-11e8-8de7-0912a4088efd.png)
  After:
  ![screenshot from 2018-08-04 12-11-46](https://user-images.githubusercontent.com/1071625/43675566-712d7032-97e2-11e8-85a7-5decc6dcb4b2.png)

Tree-SHA512: 9752ee0d0fde0b084e00232609866291ff493f4feb45919279b0f142b04635c049ddd2bf71ff6ad57d4ae1ed37103348640d253bb4f0b3e16b7fd2bb4b2a6fba
UdjinM6 pushed a commit to UdjinM6/dash that referenced this pull request Jul 2, 2021
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:
  ![screenshot from 2018-08-04 12-11-25](https://user-images.githubusercontent.com/1071625/43675564-6e2e016c-97e2-11e8-8de7-0912a4088efd.png)
  After:
  ![screenshot from 2018-08-04 12-11-46](https://user-images.githubusercontent.com/1071625/43675566-712d7032-97e2-11e8-85a7-5decc6dcb4b2.png)

Tree-SHA512: 9752ee0d0fde0b084e00232609866291ff493f4feb45919279b0f142b04635c049ddd2bf71ff6ad57d4ae1ed37103348640d253bb4f0b3e16b7fd2bb4b2a6fba
UdjinM6 pushed a commit to UdjinM6/dash that referenced this pull request Jul 2, 2021
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:
  ![screenshot from 2018-08-04 12-11-25](https://user-images.githubusercontent.com/1071625/43675564-6e2e016c-97e2-11e8-8de7-0912a4088efd.png)
  After:
  ![screenshot from 2018-08-04 12-11-46](https://user-images.githubusercontent.com/1071625/43675566-712d7032-97e2-11e8-85a7-5decc6dcb4b2.png)

Tree-SHA512: 9752ee0d0fde0b084e00232609866291ff493f4feb45919279b0f142b04635c049ddd2bf71ff6ad57d4ae1ed37103348640d253bb4f0b3e16b7fd2bb4b2a6fba
random-zebra added a commit to PIVX-Project/PIVX that referenced this pull request Sep 6, 2021
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
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants