Regex/Mac Strings: handle slash escaping

Create issue
Issue #1026 resolved
Chase Tingley created an issue

Apple’s localization strings format has a backslash-based escaping mechanism:

Attached: sample


$ -fc okf_regex-macStrings -x test.strings

Look at test.strings.xlf and observe that the escaped quotes are still escaped, which is incorrect. Now update the <target> and remove the slashes, like this:

<source xml:lang="en">test \"string\"</source>
<target xml:lang="fr">test string</target>

Then merge:

$ -fc okf_regex-macStrings -m test.strings.xlf 

In the output file, observe that the slashes were not restored. This is also incorrect.

My understanding from the code is that the useBSlashEscape parameter in the regex filter should control this, at least on export. However, for some reason it doesn’t seem to function correctly.