Permalink
Browse files

Added support for the new China region - 1.0.20b

Added support for the new China region. I am assuming the Abreviation
for China is "CN". If it's not I will have to make additional
modifications. Also incremented to 1.0.20b
  • Loading branch information...
1 parent 5ea5580 commit 81222735a3817a8ca1bb5136783bdd19a57b19fa @nglayton nglayton committed Dec 18, 2011
View
@@ -141,6 +141,7 @@ - (ReportRegion) reportRegion
else if ([cntry_code isEqualToString:@"MX"]) region=ReportRegionMexico;
else if ([cntry_code isEqualToString:@"CH"]) region=ReportRegionSwitzerland;
else if ([cntry_code isEqualToString:@"NO"]) region=ReportRegionNorway;
+ else if ([cntry_code isEqualToString:@"CN"]) region=ReportRegionChina;
else region=ReportRegionRestOfWorld;
@@ -71,6 +71,7 @@ - (ReportRegion)regionFromCode:(NSString *)regionCode
else if ([regionCode isEqualToString:@"CH"]) region = ReportRegionSwitzerland;
else if ([regionCode isEqualToString:@"NO"]) region = ReportRegionNorway;
else if ([regionCode isEqualToString:@"NZ"]) region = ReportRegionNewZealand;
+ else if ([regionCode isEqualToString:@"CN"]) region = ReportRegionChina;
else region = ReportRegionUnknown;
return region;
@@ -129,6 +130,10 @@ - (ReportRegion)regionFromString:(NSString *)string
{
return ReportRegionSwitzerland;
}
+ if ([string isEqualToString:@"China"])
+ {
+ return ReportRegionChina;
+ }
return ReportRegionUnknown;
View
@@ -17,4 +17,5 @@ typedef enum {
ReportRegionMexico = 8,
ReportRegionSwitzerland = 9,
ReportRegionNorway = 10,
- ReportRegionNewZealand = 11} ReportRegion;
+ ReportRegionNewZealand = 11,
+ ReportRegionChina = 12} ReportRegion;
View
@@ -998,6 +998,8 @@ - (NSString *)shortNameForRegion:(ReportRegion)reportRegion
return @"NO";
case ReportRegionSwitzerland:
return @"CH";
+ case ReportRegionChina:
+ return @"CN";
default:
return @"??";
}
@@ -1084,6 +1086,9 @@ - (NSString *)listDescriptionShorter:(BOOL)shorter
case ReportRegionSwitzerland:
region_name = @"Switzerland";
break;
+ case ReportRegionChina:
+ region_name = @"China";
+ break;
default:
region_name = @"Invalid Region";
}
View
@@ -32,7 +32,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
- <string>1.0.19b</string>
+ <string>1.0.20b</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSMainNibFile</key>

0 comments on commit 8122273

Please sign in to comment.