yay partly ignores locale change
Affected Version
yay v12.1.3 - libalpm v13.0.2
Describe the bug
I don't know how yay checks the locale, but it doesn't fully take dynamical changes into account and keeps producing part of the output in the original locale. This is annoying because when publishing bug reports, you want to be able to revert back to english easily.
Reproduction Steps
- Have a non-english locale
- export LANG=C
- run yay and observe that it's not english
Output
$ locale
LANG=fr_FR.UTF-8
LC_CTYPE="fr_FR.UTF-8"
LC_NUMERIC="fr_FR.UTF-8"
LC_TIME="fr_FR.UTF-8"
LC_COLLATE="fr_FR.UTF-8"
LC_MONETARY="fr_FR.UTF-8"
LC_MESSAGES="fr_FR.UTF-8"
LC_PAPER="fr_FR.UTF-8"
LC_NAME="fr_FR.UTF-8"
LC_ADDRESS="fr_FR.UTF-8"
LC_TELEPHONE="fr_FR.UTF-8"
LC_MEASUREMENT="fr_FR.UTF-8"
LC_IDENTIFICATION="fr_FR.UTF-8"
LC_ALL=
$ export LANG=C
$ locale
LANG=C
LC_CTYPE="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_PAPER="C"
LC_NAME="C"
LC_ADDRESS="C"
LC_TELEPHONE="C"
LC_MEASUREMENT="C"
LC_IDENTIFICATION="C"
LC_ALL=
$ yay -Syu
:: Synchronizing package databases...
core is up to date
extra is up to date
multilib is up to date
:: Recherche des mises à jour AUR...
:: Recherche de mises à jour dans les bases de données...
[...]
Had the same issue. Solved it by setting the LANGUAGE var instead of LANG.
LANGUAGE=C yay
I tried setting LC_ALL first, as it should override every other settings according to the Arch Wiki, but it did not work, so maybe there is still improvements to make in yay.
It is still issue. And it selects compleately different and UNWANTED locale.
I live in Ukraine and it selects russian locale for some reason.
And also I can't chose options when it asks me. '[В] Все ' neither englysh option A nor russian B works.