for >0.7: Move default values and such out of parameter descriptions strings #1765

issue Diapolo opened this issue on August 31, 2012
  1. Diapolo commented at 5:39 AM on August 31, 2012: none

    So we don't need to re-translate the whole description string everytime a default value is changed.

    Example: " -keypool=<n> " + _("Set key pool size to <n> (default: 100)") + "\n" + " -keypool=<n> " + _("Set key pool size to <n> (default:") + "100)\n" +

  2. luke-jr commented at 6:14 AM on August 31, 2012: member

    Some defaults need to be translated, and some languages might not place them at the end. To work with this, such a change should use a %1 placeholder for the default, and make the default independently translatable when it is not a simple integer. The hard part will be doing this in a way that remains compatible with bitcoind, where _ is currently a no-op.

  3. laanwj commented at 6:48 AM on August 31, 2012: member

    Default is always the literal value that will be used as default. For that reason it does not need to be translated, integer or otherwise.

    Using substitutions is an okay idea although I personally don't see the problem with putting the default at the end in every language. And thus not introducing complexity for something that should be so simple.

    Any languages where this'd be different? Right-to-left languages render from right to left so putting the default at the end is still sane.

  4. luke-jr commented at 7:02 AM on August 31, 2012: member

    Counter-examples:

      -tor=<ip:port>         Use proxy to reach tor hidden services (default: same as -proxy)
      -port=<port>           Listen for connections on <port> (default: 8333 or testnet: 18333)
      -discover              Discover own IP address (default: 1 when listening and no -externalip)
      -listen                Accept connections from outside (default: 1 if no -proxy or -connect)
      -dnsseed               Find peers using DNS lookup (default: 1 unless -connect)
      -upnp                  Use UPnP to map the listening port (default: 1 when listening)
      -shrinkdebugfile       Shrink debug.log file on client startup (default: 1 when no -debug)
      -checkblocks=<n>       How many blocks to check at startup (default: 2500, 0 = all)
    
  5. laanwj commented at 7:05 AM on August 31, 2012: member

    Ok, you're right. It does not describe only default values but also conditional default behavior. Better to close this issue, it was a bad idea.

  6. luke-jr commented at 7:22 AM on August 31, 2012: member

    Well, I think it's a good idea - just a lot of work >_<

  7. Diapolo commented at 7:24 AM on August 31, 2012: none

    Seems like the idea is not consistently convertible (with little effort) and it makes no sense to special case such a thing -> closing this one.

  8. Diapolo closed this on Aug 31, 2012

  9. laanwj commented at 7:48 AM on August 31, 2012: member

    Yeah exactly, it could have been a good idea if we had structured options help more consistently from the beginning, but retrofitting it is just not worth the work.

  10. owlhooter referenced this in commit 51b2c7501c on Oct 10, 2018
  11. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-21 18:16 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me