Skip to content
This repository was archived by the owner on Aug 31, 2025. It is now read-only.
This repository was archived by the owner on Aug 31, 2025. It is now read-only.

Much simpler locale detection code #763

@tmontes

Description

@tmontes

While investigating / preparing a UI proposal to address #518 and #692, I learned that given that Mu depends on Qt, there's a pretty direct way of handling what all the code in merged #672 does, with two lines of code.

Tested on macOS 10.12.6, with the UI language as English:

>>> from PyQt5.Qt import QLocale
>>> QLocale.system().name()
'en_US'

...when the UI language is set to Portuguese it returns pt_PT, and when set to Spanish, returns es_ES.

I do believe that its behaviour will be equally correct on the other platforms, but it does need confirmation.

What do you say of throwing away 1 module with 80 lines of code?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions