https://bugzilla.wikimedia.org/show_bug.cgi?id=43205

--- Comment #3 from MWJames <[email protected]> ---
translatewiki uses SMW 1.9 alpha, the Highlighter class (Introduced in 1.9
which prepares the tooltip content) is using the ContextSource to determine
language and output.

## Display/non-display issue 

The problem is a missing resource ('ext.smw.tooltips'). 

The display/non-display issue of the tooltip relates to the problem that the
resource that is responsible 'ext.smw.tooltips' is registered through the
context object $this->getOutput()->addModules( 'ext.smw.tooltips' ); but that
only works for pages that are refreshed or newly created but unfortunately when
a page comes from the parser cache the resource is not registered any longer
(this can be checked by looking at the page source).

A workaround is to replace the  $this->getOutput()->addModules(
'ext.smw.tooltips' ) line in Highlighter class with
SMWOutputs::requireResource( 'ext.smw.tooltips' ); (this way the resource is
kept as static property and called through every page processing stage such as
refresh, purge etc.)

## User language/content language

As for the second problem of user language/content language, the Highlighter
class only receives the content for a particular object (property, warning
etc.) which means that the content provider (from where the Highlighter class
is called) probably "sends" an inappropriate translated text. 

I haven't checked it but because "Modification date" is a special property the
SMWPropertyValue class should make the call when setting the content.

$highlighter->setContent( array (
'caption' => $text,
'content' => wfMessage( 'smw_isspecprop' )->text()
) );

## Misc

I would appreciate an insight as to why ... getOutput()->addModules( ... ) (by
using the ContextSource) only works for newly/purged pages and not for pages
that are coming from the parser cache.

Besides that, I'm short-staffed at the moment that's why I don't really have
the time to drill on these issues (and since it is not an official release yet
I have no rush either), so anyone with some spare time please go ahead.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to