[Qt] built-in message texts untranslated in gitian build #1137

issue Diapolo opened this issue on April 22, 2012
  1. Diapolo commented at 3:15 PM on April 22, 2012: none

    Currently the buttons like QMessageBox::Abort or QMessageBox::Cancel are english and are untranslatable, this should be changed for a even better UX.

    I only found this one: http://www.qtcentre.org/threads/10210-how-to-use-tr%28%29-for-QMessageBox Is there any possibility to do this globally?

    Edit @laanwj: clarified title, title was "untranslated Qt message box button texts (not displayed in selected language)"

  2. laanwj commented at 3:17 PM on April 22, 2012: member

    It should be the case that Qt leaves the default buttons such as Abort and Cancel to the operating system. That's why they are default buttons. If your OS is in a certain language the buttons should too...

  3. Diapolo commented at 3:18 PM on April 22, 2012: none

    That is not true ;) ... I get english on a german Windows.

  4. Diapolo commented at 3:20 PM on April 22, 2012: none
  5. laanwj commented at 3:24 PM on April 22, 2012: member

    Maybe we're not including or loading the Qt built-in translation files (qt_XX.ts) for some reason (on windows, on Linux it's fine afaik). Maybe they're not included in the static link of Qt... dunno

  6. Diapolo commented at 3:29 PM on April 22, 2012: none

    I tested with the last official release and with my internal build, both show that behaviour.

  7. Diapolo commented at 1:14 AM on May 1, 2012: none

    I now know where the problem is, but have to try tomorrow on how to fix it. Seems like a problem with the path to the default qt translation files.

  8. Diapolo commented at 8:33 PM on May 1, 2012: none

    It's unlikely that #1175 fixes this, but for reference...

  9. Diapolo commented at 5:03 PM on June 27, 2012: none

    I confirm this is still present with official 0.6.3. My local build, which is based on Qt 4.8.1 does not suffer from this btw.

  10. Diapolo commented at 8:56 PM on July 8, 2012: none

    @laanwj I found out something interesting, after upgrading my local setup to a self-compiled Qt 4.8.2 the StandardButtons on message boxes were untranslated again (remember, this did not happen with official Qt 4.8.1).

    After a little investigation I found out that in %QTDIR%\translations there were only *.ts files but no *.qm files (ts = cleartext / qm = binary and after lrelease).

    I opened up a Win command-promt and did: cd D:\Qt_4.8.2\translations mingw32-make

    This generates the missing *.qm files and after a re-compilation of Bitcoin-Qt the default buttons were translated. Qt officially only supports the French, German, and Simplified Chinese translation files and all other translations are contributed by third parties, but can you look at the official build process, if the *.qm files are in place before compiling Bitcoin-Qt?

  11. Diapolo commented at 11:29 PM on September 28, 2012: none

    Remainder for myself to check, if #1864 fixes this! Edit: Nope...

  12. Diapolo commented at 11:49 PM on September 28, 2012: none

    There are only 2 reasons left I can think of, why bitcoin-qt shows some Qt default-texts as english.

    1. %QTDIR%\translations is missing some .qm files (I'm not sure how to check this btw.)
    2. Problem with old GCC version in Gitian

    Perhaps it's a problem with the pull-tester only? @TheBlueMatt Any chance to get my hands on a qt-win32-4.7.4-gitian-r1.zip file from a Gitian build?

  13. Diapolo commented at 5:10 PM on January 18, 2013: none

    @TheBlueMatt I'll ask again, as this bug is still presend in latest builds. Could you (or any other dev) give me access to a qt-win32-4.8.3-gitian-r1.zip file created by Gitian?

    Option 2, as written above would be to check if in %QTDIR%/translations the .qm files are generated after calling make install.

    I checked the Qt makefile, which should do everything needed for Qt internal translations, as make install calls install_subtargets, which includes a call for:

    <pre> sub-translations-install_subtargets-ordered: translations\$(MAKEFILE) sub-tools-install_subtargets-ordered FORCE cd translations\ && $(MAKE) -f $(MAKEFILE) install </pre>

    missing_translations

  14. Diapolo commented at 3:52 PM on January 16, 2014: none

    Still an issue with current official 0.8.6 version.

  15. Diapolo commented at 10:06 AM on March 27, 2014: none

    Still an issue with current official 0.9.0 version.

  16. laanwj commented at 10:13 AM on March 27, 2014: member

    I wonder if it is even possible to solve this without incredibly ugly hacks. I suppose Qt expects its own translations in a hardcoded path? (which is returned by QLibraryInfo::location(QLibraryInfo::TranslationsPath) ) It's not clear to me how to embed qt's translations into the executable. (and only in the case of a gitian build, not in the general case)

    Edit : here they have a similar problem, needing to embed the resources in a 'frozen' exe, it's Python but maybe a hint toward solving it https://groups.google.com/forum/#!msg/thg-dev/hSkdRkjR6H0/AbuzbhQ4E9IJ

  17. laanwj added the label Localization on May 6, 2014
  18. laanwj added the label GUI on May 6, 2014
  19. laanwj removed the label Localization on Jul 31, 2014
  20. Leviathn commented at 2:54 PM on September 5, 2017: none

    @diapolo is this still an issue with .14+?

  21. MarcoFalke commented at 5:54 PM on September 5, 2017: member

    I can't remember this was fixed. One could try with the nightly gitian builds: https://bitcoin.jonasschnelli.ch/?show=nightly#nighly

  22. suprnurd referenced this in commit f21c7cc9d8 on Dec 5, 2017
  23. Sjors commented at 6:00 PM on January 15, 2018: member

    I don't need Gitian builds to reproduce. Simply compiling master does the trick for me on OSX with Dutch as system language and wallet set to Dutch. The Send confirmation dialog is a funny example:

    ja1

    schermafbeelding 2018-01-15 om 17 37 43

    Although both buttons start out as QMessageBox::... the YES button is overwritten by the code later with a translated string.

    schermafbeelding 2018-01-15 om 17 40 21

    yes

    We could just replace all occurrences of QMessageBox::... with a translatable string, but that seems like a hack.

    IMO the system buttons should use the language selected by the user, not the OS language. Otherwise it looks weird if a user switches the wallet to some other language (e.g. I prefer the English version).

  24. thijstriemstra commented at 5:36 PM on January 31, 2018: none

    Here's a pull request that deals with the same issue: https://github.com/keepassxreboot/keepassxc/pull/1307. Looks like the solution is to 'bundle qtbase translations with builds'.

  25. lateminer referenced this in commit 0c6422ef51 on Jan 22, 2019
  26. lateminer referenced this in commit 4241574857 on Dec 25, 2019
  27. MarcoFalke commented at 5:24 PM on April 29, 2020: member

    The feature request didn't seem to attract much attention in the past. Also, the issue seems not important enough right now to keep it sitting around idle in the list of open issues.

    Closing due to lack of interest. Pull requests with improvements are always welcome.

  28. MarcoFalke closed this on Apr 29, 2020

  29. DrahtBot locked this on Feb 15, 2022

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-17 18:16 UTC

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