Page MenuHomePhabricator

AJAX watch/unwatch reverts to english interface
Closed, ResolvedPublic

Description

While the new AJAX watch/unwatch is really cool, it now changes the text of the tab to "watch" or "unwatch", instead of the localized version found in [[MediaWiki:Watch]] and [[MediaWiki:Unwatch]].


Version: unspecified
Severity: minor

Details

Reference
bz10390

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:53 PM
bzimport set Reference to bz10390.
bzimport added a subscriber: Unknown Object (MLST).

It mixes language dependent code with site wide JavaScript. The bug occurs when user interface language is different from content language or if the cached script has wrong translations.
What would be the proper place to include translated strings?

The simplest thing would be to include them in a <script> within the primary page, similar to what we currently do for the table-of-contents show/hide link.

Alternately, we could deal better with the remote JS vars inclusion, adding cache-hash info onto the URL to ensure it contains relevant information.

Handling of 'uselang' params might also be considered.