wilinz / globalization-translator

Intellij platform i18n plugin,Generate 131 languages ​​for your application with one click,Support Android strings.xml and java properties file
GNU General Public License v3.0
16 stars 2 forks source link

Unexpected behavior when XML tags included in strings #4

Open imReker opened 1 year ago

imReker commented 1 year ago
  1. The order of statements gets messed up.
  2. XML tags in the string will produce unexpected new line.
  3. XML namespace is expanded to every tags.

For example:

<?xml version="1.0"?>
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
    <string name="test">aaaaa<xliff:g>%s</xliff:g>bbbbb<font size="22">ccccc</font></string>
</resources>

will be translated to

<?xml version="1.0"?>
<resources>
  <string name="test">
    <xliff:g xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">%s</xliff:g><font size="22">ccccc</font>aaaaabbbbb
  </string>
</resources>

谢谢

wilinz commented 1 year ago

Problem to be investigated.