Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib/locale_helpers.py
AgeCommit message (Collapse)Author
2022-08-01Remove the hash/number sign at the line-start (#1345)Fabian Bornschein
Currently the helper remove the first character of each line, this can lead to cases, where important characters are removed. For example if the locale is already set up. (hash is already removed) in that case the helper would remove the first character of the locale and lead to a broken attempt to set the locale later on. This change should avoid that and only remove the hash. Co-authored-by: Fabian Bornschein <2440175-fabiscafe@users.noreply.gitlab.com>
2022-02-03Command locales (second batch) (#886)Werner Llácer
* flexibilize the definition of execution locale for OS commands executed via the SysCommand* interface. Defined a storage argument which holds the default Added functions to unset the program own locales reset to the program default locales set a specific locale A decorator to execute functions in the host locale environment * rename decorator local_environ to host_locale_environ created a simmetric decorator c_locale_environ, to make a routine work with the C locale whatever is set * Correct definition of btrfs standard layout * Added error handling * Fixed issue where archinstall.Boot() would raise an exception in vain * Added debugging for SysCommandWorker() * Added some debugging * Tweaking debug a bit * Tweaking debug * Adding more debug * Adding more debug * Removed some debugging * Adding more debug * Adding more debug * Adding more debug * Adding more debug * Adding more debug * Adding more debug * Adding more debug * Adding more debug * Adding more debug * Adding more debug * Adding more debug * Removed soem debugging * Removed soem debugging * Testing a revert * Adding back the reverted change, adding lofile * Redirecting stdout to /dev/null for testing (to avoid interrupting the fork) * Reverted debug changes * Testing os.system() Co-authored-by: Anton Hvornum <anton@hvornum.se>
2022-01-07Global menu (#806)Daniel
* Global menu * Fix flake8 * Refactor code * Add documentation * Fix flake8 * Add support for user flow mentioned in #799 * Move import * Fix flake8 (again) Co-authored-by: Daniel Girtler <girtler.daniel@gmail.com> Co-authored-by: Anton Hvornum <anton.feeds@gmail.com>
2022-01-06Added type annotations to all functions (#845)Anton Hvornum
* Added type annotations for 1/5 of the files. There's bound to be some issues with type miss-match, will sort that out later. * Added type hints for 4/5 of the code * Added type hints for 4.7/5 of the code * Added type hints for 5/5 of the code base * Split the linters into individual files This should help with more clearly show which runner is breaking since they don't share a single common name any longer. Also moved mypy settings into pyproject.toml * Fixed some of the last flake8 issues * Missing parameter * Fixed invalid lookahead types * __future__ had to be at the top * Fixed last flake8 issues
2021-12-02Add simple menu for better UX (#660)Daniel
* Add simple menu for better UX * Add remove external dependency * Fix harddisk return value on skip * Table output for partitioning process * Switch partitioning to simple menu * fixup! Switch partitioning to simple menu * Ignoring complexity and binary operator issues Only in simple_menu.py * Added license text to the MIT licensed file * Added in versioning information * Fixed some imports and removed the last generic_select() from user_interaction. Also fixed a revert/merged fork of ask_for_main_filesystem_format() * Update color scheme to match Arch style better * Use cyan as default cursor color * Leave simple menu the same Co-authored-by: Daniel Girtler <girtler.daniel@gmail.com> Co-authored-by: Anton Hvornum <anton.feeds+github@gmail.com> Co-authored-by: Dylan M. Taylor <dylan@dylanmtaylor.com>
2021-05-19Reworking SysCommand & Moving to localectl for locale related activitiesAnton Hvornum
* Moving to `localectl` rather than local file manipulation *(both for listing locales and setting them)*. * Swapped `loadkeys` for localectl. * Renamed `main` to `maim` in awesome profile. * Created `archinstall.Boot(<installation>)` which spawns a `systemd-nspawn` container against the installation target. * Exposing systemd.py's internals to archinstall global scope. * Re-worked `SysCommand` completely, it's now a wrapper for `SysCommandWorker` which supports interacting with the process in a different way. `SysCommand` should behave just like the old one, for backwards compatibility reasons. This fixes #68 and #69. * `SysCommand()` now has a `.decode()` function that defaults to `UTF-8`. * Adding back peak_output=True to pacstrap. Co-authored-by: Anton Hvornum <anton.feeds@gmail.com> Co-authored-by: Dylan Taylor <dylan@dylanmtaylor.com>
2021-05-15Fix some variable shadowing issuesDylan Taylor
2021-05-15Some additional formattingDylan Taylor
2021-05-15Many more manual changesDylan Taylor
2021-04-22Fix other issues of language selectionSecondThundeR
2021-04-14Removed layout filteringAnton Hvornum
This caused languages such as `be-latin1` to be hidden both in Search and direct input. Because as an example that layout belongs to `azerty` and not `qwerty`.
2021-04-12Replace os.system with subprocess.callJakobDev
2020-09-07Spelling error in locale helpers.Anton Hvornum
2020-09-01Added locale helpers in terms of keyboard language/layout. ↵Anton Hvornum
archinstall.list_keyboard_languages(), archinstall.search_keyboard_layout() and archinstall.set_keyboard_language() work together to help listing, finding and setting a keyboard layout in terminals. Won't work for X-frontends, but will do for CLI installation methods. Added a language selector-helper-function with a crude search functionality. Added all this to the guided template.