Last modified: 2010-09-30 00:57:31 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 T27031, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 25031 - int messages are translated according to content language instead of user language in banners
int messages are translated according to content language instead of user lan...
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
CentralNotice (Other open bugs)
unspecified
All All
: Lowest trivial (vote)
: ---
Assigned To: Ryan Kaldari
:
: 25358 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-09-03 18:42 UTC by Ryan Kaldari
Modified: 2010-09-30 00:57 UTC (History)
1 user (show)

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


Attachments

Description Ryan Kaldari 2010-09-03 18:42:19 UTC
When a banner is previewed in a language other than English, {{int:...}} messages don't get translated. This bug doesn't occur in the live CentralNotice on meta, but does occur locally. Banners served from the BannerLoader also do not have this problem.

Apparently {{int:...}} translation is broken if wfMsg() is called at any point before the translation with a messagekey set to a message that includes anything in double braces. In this case, the int messages just display in English rather than the requested language.

Since every SpecialPage is supposed to call setHeaders(), and since setHeaders() sets the page title using the 'pagetitle' message, which is defined as '$1 - {{SITENAME}}', the only way to avoid this is to move the setHeader() calls to the end of the code, which is rather messy.
Comment 1 Ryan Kaldari 2010-09-03 18:44:31 UTC
Since this problem seems to only occur locally, and only for banner previews, I'm marking WONTFIX for now.
Comment 2 Ryan Kaldari 2010-09-03 18:52:45 UTC
Reopening since it may be possible to fix this in the core code rather than in the extension.
Comment 3 Ryan Kaldari 2010-09-07 21:50:36 UTC
Adding

<pre>
$popts->setUserLang( $language );
</pre>

to MessageCache::transform() fixes the problem. No idea if that breaks anything else.
Comment 4 Ryan Kaldari 2010-09-07 22:00:22 UTC
trying out in r72555.
Comment 5 Ryan Kaldari 2010-09-29 01:26:56 UTC
*** Bug 25358 has been marked as a duplicate of this bug. ***
Comment 6 Ryan Kaldari 2010-09-29 01:29:31 UTC
It looks like this is breaking {{int:...}} translation on the wikis as well (see Bug 25358). As soon as r70517 and r72555 are deployed, this should be fixed.
Comment 7 Ryan Kaldari 2010-09-29 19:42:39 UTC
OK, this should be fixed on test.wikipedia.org now.
Comment 8 Ryan Kaldari 2010-09-30 00:57:31 UTC
Fix is now live.

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


Navigation
Links