1

When I'm trying to export my files for translation I'm getting this log:

[MT] DVTAssertions: Warning in /Library/Caches/com.apple.xbs/Sources/IDEFrameworks/IDEFrameworks-12169/IDEFoundation/Localization/IDELocalizationWork.m:355 Details: Failed to read strings file "/var/folders/ny/054nwfjs63v3v9rlpkfbt94w0000gn/T/Xcode3SourceStringsAdaptor-EAAAA7F1-000C-432D-BB22-49394ECF78A9/Localizable.strings", underlying error: The data couldn’t be read because it isn’t in the correct format. Object: Method: -work Thread: {number = 1, name = main} Please file a bug at http://bugreport.apple.com with this warning message and any useful information you can provide.

I have checked this file, it doesn't belong to my files and it is empty. Why Xcode is trying go localize this file instead of my project Localizable.strings? Xcode is creating new, empty file in new temp folder every time I try to export.

I'm using String extension that is adding localized computed var like in here

Community
  • 1
  • 1
Prettygeek
  • 2,461
  • 3
  • 22
  • 44

1 Answers1

2

Turns out that export tool scans for NSLocalizedString calls in code of Your app. With String extension it is not able to parse source files successfully.

After replacing all "text_id".localized calls with NSLocalizedString("text_id", comment: ""), export works fine.

Hope it will help someone.

Prettygeek
  • 2,461
  • 3
  • 22
  • 44