Last modified: 2013-01-04 02:38:43 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T43468, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 41468 - [regression] wgMonthNames and wgMonthNamesShort are in the wrong language on JavaScript pages
[regression] wgMonthNames and wgMonthNamesShort are in the wrong language on ...
Status: RESOLVED WONTFIX
Product: MediaWiki
Classification: Unclassified
Internationalization (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
: code-update-regression, i18n, javascript
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-28 12:26 UTC by Helder
Modified: 2013-01-04 02:38 UTC (History)
6 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Helder 2012-10-28 12:26:41 UTC
I'm getting
wgMonthNames = ["", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]
on <https://pt.wikipedia.org/wiki/User:Foo/Bar.js> and <https://pt.wikipedia.org/wiki/User:Foo/Bar.css> but it should be

wgMonthNames = ["", "janeiro", "fevereiro", "março", "abril", "maio", "junho", "julho", "agosto", "setembro", "outubro", "novembro", "dezembro"]
as it is on <https://pt.wikipedia.org/wiki/User:Foo/Bar>.

Why the JS pages are in English instead of the language of the wiki (Portuguese)?
If this was intentional, how can I get the names in Portuguese?


Maybe this was caused by gerrit change I18a53ba0, or the new content handler?
Comment 1 Robin Pepermans (SPQRobin) 2012-10-28 13:07:28 UTC
Yes, it's because of Gerrit change #14271, because CSS/JS pages are considered to be in English, so the page language is English which makes the month names also in English. So this was more or less intentional.

Do you need them in the wiki language on CSS/JS pages, or is this a "theoretical/supposed" bug?

Maybe we should have a better way to get month names; it probably makes sense to provide them in the user language, wiki content language as wall as the page content language. "wgMonthNames" is a too generic name.
Comment 2 Helder 2012-10-28 13:13:05 UTC
Well, I noticed this when I was reviewing a user script at
https://pt.wikipedia.org/w/index.php?oldid=32552351
and since the author created a "Months" variable to store essentially what is already available at wgMonthNamesShort, I was going to suggest him to use that config variable instead, but when I typed it on console I noticed it didn't work as expected. Hence this bug.
Comment 3 Huji 2013-01-04 02:38:43 UTC
I just ran into a similar problem when I created a script that returns the current date in localized format; it just didn't work in CSS/JS pages.

But I agree with Robin that it is more of a feature than a bug. I'm marking this as WONTFIX.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links