- edited description
- attached test.strings
Regex/Mac Strings: handle slash escaping
Issue #1026
resolved
Apple’s localization strings format has a backslash-based escaping mechanism: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/LoadingResources/Strings/Strings.html#//apple_ref/doc/uid/10000051i-CH6-SW13
Attached: sample
Extract:
$ tikal.sh -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:
$ tikal.sh -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.
Comments (3)
-
reporter -
reporter - changed title to Regex/Mac Strings: handle slash escaping
- marked as enhancement
-
reporter - changed status to resolved
- Log in to comment