Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

EnableCFBundleAllowMixedLocalizations property list key inside Info.plist in macOS #108269

Closed
Assignees
ned-deily
Labels
@shyamnathp

Description

@shyamnathp

Feature or enhancement

Has this already been discussed elsewhere?

This is a minor feature, which does not need previous discussion elsewhere

Links to previous discussion of this feature:

No response

Proposal:

Feature Request

TheQLocale module of Python packages like PySide6 and PyQt6, incorporates a notion of locale on macOS that extends beyond the POSIX locale (used by the locale Python module) and depends on theInfo.plist of the application bundle. This is because both PySide6 and PyQt6 are python bindings to the C++ Qt framework, where every application is compiIed and will be mostly built as a framework, and have its ownInfo.plist file.

In the case of Python, the application bundle is Python macOS application framework and this module looks at the CFBundleDevelopmentRegion property key inside theInfo.plist file of the Python framework (generally in/Library/Frameworks/Python.framework/Versions/3.11/Resources/Python.app/Contents/Info.plist), which is always English. Therefore, even when the system language is something different, QLocale always returnsEnglish as the system language.In order to support the retrieval of localized strings,CFBundleAllowMixedLocalizations property key must be turned on in Python'sInfo.plist.

In the case of non-framework builds of Python, the locale reverts back to the POSIX locale. However, the Python installed by default in macOS and available for install fromhttps://www.python.org/downloads/ are all framework builds.

Corresponding bug in PYSIDE:https://bugreports.qt.io/browse/PYSIDE-2419

Solution

The solution is pretty simple and only includes adding the following line

<key>CFBundleAllowMixedLocalizations</key><true/>

to CPython'sInfo.plist file. Afaik, the additon of this does not cause any issues elsewhere as well.

I would be happy to make this change myself and contribute to CPython, if you all agree with the idea.

Linked PRs

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp