Page MenuHomePhabricator

Error warnings of SyntaxHighlighting should be in user language, not content language
Closed, DeclinedPublic

Description

Author: theevilipaddress

Description:
At the moment, Geshi warnings when entering a wrong language, e.g. <source lang="jvascript"> always shows the warnings in the content language of the wiki, which is bad for usability on multilingual wikis like the Commons.

It's a trivial fix where only the "wfMsgForContent" function in http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/SyntaxHighlight_GeSHi/SyntaxHighlight_GeSHi.class.php?revision=82801&view=markup have to be replaced with "wfMsg" functions.


Version: unspecified
Severity: normal

Details

Reference
bz27723

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 21 2014, 11:24 PM
bzimport set Reference to bz27723.

The warning is saved with article text in the database. It can't vary per language.

Well, we still can disable caching on such pages. Well, we can't do this on Wikimedia.

(In reply to comment #2)

Well, we still can disable caching on such pages. Well, we can't do this on
Wikimedia.

Well we could just make the cache vary on userlanguage when the message is outputted, like we do for {{int:, but I don't think that's likely to happen.

Marking wontfix per Niklas's comment.

Making the cache vary on user language (what is already done!) does not help, since the error text is literally in the page source and not dynamic. I'm not saying it can't be done, but general infrastructure for reporting errors in wikitext would be nice.

The error message is not stored as literally text in the database, only in the cache. The parser never change wikitext before saving to the database. It would contain <source lang="jvascript"> in old version of a page.

Yes I'm wrong. Plain wfMsg() wouldn't work though.