diff --git a/Makefile b/Makefile index e5ef72d..1d3557f 100644 --- a/Makefile +++ b/Makefile @@ -25,16 +25,16 @@ install: mkdir -p $(DESTDIR)/usr/bin/ cargo fetch cargo build --release - cp -vf target/release/fedora-kernel-manager $(DESTDIR)/usr/bin/ - chmod 755 $(DESTDIR)/usr/bin/fedora-kernel-manager - mkdir -p $(DESTDIR)/usr/lib/fedora-kernel-manager/ - cp -rvf data/scripts $(DESTDIR)/usr/lib/fedora-kernel-manager/ - chmod 755 $(DESTDIR)/usr/lib/fedora-kernel-manager/scripts/*.sh - cp -rvf data/locales $(DESTDIR)/usr/lib/fedora-kernel-manager/ - cp -rvf data/kernel_branches $(DESTDIR)/usr/lib/fedora-kernel-manager/ - cp -vf data/scx_scheds.json $(DESTDIR)/usr/lib/fedora-kernel-manager/ - mkdir -p $(DESTDIR)/usr/share/applications - mkdir -p $(DESTDIR)/usr/share/icons/hicolor/scalable/apps - cp -vf data/com.github.cosmicfusion.fedora-kernel-manager.svg $(DESTDIR)/usr/share/icons/hicolor/scalable/apps/ - cp -vf data/com.github.cosmicfusion.fedora-kernel-manager.desktop $(DESTDIR)/usr/share/applications/ - cp -rvf data/polkit-1 $(DESTDIR)/usr/share/ \ No newline at end of file + cp -vf target/release/fedora-kernel-manager $(DESTDIR)/usr/bin/ + chmod 755 $(DESTDIR)/usr/bin/fedora-kernel-manager + mkdir -p $(DESTDIR)/usr/lib/fedora-kernel-manager/ + cp -rvf data/scripts $(DESTDIR)/usr/lib/fedora-kernel-manager/ + chmod 755 $(DESTDIR)/usr/lib/fedora-kernel-manager/scripts/*.sh + cp -rvf data/locales $(DESTDIR)/usr/lib/fedora-kernel-manager/ + cp -rvf data/kernel_branches $(DESTDIR)/usr/lib/fedora-kernel-manager/ + cp -vf data/scx_scheds.json $(DESTDIR)/usr/lib/fedora-kernel-manager/ + mkdir -p $(DESTDIR)/usr/share/applications + mkdir -p $(DESTDIR)/usr/share/icons/hicolor/scalable/apps + cp -vf data/com.github.cosmicfusion.fedora-kernel-manager.svg $(DESTDIR)/usr/share/icons/hicolor/scalable/apps/ + cp -vf data/com.github.cosmicfusion.fedora-kernel-manager.desktop $(DESTDIR)/usr/share/applications/ + cp -rvf data/polkit-1 $(DESTDIR)/usr/share/ \ No newline at end of file diff --git a/core b/core index cc7a3d7..5e4a085 100644 Binary files a/core and b/core differ diff --git a/src/main.rs b/src/main.rs index 7692e42..49f4f42 100644 --- a/src/main.rs +++ b/src/main.rs @@ -71,10 +71,12 @@ struct KernelBranch { fn main() -> glib::ExitCode { let current_locale = match env::var_os("LANG") { - Some(v) => v.into_string().unwrap(), + Some(v) => v.into_string().unwrap().chars() + .take_while(|&ch| ch != '.') + .collect::(), None => panic!("$LANG is not set"), }; - rust_i18n::set_locale(current_locale.strip_suffix(".UTF-8").unwrap()); + rust_i18n::set_locale(¤t_locale); let app = adw::Application::builder().application_id(APP_ID).build();