Added support for to our Android, RESX and XLIFF parser
It was terrible!
Almost the whole day, deep focus, slow progress, complicated like hell to keep it fully backward compatible... Stressful but challenging!
XLIFF and RESX are quite simple to do because they are XML-compliant. So, the parser only needs to skip the whole CDATA section (and keep it exactly as is) and only process surrounding tags and texts.
Android XML is hell. It's an XML file but with different handling of spaces and some characters. We could keep it as is, but to make it more comfortable for translators, we parse the input texts to keep all the important information and make it much cleaner. When writing the output file, we need to convert it back. And now, with CDATA, it means to consider another factor on input and output.
Based on my own experience, I know that there are services that don't even bother with this. But we are not like this. It's not the right way how to do things.
Almost the whole day, deep focus, slow progress, complicated like hell to keep it fully backward compatible... Stressful but challenging!
XLIFF and RESX are quite simple to do because they are XML-compliant. So, the parser only needs to skip the whole CDATA section (and keep it exactly as is) and only process surrounding tags and texts.
Android XML is hell. It's an XML file but with different handling of spaces and some characters. We could keep it as is, but to make it more comfortable for translators, we parse the input texts to keep all the important information and make it much cleaner. When writing the output file, we need to convert it back. And now, with CDATA, it means to consider another factor on input and output.
Based on my own experience, I know that there are services that don't even bother with this. But we are not like this. It's not the right way how to do things.