fastfetch-cli / fastfetch

An actively maintained, feature-rich and performance oriented, neofetch like system information tool.
MIT License
8.14k stars 349 forks source link

I think locale detection is broken #166

Closed luni3359 closed 2 years ago

luni3359 commented 2 years ago

General description of bug:

Fastfetch says that I'm using english locale but I'm not. It's set to japanese both at user-level and system-level.

$ echo $LANG
ja_JP.UTF-8
$ echo $LANGUAGE
ja:es
$ cat /etc/default/locale
LANG=ja_JP.UTF-8
LC_ADDRESS=ja_JP.UTF-8
LC_IDENTIFICATION=ja_JP.UTF-8
LC_MEASUREMENT=ja_JP.UTF-8
LC_MONETARY=ja_JP.UTF-8
LC_NAME=ja_JP.UTF-8
LC_NUMERIC=ja_JP.UTF-8
LC_PAPER=ja_JP.UTF-8
LC_TELEPHONE=ja_JP.UTF-8
LC_TIME=ja_JP.UTF-8

Often helpful questions:

Output of fastfetch --version:

fastfetch 1.4.3-5

Output of fastfetch --load-config devinfo:

             `..---+/---..`                 luni3359@souryuu
         `---.``   ``   `.---.`             ----------------
      .--.`        ``        `-:-.          OS: KDE neon 20.04 (User Edition) [x86_64]
    `:/:     `.----//----.`     :/-         Host: 81Y6 Lenovo Legion 5 15IMH05H
   .:.    `---`          `--.`    .:`       Kernel: 5.13.0-44-generic
  .:`   `--`                .:-    `:.      Uptime: 2 days, 25 mins
 `/    `:.      `.-::-.`      -:`   `/`     Packages: 2834 (dpkg), 15 (flatpak), 6 (snap)
 /.    /.     `:++++++++:`     .:    .:     Shell: bash 5.0.17
`/    .:     `+++++++++++/      /`   `+`    Resolution: 1920x1080 @ 120Hz
/+`   --     .++++++++++++`     :.   .+:    DE: KDE Plasma 5.24.5
`/    .:     `+++++++++++/      /`   `+`    WM: KWin (X11)
 /`    /.     `:++++++++:`     .:    .:     WM Theme: Breeze
 ./    `:.      `.:::-.`      -:`   `/`     Theme: Breeze (Dark) [Plasma], Breeze [GTK3]
  .:`   `--`                .:-    `:.      Icons: breeze-dark [Plasma], breeze-dark [GTK2/3/4]
   .:.    `---`          `--.`    .:`       Font: Noto Sans (10pt) [Plasma], Noto Sans (10pt) [GTK2/3/4]
    `:/:     `.----//----.`     :/-         Cursor: breeze (24px)
      .-:.`        ``        `-:-.          Terminal: konsole
         `---.``   ``   `.---.`             Terminal Font: Couldn't find "DefaultProfile=%[^\n]" in ".config/konsolerc"
             `..---+/---..`                 CPU: Intel Core i5-10300H (8) @ 2.5GHz
                                            GPU 1: Intel UHD Graphics
                                            GPU 2: Nvidia GeForce GTX 1660 Ti Mobile
                                            Memory: 9346MiB / 15870MiB (58%)
                                            Disk (/): 78GB / 129GB (60%)
                                            Disk (/home): 351GB / 457GB (76%)
                                            Battery: 54% [Charging]
                                            Locale: en_US.UTF-8

                                            ████████████████████████
                                            ████████████████████████

Output of fastfetch --load-config devinfo-verbose:

             `..---+/---..`                 luni3359@souryuu
         `---.``   ``   `.---.`             ----------------
      .--.`        ``        `-:-.          OS: System: Linux; Name: KDE neon; Pretty name: KDE neon User - 5.24; ID: neon; ID like: ubuntu debian; Variant: User Edition; Variant ID: user; Version: 5.24; Version ID: 20.04; Version codename: focal; Build ID: ; Architecture: x86_64
   .:.    `---`          `--.`    .:`       Host: Family: Legion 5 15IMH05H; Name: 81Y6; Version: Lenovo Legion 5 15IMH05H
  .:`   `--`                .:-    `:.      Kernel: Sysname: Linux; Release: 5.13.0-44-generic; Version: #49~20.04.1-Ubuntu SMP Wed May 18 18:44:28 UTC 2022
 `/    `:.      `.-::-.`      -:`   `/`     Uptime: Days: 2; Hours: 0; Minutes: 26; Seconds: 6
 /.    /.     `:++++++++:`     .:    .:     Processes: Count: 2093
