yay icon indicating copy to clipboard operation
yay copied to clipboard

yay partly ignores locale change

Open Perdu opened this issue 2 years ago • 2 comments

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

  1. Have a non-english locale
  2. export LANG=C
  3. 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...
[...]

Perdu avatar Oct 17 '23 10:10 Perdu

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.

saymonz avatar Jul 20 '24 12:07 saymonz

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.

Mart-Bogdan avatar Aug 25 '25 23:08 Mart-Bogdan