Last modified: 2006-02-11 19:12:30 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
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
Product: MediaWiki
Classification: Unclassified
Internationalization (Other open bugs)
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch, patch-need-review
Depends on:
  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: ---

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

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.