mirror of
https://github.com/fergalmoran/picard.git
synced 2026-01-06 00:23:58 +00:00
PICARD-1633: fix system locale detection on macOS
This failed due to: - macOS returning language / country separated by "-" instead of "_" (en-UK instead of en_UK) - required pyobjc modules not being packaged
This commit is contained in:
committed by
Philipp Wolfer
parent
16160e62a3
commit
776f10d5a4
@@ -63,6 +63,7 @@ def setup_gettext(localedir, ui_language=None, logger=None):
|
||||
import Foundation
|
||||
defaults = Foundation.NSUserDefaults.standardUserDefaults()
|
||||
current_locale = defaults.objectForKey_('AppleLanguages')[0]
|
||||
current_locale = current_locale.replace('-', '_')
|
||||
locale.setlocale(locale.LC_ALL, current_locale)
|
||||
except Exception as e:
|
||||
logger(e)
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
discid==1.2.0
|
||||
mutagen==1.42.0
|
||||
pyobjc-core==5.2
|
||||
pyobjc-framework-Cocoa==5.2
|
||||
PyQt5==5.13.1
|
||||
|
||||
Reference in New Issue
Block a user