Changeset 483 for apps/iphone/superbook
- Timestamp:
- 07/28/09 12:13:39 (4 years ago)
- Location:
- apps/iphone/superbook/trunk/DotTel_SDK
- Files:
-
- 4 modified
-
Classes/RecordNaptr.m (modified) (3 diffs)
-
English.lproj/DotTel.strings (modified) (1 diff)
-
French.lproj/DotTel.strings (modified) (1 diff)
-
Russian.lproj/DotTel.strings (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
apps/iphone/superbook/trunk/DotTel_SDK/Classes/RecordNaptr.m
r382 r483 32 32 - (void)parseServices:(NSString *)services; 33 33 - (BOOL)tokenIsLih:(NSString *)token; 34 - (void)appendLIHToDescription:(NSMutableString *)theDesc; 35 - (void)appendServiceToDescription:(NSMutableString *)theDesc; 34 36 - (NSString *)generateServiceDescription; 35 37 - (NSString *)generateLabelDescription; … … 194 196 } 195 197 196 - (NSString *)generateServiceDescription { 197 // Create the service description string, concatenating all service types and LIH 198 NSMutableString *theDesc = [[[NSMutableString alloc] initWithCapacity:30] autorelease]; 199 NSMutableString *servicePart = [NSMutableString stringWithString:@""]; 200 201 if (! isTerminal) { 202 [theDesc appendFormat:@"%@:", LocTelStr(@"ntn")]; 203 return theDesc; 204 } 205 198 - (void)appendLIHToDescription:(NSMutableString *)theDesc { 206 199 NSString *aPart; 207 NSInteger i = 0, j = 0; // i is # of LIH, j is # of service types 208 // Start with LIH 200 NSInteger i = 0; 209 201 for (aPart in lihArray) { 210 202 if (i == 0) { 211 [theDesc setString:LocTelStr(aPart)];203 [theDesc appendString:LocTelStr(aPart)]; 212 204 } else { 213 [theDesc appendFormat:@" and%@", LocTelStr(aPart)];205 [theDesc appendFormat:@" & %@", LocTelStr(aPart)]; 214 206 } 215 207 i++; 216 } 217 // Add a separator between LIH and service if there are LIH 218 if (i > 0) { 219 [theDesc appendString:@" "]; 220 } 221 222 i = 0; 208 } 209 } 210 211 - (void)appendServiceToDescription:(NSMutableString *)theDesc { 212 NSString *aPart; 213 NSMutableString *servicePart = [NSMutableString stringWithString:@""]; 214 NSInteger i = 0; 215 NSInteger j = 0; 223 216 for (aPart in serviceTypeArray) { 224 217 NSMutableString *strVal = [NSMutableString stringWithString:LocTelStr(aPart)]; … … 248 241 } 249 242 [theDesc appendString:servicePart]; 243 } 244 245 - (NSString *)generateServiceDescription { 246 // Create the service description string, concatenating all service types and LIH 247 NSMutableString *theDesc = [[[NSMutableString alloc] initWithCapacity:30] autorelease]; 248 249 if (! isTerminal) { 250 [theDesc appendFormat:@"%@:", LocTelStr(@"ntn")]; 251 return theDesc; 252 } 253 254 BOOL startWithLIH = [LocTelStr(@"LIH Position") isEqualToString:@"1"]; 255 if (startWithLIH) { 256 [self appendLIHToDescription:theDesc]; 257 // Add a separator between LIH and service if there are LIH 258 if ([theDesc length] > 0) { 259 [theDesc appendString:@" "]; 260 } 261 [self appendServiceToDescription:theDesc]; 262 } else { 263 [self appendServiceToDescription:theDesc]; 264 [theDesc appendString:@" "]; 265 NSInteger dl = [theDesc length]; 266 [self appendLIHToDescription:theDesc]; 267 if ([theDesc length] == dl) { // no LIH, remove the last space 268 [theDesc deleteCharactersInRange:NSMakeRange(dl-1, 1)]; 269 } 270 } 271 250 272 return theDesc; 251 273 } -
apps/iphone/superbook/trunk/DotTel_SDK/English.lproj/DotTel.strings
r473 r483 79 79 "sa" = "Service Area"; // e.g. "Hertfordshire, Essex, Cambridgeshire" 80 80 "aux" = "Auxiliary Data"; 81 82 /* Other */ 83 "LIH Position" = "1"; // Set to 1 for 'Work Phone', to 2 for 'Phone Work' -
apps/iphone/superbook/trunk/DotTel_SDK/French.lproj/DotTel.strings
r476 r483 79 79 "sa" = "Service"; // e.g. "Hertfordshire, Essex, Cambridgeshire" 80 80 "aux" = "Données auxiliaires"; 81 82 83 /* Other */ 84 "LIH Position" = "2"; // Set to 1 for 'Work Phone', to 2 for 'Phone Work' -
apps/iphone/superbook/trunk/DotTel_SDK/Russian.lproj/DotTel.strings
r481 r483 79 79 "sa" = "ÐПМа ПбÑлÑжОваМОÑ"; // e.g. "Hertfordshire, Essex, Cambridgeshire" 80 80 "aux" = "ÐПпПлМОÑелÑÐœÐ°Ñ ÐžÐœÑПÑЌаÑОÑ"; 81 82 83 /* Other */ 84 "LIH Position" = "2"; // Set to 1 for 'Work Phone', to 2 for 'Phone Work'








