Skip to content

Commit b143886

Browse files
committed
Corrected region delimiter
1 parent ff8c462 commit b143886

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

remove-json-keys/src/remove_json_keys/lib/language.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def get_msgs(cli: sn, lang_code: str = 'en') -> sn:
7070
try: # check if terminal supports non-Latin scripts
7171
non_latin_locales = data.json.read(url.get(
7272
f'{cli.urls.jsdelivr}@{cli.commit_hashes.data}/assets/data/non_latin_locales.json'))
73-
if lang_code.split('-')[0] in non_latin_locales and not env.can_render_non_latin_scripts():
73+
if lang_code.split('_')[0] in non_latin_locales and not env.can_render_non_latin_scripts():
7474
return sn(**msgs) # en ones
7575
except Exception as err:
7676
log.debug(f'Failed to fetch non-Latin locales: {err}')

translate-messages/src/translate_messages/lib/language.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def get_msgs(cli: sn, lang_code: str = 'en') -> sn:
102102
try: # check if terminal supports non-Latin scripts
103103
non_latin_locales = data.json.read(url.get(
104104
f'{cli.urls.jsdelivr}@{cli.commit_hashes.data}/assets/data/non_latin_locales.json'))
105-
if lang_code.split('-')[0] in non_latin_locales and not env.can_render_non_latin_scripts():
105+
if lang_code.split('_')[0] in non_latin_locales and not env.can_render_non_latin_scripts():
106106
return sn(**msgs) # en ones
107107
except Exception as err:
108108
log.debug(f'Failed to fetch non-Latin locales: {err}')

0 commit comments

Comments
 (0)