translate/translate

CDATA support in Android

nijel opened this issue · 1 comments

nijel commented

Right now the Android strings format does not deal with CDATA. This breaks quotes as it applies unquoting to it's content.

See WeblateOrg/weblate#1211 (comment) for more details

rwrx commented

Hello @nijel unfortunately we do have the same problem with Android XML strings which does contain HTML markup. For example we do have this XML string:

<string name="dialog_storage_permission_info" formatted="false"><Data><![CDATA[
    <html><head>
      <style type=\"text/css\">
        body { margin: 0px; }
      </style></head><body>
      <div style=\"background-color: transparent; color: %1$s; padding: %2$dpx;\">
        <p>This app requires <strong>permission to access all files</strong> on the storage.</p>
        <p>This permission <strong>allows</strong> this app to <strong>open</strong> and <strong>save</strong> files <strong>anywhere</strong> on the <strong>storage</strong>.</p>
        <p>This app <strong>only access files</strong> you are <strong>opening</strong> or <strong>saving</strong>.</p>
        <p>It does <strong>NOT access</strong> any other <strong>files</strong> on the <strong>storage</strong>.</p>
      </div>
    </body></html>
    ]]></Data>
</string>

And in Weblate it is shown this way:

screenshot

Which is very hard for translator to translate. Do you have some news for this issue? We would very appreciate if it will be possible to show these kinds of strings as they are raw XML or HTML.

Thank you a lot for creating Weblate, it is a great tool for translations.