1

Xcode 6.3.2 introduced a new bug in the "Export for Localization" parser: Newline characters (e.g. "\n") included in source language strings, are cancelled out in their corresponding target language strings (e.g. "\n"). This causes the symbol for new line characters to appear in the compiled app, instead of an actual new line.

Fortunately, a previous major bug in the parser is fixed in this release: Error while "Export For Localization.." Xcode 6.3

Anyone have suggestions for a work around, aside from manually altering the strings file for each instance of this bug?

Community
  • 1
  • 1
josephap
  • 2,075
  • 17
  • 24

1 Answers1

0

Performing a "find, replace all" works for now.

  1. Open the effected strings file.
  2. Search for "\n"
  3. Select replace and add "\n" to the field.
  4. Click the "All" button.

While this works, its a bit tedious to do every time translations are updated.

NOTE: You may notice that the source string in the .strings file is broken up on multiple lines, as opposed to showing the newline symbol "\n" explicitly in the string on one line. This is also a new bug, but it doesn't seem to effect strings at runtime.

Also, I cannot think of a reason why anyone would want the string "\n" to actually appear in their app, but if you are unsure, you should review each change using git.

josephap
  • 2,075
  • 17
  • 24