core: enforce en_US language in cmds

ref #9
This commit is contained in:
Vaxry 2024-10-16 19:48:42 +01:00
parent dc474b07f6
commit 2104e356be

View file

@ -19,10 +19,13 @@
#include <sys/utsname.h> #include <sys/utsname.h>
#include <hyprutils/string/VarList.hpp> #include <hyprutils/string/VarList.hpp>
#include <hyprutils/string/String.hpp> #include <hyprutils/string/String.hpp>
#include <cstdlib>
using namespace Hyprutils::String; using namespace Hyprutils::String;
CSystemInternals::CSystemInternals(QObject* parent) : QObject(parent) { CSystemInternals::CSystemInternals(QObject* parent) : QObject(parent) {
setenv("LANG", "en_US.UTF-8", true);
// gather data from os-release // gather data from os-release
if (auto data = readFile("/etc/os-release")) { if (auto data = readFile("/etc/os-release")) {
CVarList lines(data.value(), 0, '\n'); CVarList lines(data.value(), 0, '\n');