When specifying the LANG and LC_MESSAGES variables, LANG overwrites LC_MESSAGES which it shouldn't do as described in http://www.gnu.org/software/libc/manual/html_node/Locale-Categories.html#Locale-Categories Reproducible: Always Steps to Reproduce: 1. Generate two different locales (e.g. en_US.utf8 and de_DE.utf8) 2. Specify one as LANG and the other as LC_MESSAGES temporarily (or in /etc/env.d/02locales and then run env-update and source /etc/profile) 3. fire up "man foobar" e.g. (LANG="firstlocale" LC_MESSAGES="secondlocale" man foobar) Actual Results: The message given by man is written with the locale of the LANG variable. Expected Results: The message should be written with the locale of the LC_MESSAGES variable.
Created attachment 107970 [details] locale
Created attachment 107971 [details] locale -a
Created attachment 107973 [details] emerge --info
You know, it works perfectly fine here; you'd better make sure that the 'foobar' manpages is localized and that you haven't purged it. :)
No, i get "Keine Handbuchseite für foobar" which is german instead of "No manual entry for foobar".
(In reply to comment #5) > No, i get "Keine Handbuchseite für foobar" which is german instead of "No > manual entry for foobar". I tested this on a debian 4.0 (testing), where it works as expected: rainer@localhost:~$ locale -a C POSIX de_DE.utf8 en_US.utf8 rainer@localhost:~$ LANG=de_DE.utf8 LC_MESSAGES=en_US.utf8 man foobar No manual entry for foobar
the last comment was not supposed to be commited :(
seems to be a problem with man only: Istari impulze # LC_MESSAGES="de_DE.utf8" gcc foo gcc: foo: Datei oder Verzeichnis nicht gefunden gcc: keine Eingabedateien Istari impulze # LC_MESSAGES="en_US.utf8" gcc foo gcc: foo: No such file or directory gcc: no input files Istari impulze # LC_MESSAGES="de_DE.utf8" man foo Keine Handbuchseite für foo Istari impulze # LC_MESSAGES="en_US.utf8" man foo Keine Handbuchseite für foo
As said, works just fine here.
got the same bug here ~ % LC_MESSAGES="en_US.utf8" man foo Keine Handbuchseite für foo ~ % LANG="en_US.utf8" man foo Keine Handbuchseite für foo ~ % LC_ALL="en_US.utf8" LANG="en_US.utf8" man foo No manual entry for foo Portage 2.1.2-r3 (default-linux/x86/2006.1, gcc-4.1.1, glibc-2.5-r0, 2.6.19-gentoo-r4 i686) LANG="de_DE.UTF-8" LC_ALL="de_DE.UTF-8"
idle@odin ~ $ locale LANG=de_DE.utf8 LC_CTYPE="de_DE.utf8" LC_NUMERIC="de_DE.utf8" LC_TIME="de_DE.utf8" LC_COLLATE="de_DE.utf8" LC_MONETARY="de_DE.utf8" LC_MESSAGES="de_DE.utf8" LC_PAPER="de_DE.utf8" LC_NAME="de_DE.utf8" LC_ADDRESS="de_DE.utf8" LC_TELEPHONE="de_DE.utf8" LC_MEASUREMENT="de_DE.utf8" LC_IDENTIFICATION="de_DE.utf8" LC_ALL=de_DE.utf8 idle@odin ~ $ locale -a C de_DE de_DE@euro de_DE.utf8 en_GB en_GB.utf8 en_US en_US.utf8 POSIX idle@odin ~ $ man foo Keine Handbuchseite für foo idle@odin ~ $ LC_MESSAGES="en_US.utf8" man foo Keine Handbuchseite für foo idle@odin ~ $ gcc gcc: keine Eingabedateien idle@odin ~ $ LC_MESSAGES="en_US.utf8" gcc gcc: keine Eingabedateien :/
(In reply to comment #12) > idle@odin ~ $ locale > LANG=de_DE.utf8 > LC_CTYPE="de_DE.utf8" > LC_NUMERIC="de_DE.utf8" > LC_TIME="de_DE.utf8" > LC_COLLATE="de_DE.utf8" > LC_MONETARY="de_DE.utf8" > LC_MESSAGES="de_DE.utf8" > LC_PAPER="de_DE.utf8" > LC_NAME="de_DE.utf8" > LC_ADDRESS="de_DE.utf8" > LC_TELEPHONE="de_DE.utf8" > LC_MEASUREMENT="de_DE.utf8" > LC_IDENTIFICATION="de_DE.utf8" > LC_ALL=de_DE.utf8 > > idle@odin ~ $ locale -a > C > de_DE > de_DE@euro > de_DE.utf8 > en_GB > en_GB.utf8 > en_US > en_US.utf8 > POSIX > > idle@odin ~ $ man foo > Keine Handbuchseite für foo > > idle@odin ~ $ LC_MESSAGES="en_US.utf8" man foo > Keine Handbuchseite für foo > > idle@odin ~ $ gcc > gcc: keine Eingabedateien > > idle@odin ~ $ LC_MESSAGES="en_US.utf8" gcc > gcc: keine Eingabedateien > > :/ > ok ignore my first post please :D i've unset my LC_ALL now and checked again. gcc works now.. man not i think it's a man bug :P
idle@odin ~ $ locale LANG=de_DE.utf8 LC_MESSAGES="de_DE.utf8" idle@odin ~ $ locale -a C de_DE de_DE@euro de_DE.utf8 en_GB en_GB.utf8 en_US en_US.utf8 POSIX idle@odin ~ $ man foo Keine Handbuchseite für foo idle@odin ~ $ LC_MESSAGES="en_US.utf8" man foo Keine Handbuchseite für foo idle@odin ~ $ gcc gcc: keine Eingabedateien idle@odin ~ $ LC_MESSAGES="en_US.utf8" gcc gcc: no input files gcc works.. man not i think it's a man bug :P
(In reply to comment #4) > You know, it works perfectly fine here; you'd better make sure that the > 'foobar' manpages is localized and that you haven't purged it. :) It's not a matter of localized man pages, but the output of man itself - e.g. `man non-existing-man-page`.
Can reproduce the problem with sys-apps/man-1.6d (having the nls use flag set of course).
(In reply to comment #16) > Can reproduce the problem with sys-apps/man-1.6d (having the nls use flag set > of course). > Then go reopen Bug 163835 and get 1.6e stabilized, *after* you've made sure it's been compiled w/ appropriate LINGUAS set. it works just perfectly fine there. *** This bug has been marked as a duplicate of bug 163835 ***