Skip to content

Commit

Permalink
Better genstrings arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanceriu committed Sep 2, 2013
1 parent a0bd2dd commit f296d1c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions SCStringsUtility/SCStringsController.m
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,9 @@ - (void)importProjectAtPath:(NSString *)path
[self executeGenStringsAtPath:[self.project.filePath stringByDeletingLastPathComponent] withRoutine:genstringsRoutine positionalParameters:includePositionalParameters];
SCReader *genstringsOutputReader = [[SCReader alloc] initWithPath:[NSTemporaryDirectory() stringByAppendingPathComponent:kKeyStringsFile]];
NSString *comment, *key, *translation;
while([genstringsOutputReader getNextComment:&comment key:&key translation:&translation])
while([genstringsOutputReader getNextComment:&comment key:&key translation:&translation]) {
[self.translationsDictionary setObject:[NSMutableDictionary dictionaryWithObject:comment forKey:kKeyComment] forKey:key];
}

[self setFilteredTranslationsDictionary:[self.translationsDictionary mutableCopy]];

Expand All @@ -238,7 +239,7 @@ -(void)executeGenStringsAtPath:(NSString*)path withRoutine:(NSString*)routine po

NSString *tempFilePath = NSTemporaryDirectory();

NSString *argument = [NSString stringWithFormat:@"find . -name '*.m' | xargs genstrings -o %@", tempFilePath];
NSString *argument = [NSString stringWithFormat:@"find ./ -name *.m -print0| xargs -0 genstrings -o %@", tempFilePath];
if([routine length]) argument = [argument stringByAppendingString:[NSString stringWithFormat:@" -s %@", routine]];
if(!positionalParameters) argument = [argument stringByAppendingString:@" -noPositionalParameters"];

Expand Down

0 comments on commit f296d1c

Please sign in to comment.