Skip to content

Commit

Permalink
porting of iOS/Andorid name while merging LAng files
Browse files Browse the repository at this point in the history
  • Loading branch information
cescofry committed Jun 28, 2013
1 parent 08fcfa5 commit b3f8e16
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Strings/ZFLangFile.m
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ - (BOOL)mergeWithFile:(ZFLangFile *)file {
[self.iOStranslations setObject:obj forKey:key];
mergeIOS = YES;
}];
if (!self.iOSName && file.iOSName) self.iOSName = file.iOSName;

__block BOOL mergeAndroid = NO;
[file.androidTranslations enumerateKeysAndObjectsUsingBlock:^(NSString *key, NSDictionary *obj, BOOL *stop) {
Expand All @@ -143,6 +144,10 @@ - (BOOL)mergeWithFile:(ZFLangFile *)file {
mergeAndroid = YES;
}];


if (!self.androidName && file.androidName) self.androidName = file.androidName;


BOOL didMerge = (mergeIOS || mergeAndroid);
if (didMerge) {
self.allKeys = nil;
Expand Down

0 comments on commit b3f8e16

Please sign in to comment.