index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | codefiles <11915375+codefiles@users.noreply.github.com> | 2023-09-19 16:51:20 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-20 06:51:20 +1000 |
commit | 33d084f16a9055df0327930abe43f7b91429cf24 (patch) | |
tree | a4a2c9582ceb969c0dab687a9fe22ebdeefa0703 /archinstall/lib | |
parent | c0ff55d55b855f6975f4e588f6368ccb2a4294ac (diff) |
-rw-r--r-- | archinstall/lib/locale/locale.py | 23 |
diff --git a/archinstall/lib/locale/locale.py b/archinstall/lib/locale/locale.py index c3294e83..90f20cc6 100644 --- a/archinstall/lib/locale/locale.py +++ b/archinstall/lib/locale/locale.py @@ -11,21 +11,14 @@ def list_keyboard_languages() -> Iterator[str]: def list_locales() -> List[str]: - with open('/etc/locale.gen', 'r') as fp: - locales = [] - # before the list of locales begins there's an empty line with a '#' in front - # so we'll collect the localels from bottom up and halt when we're donw - entries = fp.readlines() - entries.reverse() - - for entry in entries: - text = entry.replace('#', '').strip() - if text == '': - break - locales.append(text) - - locales.reverse() - return locales + locales = [] + + with open('/usr/share/i18n/SUPPORTED') as file: + for line in file: + if line != 'C.UTF-8 UTF-8\n': + locales.append(line.rstrip()) + + return locales def list_x11_keyboard_languages() -> Iterator[str]: |