GUI: fix translation generation for UI options and a few other strings in the... #1322

pull Diapolo wants to merge 1 commits into bitcoin:master from Diapolo:fix_translation_Ui_Options changing 3 files +29 −16
  1. Diapolo commented at 11:17 AM on May 16, 2012: none

    ... HelpMessageBox class, as tr() does not work that early in the code

    I was wondering, why for example the translation for "Usage:" did not work, althoug it was in the (in my example) de language file. I found out that using the _() function does it's job and so I added 2 new functions in init.cpp to be able to get the strings translated and the translations used.

    This needs an additional bitcoinstrings.cpp update!

  2. fix translation generation for UI options and a few other strings in the HelpMessageBox class, as tr() does not work that early in the code 5cd6813868
  3. laanwj commented at 11:57 AM on May 16, 2012: member

    This is not the right way to solve it. I moved the ui-specific stuff out of init.cpp for a reason. This bounces strings around all over the place.

    As this is a ui-only problem, please solve this without changes to the core.

    Note that _ is defined in ui code, you can call it from there. However, it simply calls tr, so if _ works, so does tr!

  4. Diapolo commented at 12:05 PM on May 16, 2012: none

    tr() did not work, please try it. Even if the fix is not what it needs to be, there is a problem. And tr() vs. _() is for sure a difference, because _() shows up in bitcoinstrings.cpp, while this is not true for tr().

  5. laanwj commented at 12:12 PM on May 16, 2012: member

    Strings that are defined in src/qt/bitcoin.cpp should not show up in bitcoinstrings.cpp but end up in the .ts through the normal translation path.

  6. Diapolo commented at 12:45 PM on May 16, 2012: none

    Did you try to verify the problem? Before we start a discussion battle I would like to know if I found a bug or did something wrong in my local build ;).

    Try to change tr("Usage:") into something stupid like tr("Pig:"), what I say is that even after a translation the word "Usage:" is used in it's untranslated form.

    https://github.com/bitcoin/bitcoin/pull/1322/files#L2L151

  7. laanwj commented at 3:26 PM on May 16, 2012: member

    I think I know why tr doesn't work in our new class: Q_OBJECT is missing.

  8. laanwj commented at 4:58 PM on May 16, 2012: member

    I certainly did believe you that something is wrong, and wasn't trying to start a discussion battle. But I first wanted to know why it went wrong, instead of trying to work around it.

    #1324 fixes this.

  9. Diapolo commented at 5:38 PM on May 16, 2012: none

    It's all fine, I seem to have missunderstood what you were trying to say :). I'm glad it's fixed!

  10. Diapolo closed this on May 16, 2012

  11. suprnurd referenced this in commit 56971f8da1 on Dec 5, 2017
  12. lateminer referenced this in commit 5bd387e18d on May 6, 2020
  13. lateminer referenced this in commit 6bbd575860 on May 6, 2020
  14. 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-15 15:16 UTC

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