| 1 |
# I18n tests |
| 2 |
# i18ntag inserts a span with the message with the i18n key provided in the tag content |
| 3 |
# i18nattr inserts a span with the attribute provided in the tag attribute (supposed to be a single attribute) |
| 4 |
|
| 5 |
!! options |
| 6 |
version=2 |
| 7 |
i18next=1 |
| 8 |
!! end |
| 9 |
|
| 10 |
!! test |
| 11 |
Check insertion of i18n messages |
| 12 |
!! options |
| 13 |
i18next=1 |
| 14 |
!! wikitext |
| 15 |
<i18ntag>message.key</i18ntag> |
| 16 |
!! html/parsoid |
| 17 |
<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> |
| 18 |
!! end |
| 19 |
|
| 20 |
!! test |
| 21 |
Check insertion of i18n attributes |
| 22 |
!! options |
| 23 |
i18next=1 |
| 24 |
!! wikitext |
| 25 |
<i18nattr message="message.key">some text</i18nattr> |
| 26 |
!! html/parsoid |
| 27 |
<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> |
| 28 |
!! end |