main: Make version bits GUI warning clearer to translators #7995

pull laanwj wants to merge 2 commits into bitcoin:master from laanwj:2016_05_minor_message_change changing 2 files +3 −3
  1. laanwj commented at 4:01 PM on May 3, 2016: member

    Trivial message changes to make translation easier

    • main: Make version bits GUI warning more clear to translators (reported by yahoe.001 on Transifex for the French translation)
    • init: Fix typo in help message for -whitelistforcerelay (reported by pryds on Transifex in the Danish translation)
  2. laanwj added the label Docs and Output on May 3, 2016
  3. laanwj added the label Needs backport on May 3, 2016
  4. laanwj force-pushed on May 3, 2016
  5. in src/main.cpp:None in ac0730c16d outdated
    2595 | @@ -2596,13 +2596,13 @@ void static UpdateTip(CBlockIndex *pindexNew, const CChainParams& chainParams) {
    2596 |              ThresholdState state = checker.GetStateFor(pindex, chainParams.GetConsensus(), warningcache[bit]);
    2597 |              if (state == THRESHOLD_ACTIVE || state == THRESHOLD_LOCKED_IN) {
    2598 |                  if (state == THRESHOLD_ACTIVE) {
    2599 | -                    strMiscWarning = strprintf(_("Warning: unknown new rules activated (versionbit %i)"), bit);
    2600 | +                    strMiscWarning = strprintf(_("Warning: unknown new rules activated (version bit %i)"), bit);
    


    paveljanik commented at 5:49 PM on May 3, 2016:

    p2p-versionbits-warning.py has to be adapter to this change 8)

    self.vb_pattern = re.compile("^Warning.*versionbit")
    
  6. paveljanik commented at 5:51 PM on May 3, 2016: contributor

    Concept ACK.

    Changing the RE to contain space helped.

  7. jonasschnelli commented at 5:54 PM on May 3, 2016: contributor

    utACK ac0730c16dc6eeb5fcb88aa136ef4cc56e360414

  8. laanwj commented at 9:24 AM on May 4, 2016: member

    Why are we translating this at all if we match on the English text?

    This is the wrong thing to do. For example, running this test against bitcoin-qt with non-English locale would also break this test. (or in the hypothetical case we ever implement #6092)

    I think the right thing to do here would be to remove the _(), or something more complex that makes sure that GUI users see the translated message whereas the alert writes the untranslated one, but this amounts to duplicating text.

  9. laanwj commented at 9:28 AM on May 4, 2016: member

    I remember solving a similar issue in #7141, and the outcome was:

    • The warning shown in the GUI can be translated - but only if it is a common warning, for google-ability
    • The warning shown in getinfo should not be translated - as it could be matched by regexps and such
  10. paveljanik commented at 7:38 PM on May 4, 2016: contributor

    This definitely is not nice, yes.

  11. sipa commented at 4:22 PM on May 25, 2016: member

    Anyone mind having a look at the Travis failure?

  12. paveljanik commented at 4:42 PM on May 25, 2016: contributor

    The failures are because of #7995 (review)

  13. sipa commented at 5:02 PM on May 25, 2016: member

    @paveljanik Thanks. @laanwj Feel like addressing that?

  14. laanwj commented at 5:38 AM on May 26, 2016: member

    I don't want to change the test as this is not supposed to be an API change. All I intended to do was change the GUI (translation) message.

    I don't, however, think this message should be translated at all. Especially as it is reported on RPC.

  15. init: Fix typo in help message for -whitelistforcerelay
    Reported by pryds on Transifex in the Danish translation.
    8e50eec0e9
  16. main: Do not translate version bits messages
    Messages reported on the RPC interface should not be translated,
    as the locale/GUI setting should not have unintended effects on
    software relying on a specific message.
    bfa9527757
  17. laanwj force-pushed on May 26, 2016
  18. laanwj commented at 5:44 AM on May 26, 2016: member

    Removed version bits warnings as translation message, this should pass now.

  19. in src/main.cpp:None in bfa9527757
    2595 | @@ -2596,7 +2596,7 @@ void static UpdateTip(CBlockIndex *pindexNew, const CChainParams& chainParams) {
    2596 |              ThresholdState state = checker.GetStateFor(pindex, chainParams.GetConsensus(), warningcache[bit]);
    2597 |              if (state == THRESHOLD_ACTIVE || state == THRESHOLD_LOCKED_IN) {
    2598 |                  if (state == THRESHOLD_ACTIVE) {
    2599 | -                    strMiscWarning = strprintf(_("Warning: unknown new rules activated (versionbit %i)"), bit);
    2600 | +                    strMiscWarning = strprintf("Warning: unknown new rules activated (versionbit %i)", bit);
    


    paveljanik commented at 7:43 AM on May 26, 2016:

    Removing translation here results in this message being shown untranslated in the UI - try it now on testnet. Is this what you really want?


    sipa commented at 7:00 PM on June 1, 2016:

    @laanwj Can you have a look?


    MarcoFalke commented at 7:25 PM on June 1, 2016:

    If this is the intent, please change the pull subject.


    laanwj commented at 1:55 PM on June 3, 2016:

    Well the point is that it should not appear translated on the API (RPC). There is currently no way to set a different message here for the GUI and for the RPC. There should be one, but the point here was to do a quick change. I don't think it's worth spending a lot of time here now, so I'm going to close this.

  20. laanwj commented at 1:55 PM on June 3, 2016: member

    Going to close this, I don't care enough to continue this.

  21. laanwj closed this on Jun 3, 2016

  22. MarcoFalke removed the label Needs backport on Jun 3, 2016
  23. MarcoFalke 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-13 18:15 UTC

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