Skip to content

Commit

Permalink
export key
Browse files Browse the repository at this point in the history
  • Loading branch information
cescofry committed Jul 17, 2013
1 parent 41b4fa3 commit 5454015
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Strings/ZFStringsConverter.m
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
#import "ZFTranslationLine.h"
#import "CHCSVParser.h"

#define EXPORT_KEY @"key"

@implementation ZFStringsConverter

#pragma mark - Strings
Expand Down Expand Up @@ -286,7 +288,7 @@ - (NSString *)xmlStringFromLang:(ZFLangFile *)file {
#pragma mark - CSV

- (NSString *)csvFromFromLang:(ZFLangFile *)file defaultLang:(ZFLangFile *)defaultFile missingOnly:(BOOL)isMissingOnly {
NSMutableArray *normalizedTranslations = [NSMutableArray arrayWithArray:@[@"keys", defaultFile.idiom, file.idiom]];
NSMutableArray *normalizedTranslations = [NSMutableArray arrayWithArray:@[EXPORT_KEY, defaultFile.idiom, file.idiom]];
[file.translations enumerateObjectsUsingBlock:^(ZFTranslationLine *line, NSUInteger idx, BOOL *stop) {

if (isMissingOnly && (line.value.length > 0)) return;
Expand Down Expand Up @@ -314,7 +316,7 @@ - (NSArray *)translationsFromCSVAtURL:(NSURL *)stringsURL idiom:(NSString *)idio
[allComponents enumerateObjectsUsingBlock:^(NSDictionary *dict, NSUInteger idx, BOOL *stop) {
if ([[dict allKeys] count] == 0) return;

NSString *key = [dict objectForKey:@"keys"];
NSString *key = [dict objectForKey:EXPORT_KEY];
if (key.length == 0) return;

ZFTranslationLine *line = [ZFTranslationLine line];
Expand Down

0 comments on commit 5454015

Please sign in to comment.