Page MenuHomePhabricator

Parser test failure transliteratorParserTests.txt: transliterator: error messages
Closed, DeclinedPublic

Description

1) ParserIntegrationTest::testParse with data set "transliteratorParserTests.txt: transliterator: error messages" ('[details omitted]')
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'<p><span class="transliterator error">Invalid syntax <code>invalid rule</code> in <a href="/wiki/MediaWiki:Transliterator:syntax" title="MediaWiki:Transliterator:syntax">MediaWiki:Transliterator:syntax</a></span>\n
-<span class="transliterator error">Ambiguous rule <code>&#65;=&gt;c</code> in <a href="/wiki/MediaWiki:Transliterator:ambiguous" title="MediaWiki:Transliterator:ambiguous">MediaWiki:Transliterator:ambiguous</a></span>\n
-<span class="transliterator error">More than 500 rules in <a href="/wiki/MediaWiki:Transliterator:overlong" title="MediaWiki:Transliterator:overlong">MediaWiki:Transliterator:overlong</a></span>\n
-<span class="transliterator error">Rule <code>maybe a huge rule will work =&gt; no it won't</code> has more than 10 characters on the left in <a href="/wiki/MediaWiki:Transliterator:rulelength" title="MediaWiki:Transliterator:rulelength">MediaWiki:Transliterator:rulelength</a></span>\n
+'<p><span class="transliterator error">Invalid syntax &lt;code&gt;invalid rule&lt;/code&gt; in <a href="/wiki/MediaWiki:Transliterator:syntax" title="MediaWiki:Transliterator:syntax">MediaWiki:Transliterator:syntax</a></span>\n
+<span class="transliterator error">Ambiguous rule &lt;code&gt;&#65;=&gt;c&lt;/code&gt; in <a href="/wiki/MediaWiki:Transliterator:ambiguous" title="MediaWiki:Transliterator:ambiguous">MediaWiki:Transliterator:ambiguous</a></span>\n
+<span class="transliterator error">Invalid syntax &lt;code&gt;{{subst:MediaWiki:Transliterator:el}}&lt;/code&gt; in <a href="/wiki/MediaWiki:Transliterator:overlong" title="MediaWiki:Transliterator:overlong">MediaWiki:Transliterator:overlong</a></span>\n
+<span class="transliterator error">Rule &lt;code&gt;maybe a huge rule will work =&gt; no it won&#39;t&lt;/code&gt; has more than 10 characters on the left in <a href="/wiki/MediaWiki:Transliterator:rulelength" title="MediaWiki:Transliterator:rulelength">MediaWiki:Transliterator:rulelength</a></span>\n

The i18n messages contain html such as <code> but the wfMessage() calls use ->escaped().

Due to 36161006703148e0051b6c3a5973ad3cb53137eb for T70750

Example:

"transliterator-error-ambiguous": "Ambiguous rule <code>$1</code> in [[MediaWiki:$2]]",

Is used in code via:

wfMessage( 'transliterator-error-ambiguous', $line, $mappage )->escaped();

Which results in Ambiguous rule &lt;code&gt;&#65;=&gt;c&lt;/code&gt;...

Event Timeline

hashar created this task.Jul 7 2018, 9:12 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 7 2018, 9:12 PM
hashar closed this task as Declined.

I am getting the extension archived instead: T199103