Skip to content

CLI --serverinfo: Add ISO country code support in addition to Qt Country IDs #2362

Closed

Description

@hoffie

Currently, --serverinfo requires users to specify Qt Country IDs. This is not user-friendly.
With Qt6, --serverinfo will require users to specify Qt5 Country IDs, even if they are on Qt6. This is really not user-friendly.

Has this feature been discussed and generally agreed?

The ugliness of the status quo, especially when adding support for Qt6, has been officially stated by @pljones here: #2299 (review) :)

Describe the solution you'd like

--serverinfo should support ISO country codes, e.g. --serverinfo 'FooServer;FooCity;de
We should still keep support for the numerical IDs for compatibility.

Activity

  1. pljones commented on Feb 8, 2022

    @pljones
    Collaborator

    The current Locale -> Country letter method could possibly be used in reverse: take a two letter country code (de or zw), then look up the Locale based on the language (EN-us, DE-de, etc) to get the Qt Locale and hence the related country code for the "current" Qt. Then magic mapping gets that into the wire format, as per #2299.

    If I've understood it correctly. I could be wrong...

  2. softins commented on Feb 8, 2022

    @softins
    Member

    --serverinfo should support named countries, e.g. --serverinfo 'FooServer;FooCity;FooCountry We should still keep support for the numerical IDs for compatibility.

    For FooCountry, I think we should use the international standard abbreviations, rather than names, as defined in ISO-3316. Either the 2-letter or 3-letter variants (we could accept both). It then becomes independent of language, which could complicate things if we tried to interpret country names (e.g. Germany/Deutschland/Allemagne, Holland/Netherlands/Nederland, Belgium/Belgien/Belgie)

  3. acerix commented on Aug 25, 2022

    @acerix

    After updating to 3.9.0 and Qt6, the country of my server changed without any changes to the config, apparently it is using Qt6 Country IDs now. I fixed it by updating to the new code in this list: https://doc.qt.io/qt-6/qlocale.html#Country-enum

    Agree it would be more user friendly to specify country names/codes.

  4. hoffie commented on Aug 26, 2022

    @hoffie
    MemberAuthor

    After updating to 3.9.0 and Qt6, the country of my server changed without any changes to the config, apparently it is using Qt6 Country IDs now.

    Thanks for the report! This is unintended. I've opened #2809 to investigate this with rather high priority as it would be a regression.

  5. changed the title [-]CLI --serverinfo: Add named country support in addition to Qt Country IDs[/-] [+]CLI --serverinfo: Add ISO country code support in addition to Qt Country IDs[/+] on Aug 30, 2022
  6. added a commit that references this issue on Aug 30, 2022
    0afc019
  7. hoffie commented on Aug 30, 2022

    @hoffie
    MemberAuthor

    I've prepared a branch which adds support for two-letter ISO country codes here: hoffie@serverinfo-two-letter-country-codes

    Will submit after #2829 is merged as the branch is based on that PR.

  8. added this to the Release 3.9.1 milestone on Aug 30, 2022
  9. added 6 commits that reference this issue on Sep 7, 2022
    876a1e3
    c60bc81
    a58d806
    da1c9ae
    6958124
    cbe8e93
  10. added a commit that references this issue on Nov 9, 2022
    37e67fc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

  • Status
    Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions