mirror of
https://github.com/yeongpin/cursor-free-vip.git
synced 2025-08-03 21:17:35 +08:00
fix: main.py:132: DeprecationWarning: 'locale.getdefaultlocale' is deprecated and slated for removal in Python 3.15. Use setlocale(), getencoding() and getlocale() instead.
This commit is contained in:
parent
fb3e532058
commit
d5404e8f57
3
main.py
3
main.py
@ -129,7 +129,8 @@ class Translator:
|
|||||||
"""Detect language on Unix-like systems (Linux, macOS)"""
|
"""Detect language on Unix-like systems (Linux, macOS)"""
|
||||||
try:
|
try:
|
||||||
# Get the system locale
|
# Get the system locale
|
||||||
system_locale = locale.getdefaultlocale()[0]
|
locale.setlocale(locale.LC_ALL, '')
|
||||||
|
system_locale = locale.getlocale()[0]
|
||||||
if not system_locale:
|
if not system_locale:
|
||||||
return 'en'
|
return 'en'
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user