-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding translation line as entity. shaving recursion + on the way to …
…have comments
- Loading branch information
Showing
10 changed files
with
143 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// | ||
// ZFTranslationLine.h | ||
// Strings | ||
// | ||
// Created by Francesco on 29/06/2013. | ||
// Copyright (c) 2013 ziofritz. All rights reserved. | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
typedef enum { | ||
ZFTranslationLineTypeString, | ||
ZFTranslationLineTypeFormattedString, | ||
ZFTranslationLineTypeComment | ||
}ZFTranslationLineType; | ||
|
||
@interface ZFTranslationLine : NSObject | ||
|
||
@property (nonatomic, strong) NSString *key; | ||
@property (nonatomic, strong) NSString *value; | ||
@property (nonatomic, assign) ZFTranslationLineType type; | ||
@property (nonatomic, assign) NSUInteger position; | ||
|
||
+(ZFTranslationLine *)line; | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// | ||
// ZFTranslationLine.m | ||
// Strings | ||
// | ||
// Created by Francesco on 29/06/2013. | ||
// Copyright (c) 2013 ziofritz. All rights reserved. | ||
// | ||
|
||
#import "ZFTranslationLine.h" | ||
|
||
@implementation ZFTranslationLine | ||
|
||
+(ZFTranslationLine *)line { | ||
ZFTranslationLine *line = [[ZFTranslationLine alloc] init]; | ||
return line; | ||
} | ||
|
||
- (void)setValue:(NSString *)value { | ||
_value = value; | ||
self.type = ([_value rangeOfString:@"%"].location == NSNotFound)? ZFTranslationLineTypeString : ZFTranslationLineTypeFormattedString; | ||
} | ||
|
||
@end |
Oops, something went wrong.