-
Notifications
You must be signed in to change notification settings - Fork 26
Description
Description:
It seems Localized.strings must never contain a row like this:
"" = "";
If it does, the localization tables will mess up, and the application will complain it does not find strings in Foundation framework.
App warning looks like this:
Localizable string "(A Document Being Saved By %@)" not found in strings table "Document" of bundle CFBundle 0x12e508f60 </System/Library/Frameworks/Foundation.framework>
(need to have -NSShowNonLocalizedStrings YES as startup argument to enable the warning)
The original genstrings tool will not include empty strings, but output a warning.
DTLocalizableStringScanner unfortunately does include the empty string, and thus, the output is broken.
Proposed fix:
Make sure empty strings are never included in the output.
This can be done by adding:
if([key compare:@""""] == NSOrderedSame) {
continue;
}
in the for-loop in [DTLocalizableStringTable stringRepresentationWithEncoding], but there are probably better ways to do it :)