`/    .:     `+++++++++++/      /`   `+`    Packages: All: 2855; pacman: 0; pacman branch: ; dpkg: 2834; rpm: 0; emerge: 0; xbps: 0; flatpak: 15; snap: 6
/+`   --     .++++++++++++`     :.   .+:    Shell: Process name: bash; Process path: /bin/bash; Process exe: bash; Process version: 5.0.17; User path: /bin/bash; User exe: bash; User version: 5.0.17
`/    .:     `+++++++++++/      /`   `+`    Resolution: Width: 1920; Height: 1080; Refresh rate: 120
 /`    /.     `:++++++++:`     .:    .:     DE: Process name: plasmashell; Pretty name: KDE Plasma; Version: 5.24.5
 ./    `:.      `.:::-.`      -:`   `/`     WM: Process name: KWin; Pretty name: KWin; Protocol: X11
  .:`   `--`                .:-    `:.      WM Theme: Name: Breeze
   .:.    `---`          `--.`    .:`       Theme: Plasma: Breeze; Plasma colors: BreezeDark; Plasma colors pretty: Dark; GTK2: ; GTK3: Breeze; GTK4: ; GTK: Breeze [GTK3]
    `:/:     `.----//----.`     :/-         Icons: Plasma: breeze-dark; GTK2: breeze-dark; GTK3: breeze-dark; GTK4: breeze-dark; GTK: breeze-dark [GTK2/3/4]
      .-:.`        ``        `-:-.          Font: Plasma raw: Noto Sans, 10; Plasma name: Noto Sans; Plasma size: 10; Plasma styles: ; Plasma pretty: Noto Sans (10pt); GTK2 raw: Noto Sans,  10; GTK2 name: Noto Sans; GTK2 size: 10; GTK2 styles: ; GTK2 pretty: Noto Sans (10pt); GTK3 raw: Noto Sans,  10; GTK3 name: Noto Sans; GTK3 size: 10; GTK3 styles: ; GTK3 pretty: Noto Sans (10pt); GTK4 raw: Noto Sans,  10; GTK4 name: Noto Sans; GTK4 size: 10; GTK4 styles: ; GTK4 pretty: Noto Sans (10pt); GTK: Noto Sans (10pt) [GTK2/3/4]
                                            Cursor: Theme: breeze; Size: 24
                                            Terminal: Process: konsole; Path: /usr/bin/konsole; Exe: konsole
                                            Terminal Font: Raw: ; Name: ; Size: ; Styles: ; Pretty:
                                            CPU: Name: Intel(R) Core(TM) i5-10300H CPU @ 2.50GHz; Pretty: Intel Core i5-10300H; Vendor: GenuineIntel; Logical online: 8; Logical configured: 8; Physical: 4; Cores: 8; bios: 2.5; scaling max: 2.5; scaling min: 0.8; info max: 2.501; info min: 0.8; cpuinfo: 4.22602; frequency: 2.5
                                            GPU 1: Vendor: Intel Corporation; Vendor pretty: Intel; Name: UHD Graphics; Name pretty: UHD Graphics; Driver: i915
                                            GPU 2: Vendor: NVIDIA Corporation; Vendor pretty: Nvidia; Name: TU116M [GeForce GTX 1660 Ti Mobile]; Name pretty: GeForce GTX 1660 Ti Mobile; Driver: nvidia
                                            Memory: Used: 9316; Total: 15870; Percentage: 58
                                            Disk (/): Used: 78; Total: 129; Files: 784951; Percentage: 60
                                            Disk (/home): Used: 351; Total: 457; Files: 1008171; Percentage: 76
                                            Battery: Manufactor: SMP; Model: L19M4PC0; Technology: Li-poly; Capacaty: 55; Status: Charging
                                            Media Player: Name: Mozilla Firefox
                                            Song: Song: Firefox がメディアを再生しています; Artist: Firefox がメディアを再生しています; Album:
                                            Public IP: 1.2.3.4
                                            Local IP (wlp0s20f3): 1.2.3.4
                                            Local IP (virbr0): 1.2.3.4
                                            Local IP (docker0): 1.2.3.4
                                            Local IP (lxcbr0): 1.2.3.4
                                            Local IP (ztc25aotu4): 1.2.3.4
                                            Local IP (ztc25eyquu): 1.2.3.4
                                            Date & Time: year: 2022; yearShort: 22; month: 5; monthPretty: 05; monthName: May; monthNameShort: May; weekNumber: 21; weekday: Thursday; weekdayShort: Thu; dayInYear: 146; dayInMonth: 26; dayInWeek: 4; hour: 11; hourPretty: 11; hour12: 11; hour12Pretty: 11; minute: 47; minutePretty: 47; second: 9; secondPretty: 09
                                            Locale: en_US.UTF-8

                                            ████████████████████████
                                            ████████████████████████

Output of fastfetch --list-features:

libpci
vulkan
wayland
xcb
xrandr
x11
dbus
zlib
sqlite3
LinusDierheimer commented 2 years ago

The XDG default file for locale is /etc/locale.conf, so fastfetch checks it first. Maybe it contains a wrong value for you?

luni3359 commented 2 years ago

Oh I didn't know this file existed, it is all in english. I'm not sure what programs make use of it because system-wide everything shows in japanese (as long as it's translated).

I found here that apparently Ubuntu (what KDE Neon is based on) is doing is its own thing. I think I'm going to edit that and hope no other locale files show up.

luni3359 commented 2 years ago

I was thinking that maybe this could use an special case for locale detection since it's an Ubuntu problem but who knows if they'll fix it in the future.

LinusDierheimer commented 2 years ago

Good idea, will definitely implement it.

LinusDierheimer commented 2 years ago

done, thanks for reporting.

luni3359 commented 2 years ago

Thank you for adding this! I'll make sure to check next time there's a release.