Skip to content

Commit dd8e2f0

Browse files
committed
DTLocalizableStringAggregator: added 'customTableName' property.
Removed default table name from DTLocalizableStringEntry.
1 parent f57dfbf commit dd8e2f0

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

Core/Source/DTLocalizableStringAggregator.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
@property (nonatomic, assign) NSStringEncoding inputEncoding;
1616
@property (nonatomic, retain) NSSet *tablesToSkip;
1717
@property (nonatomic, retain) NSString *customMacroPrefix;
18+
@property (nonatomic, retain) NSString *customTableName;
1819

1920
- (void)beginProcessingFile:(NSURL *)fileURL;
2021

Core/Source/DTLocalizableStringAggregator.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ @implementation DTLocalizableStringAggregator
3737
@synthesize inputEncoding = _inputEncoding;
3838
@synthesize tablesToSkip = _tablesToSkip;
3939
@synthesize customMacroPrefix = _customMacroPrefix;
40+
@synthesize customTableName = _customTableName;
4041

4142
- (id)init
4243
{
@@ -150,6 +151,9 @@ - (void)addEntryToTables:(DTLocalizableStringEntry *)entry
150151
_stringTables = [NSMutableDictionary dictionary];
151152
}
152153

154+
if ([entry.tableName length] == 0)
155+
entry.tableName = _customTableName ?: @"Localizable";
156+
153157
NSString *tableName = [entry tableName];
154158

155159
BOOL shouldSkip = [_tablesToSkip containsObject:tableName];

Core/Source/DTLocalizableStringEntry.m

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -75,15 +75,6 @@ - (NSString *)_stringByRecognizingNil:(NSString *)string
7575

7676
#pragma mark Properties
7777

78-
- (NSString *)tableName
79-
{
80-
if ([_tableName length] == 0)
81-
{
82-
return @"Localizable";
83-
}
84-
return _tableName;
85-
}
86-
8778
- (void)setTableName:(NSString *)tableName
8879
{
8980
tableName = [tableName stringByReplacingSlashEscapes];

0 commit comments

Comments
 (0)