index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
-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]: |