!! options version=2 parsoid-compatible=wt2html,wt2wt !! end # Force the test runner to ensure the extension is loaded !! functionhooks translation !! endfunctionhooks !! article Template:1x !! text {{{1}}} !! endarticle !! test #translation as magic word for valid language code !! options title=[[Test/mr]] !! wikitext {{#translation:}} !! html/php
/mr
!! html/parsoid/mr
!! end !! test #translation as magic word for source page !! options title=[[Test]] !! wikitext {{#translation:}} !! html/php !! html/parsoid !! end !! test #translation as magic word for invalid language code !! options title=[[Test/ugaaa]] !! wikitext {{#translation:}} !! html !! html/parsoid !! end !! test Old tvar syntax should not break too hard. !! options # html2wt and wt2wt are expected to break because we serialize to new syntax. # html2html breaks because the wtOffsets break. parsoid={ "modes": ["wt2html", "selser"] } !! wikitextpouet
!! end !! test Old tvar syntax should not pull content in cell attributes !! options # html2wt and wt2wt are expected to break because we serialize to new syntax. # html2html breaks because the wtOffsets break. parsoid={ "modes": ["wt2html", "selser"] } !! wikitext {| |hello variable |
translate 1 translate 2
!! end !! test tvar in a template should get stripped !! options parsoid={ "modes": ["wt2html"] } !! wikitexthello
!! end !! test tvar with old syntax containing template markup should not break !! options parsoid={ "modes": ["wt2html"] } !! wikitexthello world<tvar
!! end