Last modified: 2006-02-11 19:12:30 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 T6828, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 4828 - Genitive month name incorrectly loads from UI language in cs, pl, uk
Genitive month name incorrectly loads from UI language in cs, pl, uk
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Internationalization (Other open bugs)
1.6.x
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
http://cs.wikipedia.org/w/index.php?t...
: patch, patch-need-review
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-02-02 00:00 UTC by Brion Vibber
Modified: 2006-02-11 19:12 UTC (History)
2 users (show)

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


Attachments
A patch for the bug (2.29 KB, patch)
2006-02-03 20:43 UTC, Mormegil
Details
The correct version of the fix (1.79 KB, patch)
2006-02-05 19:47 UTC, Mormegil
Details
Unified diff preferred, I guess (2.36 KB, patch)
2006-02-05 19:54 UTC, Mormegil
Details

Description Brion Vibber 2006-02-02 00:00:32 UTC
The Language::getMonthNameGen() function for LanguageCs, LanguagePl, and 
LanguageUk uses wfMsg(). This incorrectly pulls from the selected user-
interface language instead of the content language, so dates can misrender 
as in the linked sample using {{CURRENTMONTHNAMEGEN}} if a different UI 
language is selected.

Expected rendering (as with site and UI set to cs):
01. února

Actual rendering, with UI pref set to en:
01. <february-gen>
Comment 1 Mormegil 2006-02-03 20:43:52 UTC
Created attachment 1355 [details]
A patch for the bug

Replace wfMsg() by a construction detecting whether wfMsgForContent or wfMsg
should be called (as in various occasions in Language.php). (In this case,
wfMsgForContent would probably be enough _for now_, as nobody calls this
function from code, yet.)
Comment 2 Brion Vibber 2006-02-04 07:55:58 UTC
Was this tested?

Notice: Undefined variable: wgContLang in /opt/web/pages/head/languages/LanguageCs.php 
on line 147
Fatal error: Call to a member function getLangObj() on a non-object in /opt/web/pages/
head/languages/LanguageCs.php on line 147
Comment 3 Mormegil 2006-02-05 19:47:24 UTC
Created attachment 1370 [details]
The correct version of the fix

Ooops... I _did_ test the patch, this is a result of having CVS checkout
somewhere else than the testing installation... :-x Sorry!
Comment 4 Mormegil 2006-02-05 19:54:45 UTC
Created attachment 1371 [details]
Unified diff preferred, I guess

A "diff -u" version of the patch
Comment 5 Brion Vibber 2006-02-05 21:27:15 UTC
Looks good this time. :) Applied to CVS HEAD.

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


Navigation
Links