SteveKChiu / ios-res-tool

Convert string resources between iOS, Android and CSV
MIT License
24 stars 10 forks source link

bugfix: prevent repeated string escaping #5

Closed Johnson145 closed 5 years ago

Johnson145 commented 5 years ago

The current script contains a bug: missing translations are replaced by the base language. That's alright. However, those base translations get escaped multiple times, because your code processes the same String object multiple times by reference. E.g. "Foo" gets \\\\"Foo\\\\" instead of \\"Foo\\". You can fix this by copying the String values instead of using their references.