Page MenuHomePhabricator

Config script still sets "en_US.utf8" to "$wgShellLocale" for MW 1.30+
Open, LowPublic

Description

See the "report" here.

Event Timeline

Legoktm added a project: MediaWiki-Installer.
Legoktm subscribed.

I tested this out and it properly defaulted to C.UTF-8. I suspect @Cavila doesn't have the C.UTF-8 locale installed on their system, so it fell back to en_US.utf8.

I've documented this behavior of the installer in https://www.mediawiki.org/w/index.php?title=Manual%3A%24wgShellLocale&type=revision&diff=2853987&oldid=2852243

I tested this out and it properly defaulted to C.UTF-8. I suspect @Cavila doesn't have the C.UTF-8 locale installed on their system, so it fell back to en_US.utf8.

Thanks a lot for having a look a this! Next time I install a wiki I will try to think of this and have a look at what is happening. Anyways your suspicion sounds very well like the valid reason for this behaviour. Thanks also for updating the docu.

@Legoktm There is something in the water.

I just installed MediaWiki via the web installer on a Debian 9. Issuing locale -a reveals:

C
C.UTF-8
de_DE
de_DE@euro
de_DE.iso88591
de_DE.iso885915@euro
de_DE.utf8
deutsch
en_GB.utf8
en_US.utf8
german
POSIX

However the "LocalSettings.php" generated contains: $wgShellLocale = "en_US.utf8"; So there must be another reason.

Issuing just locale to get the settings:

locale
LANG=de_DE.UTF-8
LANGUAGE=
LC_CTYPE="de_DE.UTF-8"
LC_NUMERIC="de_DE.UTF-8"
LC_TIME="de_DE.UTF-8"
LC_COLLATE="de_DE.UTF-8"
LC_MONETARY="de_DE.UTF-8"
LC_MESSAGES="de_DE.UTF-8"
LC_PAPER="de_DE.UTF-8"
LC_NAME="de_DE.UTF-8"
LC_ADDRESS="de_DE.UTF-8"
LC_TELEPHONE="de_DE.UTF-8"
LC_MEASUREMENT="de_DE.UTF-8"
LC_IDENTIFICATION="de_DE.UTF-8"
LC_ALL=

It appears that in a "vanilla" Debian LANGUAGE and LC_ALL are not set meaning there is no global locale for all users. Perhaps this is the reason why "C.UTF-8" is not picked. This will probably happen to most user. Thus MW should probably pick "C.UTF-8" instead of "en_US.utf8" in such a situation.

Hmm, I'll take another look (I was testing on Debian unstable, I wonder if that made any difference...). Thank you for testing as well :)

This is still on my backlog, but I don't want to cookie lick in case I don't get to it soon.

Krinkle subscribed.

Proposing for the next release, because it seems a regression from 1.29 in that a baseline that MW depends on for consistency as of 1.30 is not consistently met.

Jdforrester-WMF subscribed.

This missed the boat for the MW 1.33 release. Provisionally re-tagging to 1.34's release instead.

WDoranWMF edited projects, added Platform Team Legacy; removed Platform Engineering.

Triaging this as low is a bit discouraging given that the wrong locale completely messes up all files on a wiki running MW 1.30 and later at least to my experience. Anyways thumbs up for a fix.

In what way does it "mess up all files"? What is the impact?

In what way does it "mess up all files"? What is the impact?

They simply do not render. All you get is the frame around miniatures but the thumbs as such are not showing up - until one changes to C.UTF-8. If I remember correctly due to some "mobile feature". Happened to my twice until I added this item to my personal upgrade and installation checklist for MW 1.31. Now I am fine but can imagine that others may still run into worries.