diff options
| author | namilsk <namilsk@namilsk.tech> | 2026-02-02 00:19:48 +0300 |
|---|---|---|
| committer | namilsk <namilsk@namilsk.tech> | 2026-02-02 00:19:48 +0300 |
| commit | 6a63e7e777fb9182ff5b68aa2167bd5f2e548f0e (patch) | |
| tree | 878936a2af4b6bf3372ca9f586b2cfe7f9519348 /init/src/host/locale.rs | |
| parent | a5749a5d8d38b0db2ce5548473f8a61b674578a6 (diff) | |
Implemented mainloop functions (e.g. restarting services), autofmt all
Diffstat (limited to 'init/src/host/locale.rs')
| -rw-r--r-- | init/src/host/locale.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/init/src/host/locale.rs b/init/src/host/locale.rs index d955297..3d9b11d 100644 --- a/init/src/host/locale.rs +++ b/init/src/host/locale.rs @@ -1,6 +1,6 @@ // NOTE: Ts file contains setting localisation by environment variables // Main logic implemented but how i think it can contain with broken logic or checks -// At least if check failed it set C.UTF8 (fallback locale) +// At least if check failed it set C.UTF8 (fallback locale) // And why is std::env::set_var unsafe???? use crate::host::timezone::set_timezone; @@ -10,13 +10,13 @@ use std::io::Write; use std::process::Command; /// Main function which setting system locale. -/// +/// /// Logic && Checks -/// 1. Reading /etc/default/locale to find needed language. +/// 1. Reading /etc/default/locale to find needed language. /// If it broken/has syntax errors skipping this step -/// 2. Checking for locale avalible (also switching `-` and `_`), -/// if not uses fallback locale. -/// +/// 2. Checking for locale avalible (also switching `-` and `_`), +/// if not uses fallback locale. +/// pub fn set_locale(locale: Option<String>) -> Result<(), Box<dyn std::error::Error>> { let loc = match locale { Some(l) => l, |
