Skip to content

Commit f2e7e89

Browse files
committed
Used is-unicode-supported in language.get_msgs()
1 parent 4c401ba commit f2e7e89

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

is-legacy-terminal/pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ license-files = [
1919
]
2020
dependencies = [
2121
"colorama~=0.4.6 ; platform_system == 'Windows'",
22+
"is-unicode-supported~=1.1.1",
2223
"json5~=0.13.0",
2324
]
2425
requires-python = ">=3.8,<4"

is-legacy-terminal/src/is_legacy_terminal/cli/lib/language.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,8 @@ def get_msgs(cli: sn, lang_code: str = 'en') -> sn:
6565
Path(__file__).parent.parent.parent / 'data/_locales/en/messages.json'))
6666

6767
if not lang_code.startswith('en'): # fetch non-English msgs from jsDelivr
68-
import non_latin_locales
69-
from ...api import is_legacy_terminal
70-
if lang_code.split('_')[0] in non_latin_locales and not is_legacy_terminal(): # type: ignore
68+
import is_unicode_supported, non_latin_locales
69+
if lang_code.split('_')[0] in non_latin_locales and not is_unicode_supported(): # type: ignore
7170
return sn(**msgs) # EN ones cuz non-Latin not supported
7271
msg_base_url = f'{jsdelivr.create_commit_url(cli, cli.commit_hashes.locales)}' \
7372
'/src/is_legacy_terminal/data/_locales'

0 commit comments

Comments
 (0)