Last modified: 2011-09-22 20:33:07 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 T32364, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 30364 - LanguageConverter should depend on the page content language instead of the wiki content language
LanguageConverter should depend on the page content language instead of the w...
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Language converter (Other open bugs)
unspecified
All All
: Unprioritized enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
: i18n
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-08-13 23:28 UTC by Robin Pepermans (SPQRobin)
Modified: 2011-09-22 20:33 UTC (History)
3 users (show)

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


Attachments
Working patch if parser cache is disabled (12.84 KB, patch)
2011-09-11 01:11 UTC, Robin Pepermans (SPQRobin)
Details
Working patch (12.59 KB, patch)
2011-09-20 21:24 UTC, Robin Pepermans (SPQRobin)
Details

Description Robin Pepermans (SPQRobin) 2011-08-13 23:28:25 UTC
Now that I introduced a "page content language" (see Title.php), which allows extensions to change the language a page is written in, LanguageConverter should depend on that instead of $wgContLang (the wiki content language).

I thought it was relatively easy to fix, but while trying, it was apparently more tricky, so I thought I'd submit a bug report :)
Comment 1 Brion Vibber 2011-08-15 17:34:35 UTC
While you're at it, could you make a page on mediawiki.org describing the 'page content language' concept and interface, and talk it up on wikitech-l?

I can't find *any* instances of the phrase appearing in wikitech-l archives, which makes me suspect that unless someone's been *explicitly following your changes on trunk* they have no idea what's happening in this arena.

Thanks!
Comment 2 Robin Pepermans (SPQRobin) 2011-08-15 20:05:38 UTC
I had already made a page describing the directionality improvements with some info on the page content language. Now I added a specific page http://www.mediawiki.org/wiki/Language_in_MediaWiki (and generally improved some i18n documentation).

I will send an e-mail to wikitech-l.. I am subscribed to several mailing lists but I almost never post to them :-) Should do that though.
Comment 3 Robin Pepermans (SPQRobin) 2011-08-31 20:42:54 UTC
I'm quite close to fixing this, but the problem is that $wgEnableParserCache needs to be false in order to make non-wgContLang conversions work. Probably the caching system somewhere depends on wgContLang where it should rather depend on the page language..
Comment 4 Robin Pepermans (SPQRobin) 2011-09-11 01:11:39 UTC
Created attachment 9049 [details]
Working patch if parser cache is disabled
Comment 5 Robin Pepermans (SPQRobin) 2011-09-11 17:58:12 UTC
Had to find a way to use the title object to ParserOptions, but got it eventually. Fixed in r96798 :)
Comment 6 Niklas Laxström 2011-09-20 09:39:59 UTC
Robin: can you look at that restoring that revision with the issues fixed?
Comment 7 Daniel Friesen 2011-09-20 09:42:31 UTC
Ah... so we had a bug for this.

Preferences are going to be troublesome with multiple page languages though.

It's a side-nitpick though I didn't think Title was the best place for that. SpecialPages may be outputting content that actually came from another page and actually be in that page's language rather than the user's language.
Comment 8 Niklas Laxström 2011-09-20 09:43:46 UTC
Special pages can markup the content themselves fortunately.
Comment 9 Robin Pepermans (SPQRobin) 2011-09-20 21:24:12 UTC
Created attachment 9083 [details]
Working patch

This is the latest patch.

I haven't been able to fix the parser bug, but I can reproduce it on qqq message pages after adding $wgExtraLanguageNames['qqq'] = 'Message documentation'; to LocalSettings
Comment 10 Robin Pepermans (SPQRobin) 2011-09-22 20:33:07 UTC
Committed in r97849 without the change in WikiPage, it caused an infinite loop, see bug 31098.

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


Navigation
Links