feat(xmb/xtb): support dtd

This commit is contained in:
Victor Berchet
2016-07-29 13:07:01 -07:00
parent 44093905e2
commit e34a04d2ad
5 changed files with 102 additions and 19 deletions

View File

@ -16,6 +16,27 @@ describe('template i18n extraction output', () => {
it('should extract i18n messages', () => {
const EXPECTED = `<? xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE messagebundle [
<!ELEMENT messagebundle (msg)*>
<!ATTLIST messagebundle class CDATA #IMPLIED>
<!ELEMENT msg (#PCDATA|ph|source)*>
<!ATTLIST msg id CDATA #IMPLIED>
<!ATTLIST msg seq CDATA #IMPLIED>
<!ATTLIST msg name CDATA #IMPLIED>
<!ATTLIST msg desc CDATA #IMPLIED>
<!ATTLIST msg meaning CDATA #IMPLIED>
<!ATTLIST msg obsolete (obsolete) #IMPLIED>
<!ATTLIST msg xml:space (default|preserve) "default">
<!ATTLIST msg is_hidden CDATA #IMPLIED>
<!ELEMENT source (#PCDATA)>
<!ELEMENT ph (#PCDATA|ex)*>
<!ATTLIST ph name CDATA #REQUIRED>
<!ELEMENT ex (#PCDATA)>
]>
<messagebundle>
<msg id="5a2858f1" desc="desc" meaning="meaning">translate me</msg>
</messagebundle>`;