Page MenuHomeWickedGov Phorge

i18nParserTests.txt
No OneTemporary

Size
1003 B
Referenced Files
None
Subscribers
None

i18nParserTests.txt

# I18n tests
# i18ntag inserts a span with the message with the i18n key provided in the tag content
# i18nattr inserts a span with the attribute provided in the tag attribute (supposed to be a single attribute)
!! options
version=2
i18next=1
!! end
!! test
Check insertion of i18n messages
!! options
i18next=1
!! wikitext
<i18ntag>message.key</i18ntag>
!! html/parsoid
<p><span typeof="mw:I18n mw:Extension/i18ntag" about="#mwt2" data-mw='{"name":"i18ntag","attrs":{},"body":{"extsrc":"message.key"}}' data-mw-i18n='{"/":{"lang":"x-page","key":"message.key","params":null}}'></span></p>
!! end
!! test
Check insertion of i18n attributes
!! options
i18next=1
!! wikitext
<i18nattr message="message.key">some text</i18nattr>
!! html/parsoid
<p><span typeof="mw:LocalizedAttrs mw:Extension/i18nattr" data-mw='{"name":"i18nattr","attrs":{"message":"message.key"},"body":{"extsrc":"some text"}}' data-mw-i18n='{"message":{"lang":"x-user","key":"message.key","params":null}}'>some text</span></p>
!! end

File Metadata

Mime Type
text/plain
Expires
Oct 4 2026, 05:30 (5 w, 16 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
ea/a9/1cd19bff920d67476f023631bc76
Default Alt Text
i18nParserTests.txt (1003 B)

Event Timeline