"Preferences" menu opens "command line options" when using French language (OSX) #5800

issue lunokhod opened this issue on February 17, 2015
  1. lunokhod commented at 9:34 PM on February 17, 2015: none

    When clicking on the "Preferences" menu when using French language, the "command line options" window opens instead of the usual preferences pane. I note that this works correctly when using English and a few other languages that I tested.

    Bitcoin core version 10.99.0 OS: OSX 10.9.5

  2. theuni commented at 6:09 PM on February 18, 2015: member

    Confirmed. This is a weird one. It seems to be caused by some string matching gone bad.

    The french translation of "Command-line options" is "Options de ligne de &commande". When translating "Options..." at runtime, it finds matches the "Options de ligne de &commande" and opens that window.

    Weird.

    This can be confirmed by the following hack-test-fix.

    diff --git a/src/qt/locale/bitcoin_fr.ts b/src/qt/locale/bitcoin_fr.ts
    index 71a1519..82a6bef 100644
    --- a/src/qt/locale/bitcoin_fr.ts
    +++ b/src/qt/locale/bitcoin_fr.ts
    @@ -416,7 +416,7 @@
         </message>
         <message>
             <source>&amp;Command-line options</source>
    -        <translation>Options de ligne de &amp;commande</translation>
    +        <translation>.Options de ligne de &amp;commande</translation>
         </message>
         <message>
             <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
    

    With that in-place, both menus work as expected.

    It looks like a pretty clear Qt bug to me. Maybe we can work around by inserting some invisible garbage into the string for now?

    Or as a different work-around, we could probably change "Options..." to "Preferences...", since we're setting the PreferencesRole on it anyway. That'd mean updating all translations though.

  3. laanwj commented at 1:49 PM on March 3, 2015: member

    Huh, so this is a bug in Qt and not just a wrong translation on Transifex?

  4. laanwj added the label GUI on Mar 3, 2015
  5. jonasschnelli commented at 8:29 AM on March 6, 2015: contributor

    I try to find a solution. Behavior is documented at http://qt-project.org/doc/qt-4.8/qmenubar.html (section "QMenuBar on Mac OS X"). I think it's not a QT bug, it's more or less a strange way of handling menus on mac.

  6. jonasschnelli referenced this in commit 9bbb880be4 on Mar 6, 2015
  7. laanwj closed this on Mar 9, 2015

  8. laanwj referenced this in commit 786cf72c7f on Mar 9, 2015
  9. reddink referenced this in commit d917dbc0f0 on May 27, 2020
  10. 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:15 UTC

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