GUI: change language selection format to "language - country (locale name)" #1519

pull Diapolo wants to merge 1 commits into bitcoin:master from Diapolo:GUI_locale_selection changing 1 files +14 −1
  1. Diapolo commented at 8:37 PM on June 25, 2012: none

    new language selection

    The language and country names are displayed always in english, which seems to be a Qt limitation.

    Fixes: #1509

  2. laanwj commented at 9:16 AM on June 26, 2012: member

    Great!

    I see one mistake in the screenshot though: en (or generally, xx without xx_YY) should be simply English, not English - UnitedStates :)

  3. Diapolo commented at 10:14 AM on June 26, 2012: none

    @laanwj I'm not sure how to fix your observation, as I pass "en" into QLocale and query .language() and .country(). Perhaps UnitedStates is default here? As Germany is for de?

  4. laanwj commented at 10:25 AM on June 26, 2012: member

    Yes, I know that's the behavior. But it's not correct. English is "general" English, without locale. You can see this problem with Persian - Iran, which is now duplicate in the list. I wonder if there is another way to take apart the xx_YY which doesn't have this problem (without reinventing the wheel...).

  5. Diapolo commented at 11:13 AM on June 26, 2012: none

    We could check if there is a "_" in the source string and if not only use .language()? Do you know the function to check for a certain char in a QString?

  6. laanwj commented at 11:47 AM on June 26, 2012: member

    QString::contains(str) -> bool

  7. GUI: change language selection format
    - display as "language - country (locale name)", when locale name consists of 2 parts
    - display as "language (locale name)", when locale name consists of 1 part
    2943f60811
  8. Diapolo commented at 2:15 PM on June 26, 2012: none

    @laanwj Thanks, it now does, what we want it to do.

  9. laanwj commented at 2:18 PM on June 26, 2012: member

    ACK

  10. laanwj referenced this in commit bcf0f41171 on Jun 27, 2012
  11. laanwj merged this on Jun 27, 2012
  12. laanwj closed this on Jun 27, 2012

  13. coblee referenced this in commit 12a408f5d1 on Jul 17, 2012
  14. lateminer referenced this in commit 4699c035f9 on Jan 22, 2019
  15. 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-14 18:16 UTC

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