summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile5
-rw-r--r--platform/darwin/src/MGLClockDirectionFormatter.m6
-rw-r--r--platform/darwin/src/MGLCompassDirectionFormatter.m128
-rw-r--r--platform/darwin/src/MGLCoordinateFormatter.m60
-rw-r--r--platform/darwin/src/NSBundle+MGLAdditions.h4
-rw-r--r--platform/ios/app/Base.lproj/Localizable.strings138
-rw-r--r--platform/ios/app/LaunchScreen.storyboard (renamed from platform/ios/app/Base.lproj/LaunchScreen.storyboard)0
-rw-r--r--platform/ios/app/MBXOfflinePacksTableViewController.m28
-rw-r--r--platform/ios/app/MBXViewController.m68
-rw-r--r--platform/ios/app/Main.storyboard (renamed from platform/ios/app/Base.lproj/Main.storyboard)0
-rw-r--r--platform/ios/ios.xcodeproj/project.pbxproj70
-rw-r--r--platform/ios/resources/Base.lproj/Foundation.strings388
-rw-r--r--platform/ios/resources/Base.lproj/Localizable.strings88
-rw-r--r--platform/ios/resources/en.lproj/Foundation.stringsdict6
-rw-r--r--platform/ios/src/MGLAPIClient.m4
-rw-r--r--platform/ios/src/MGLMapView.mm42
-rw-r--r--platform/ios/src/MGLUserLocation.m2
-rw-r--r--platform/ios/src/MGLUserLocationAnnotationView.m2
18 files changed, 449 insertions, 590 deletions
diff --git a/Makefile b/Makefile
index 81dc14e6d6..96598011a9 100644
--- a/Makefile
+++ b/Makefile
@@ -125,11 +125,10 @@ ifabric: $(IOS_PROJ_PATH)
idocument:
OUTPUT=$(OUTPUT) ./platform/ios/scripts/document.sh
-igenstrings:
- genstrings -u -o platform/ios/app/Base.lproj platform/ios/app/*.{m,mm}
+ilocalize:
genstrings -u -o platform/ios/resources/Base.lproj platform/darwin/src/*.{m,mm}
genstrings -u -o platform/ios/resources/Base.lproj platform/ios/src/*.{m,mm}
- -find platform/{darwin,ios}/ -path '*/Base.lproj/*.strings' -exec \
+ -find platform/ios/ -path '*/Base.lproj/*.strings' -exec \
textutil -convert txt -extension strings -inputencoding UTF-16 -encoding UTF-8 {} \;
#### Android targets #####################################################
diff --git a/platform/darwin/src/MGLClockDirectionFormatter.m b/platform/darwin/src/MGLClockDirectionFormatter.m
index 51a37d3674..c8c07487ba 100644
--- a/platform/darwin/src/MGLClockDirectionFormatter.m
+++ b/platform/darwin/src/MGLClockDirectionFormatter.m
@@ -23,16 +23,16 @@
NSString *format;
switch (self.unitStyle) {
case NSFormattingUnitStyleShort:
- format = NSLocalizedStringFromTable(@"%@:00", @"Foundation", @"Clock position format, short style");
+ format = NSLocalizedStringWithDefaultValue(@"CLOCK_FMT_SHORT", @"Foundation", nil, @"%@:00", @"Clock position format, short: {hours}:00");
break;
case NSFormattingUnitStyleMedium:
- format = NSLocalizedStringFromTable(@"%@ o’clock", @"Foundation", @"Clock position format, medium style");
+ format = NSLocalizedStringWithDefaultValue(@"CLOCK_FMT_MEDIUM", @"Foundation", nil, @"%@ o’clock", @"Clock position format, medium: {hours} o’clock");
break;
case NSFormattingUnitStyleLong:
- format = NSLocalizedStringFromTable(@"%@ o’clock", @"Foundation", @"Clock position format, long style");
+ format = NSLocalizedStringWithDefaultValue(@"CLOCK_FMT_LONG", @"Foundation", nil, @"%@ o’clock", @"Clock position format, long: {hours} o’clock");
break;
default:
diff --git a/platform/darwin/src/MGLCompassDirectionFormatter.m b/platform/darwin/src/MGLCompassDirectionFormatter.m
index c5dd9b4899..abf0db2da1 100644
--- a/platform/darwin/src/MGLCompassDirectionFormatter.m
+++ b/platform/darwin/src/MGLCompassDirectionFormatter.m
@@ -20,79 +20,79 @@
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
shortStrings = @[
- NSLocalizedStringFromTable(@"N", @"Foundation", @"North, short"),
- NSLocalizedStringFromTable(@"N×E", @"Foundation", @"North by east, short"),
- NSLocalizedStringFromTable(@"NNE", @"Foundation", @"North-northeast, short"),
- NSLocalizedStringFromTable(@"NE×N", @"Foundation", @"Northeast by north, short"),
- NSLocalizedStringFromTable(@"NE", @"Foundation", @"Northeast, short"),
- NSLocalizedStringFromTable(@"NE×E", @"Foundation", @"Northeast by east, short"),
- NSLocalizedStringFromTable(@"ENE", @"Foundation", @"East-northeast, short"),
- NSLocalizedStringFromTable(@"E×N", @"Foundation", @"East by north, short"),
+ NSLocalizedStringWithDefaultValue(@"COMPASS_N_SHORT", @"Foundation", nil, @"N", @"North, short"),
+ NSLocalizedStringWithDefaultValue(@"COMPASS_NxE_SHORT", @"Foundation", nil, @"N×E", @"North by east, short"),
+ NSLocalizedStringWithDefaultValue(@"COMPASS_NNE_SHORT", @"Foundation", nil, @"NNE", @"North-northeast, short"),
+ NSLocalizedStringWithDefaultValue(@"COMPASS_NExN_SHORT", @"Foundation", nil, @"NE×N", @"Northeast by north, short"),
+ NSLocalizedStringWithDefaultValue(@"COMPASS_NE_SHORT", @"Foundation", nil, @"NE", @"Northeast, short"),
+ NSLocalizedStringWithDefaultValue(@"COMPASS_NExE_SHORT", @"Foundation", nil, @"NE×E", @"Northeast by east, short"),
+ NSLocalizedStringWithDefaultValue(@"COMPASS_ENE_SHORT", @"Foundation", nil, @"ENE", @"East-northeast, short"),
+ NSLocalizedStringWithDefaultValue(@"COMPASS_ExN_SHORT", @"Foundation", nil, @"E×N", @"East by north, short"),
- NSLocalizedStringFromTable(@"E", @"Foundation", @"East, short"),
- NSLocalizedStringFromTable(@"E×S", @"Foundation", @"East by south, short"),
- NSLocalizedStringFromTable(@"ESE", @"Foundation", @"East-southeast, short"),
- NSLocalizedStringFromTable(@"SE×E", @"Foundation", @"Southeast by east, short"),
- NSLocalizedStringFromTable(@"SE", @"Foundation", @"Southeast, short"),
- NSLocalizedStringFromTable(@"SE×S", @"Foundation", @"Southeast by south, short"),
- NSLocalizedStringFromTable(@"SSE", @"Foundation", @"South-southeast, short"),
- NSLocalizedStringFromTable(@"S×E", @"Foundation", @"South by east, short"),
+ NSLocalizedStringWithDefaultValue(@"COMPASS_E_SHORT", @"Foundation", nil, @"E", @"East, short"),
+ NSLocalizedStringWithDefaultValue(@"COMPASS_ExS_SHORT", @"Foundation", nil, @"E×S", @"East by south, short"),
+ NSLocalizedStringWithDefaultValue(@"COMPASS_ESE_SHORT", @"Foundation", nil, @"ESE", @"East-southeast, short"),
+ NSLocalizedStringWithDefaultValue(@"COMPASS_SExE_SHORT", @"Foundation", nil, @"SE×E", @"Southeast by east, short"),
+ NSLocalizedStringWithDefaultValue(@"COMPASS_SE_SHORT", @"Foundation", nil, @"SE", @"Southeast, short"),
+ NSLocalizedStringWithDefaultValue(@"COMPASS_SExS_SHORT", @"Foundation", nil, @"SE×S", @"Southeast by south, short"),
+ NSLocalizedStringWithDefaultValue(@"COMPASS_SSE_SHORT", @"Foundation", nil, @"SSE", @"South-southeast, short"),
+ NSLocalizedStringWithDefaultValue(@"COMPASS_SxE_SHORT", @"Foundation", nil, @"S×E", @"South by east, short"),
- NSLocalizedStringFromTable(@"S", @"Foundation", @"South, short"),
- NSLocalizedStringFromTable(@"S×W", @"Foundation", @"South by west, short"),
- NSLocalizedStringFromTable(@"SSW", @"Foundation", @"South-southwest, short"),
- NSLocalizedStringFromTable(@"SW×S", @"Foundation", @"Southwest by south, short"),
- NSLocalizedStringFromTable(@"SW", @"Foundation", @"Southwest, short"),
- NSLocalizedStringFromTable(@"SW×W", @"Foundation", @"Southwest by west, short"),
- NSLocalizedStringFromTable(@"WSW", @"Foundation", @"West-southwest, short"),
- NSLocalizedStringFromTable(@"W×S", @"Foundation", @"West by south, short"),
+ NSLocalizedStringWithDefaultValue(@"COMPASS_S_SHORT", @"Foundation", nil, @"S", @"South, short"),
+ NSLocalizedStringWithDefaultValue(@"COMPASS_SxW_SHORT", @"Foundation", nil, @"S×W", @"South by west, short"),
+ NSLocalizedStringWithDefaultValue(@"COMPASS_SSW_SHORT", @"Foundation", nil, @"SSW", @"South-southwest, short"),
+ NSLocalizedStringWithDefaultValue(@"COMPASS_SWxS_SHORT", @"Foundation", nil, @"SW×S", @"Southwest by south, short"),
+ NSLocalizedStringWithDefaultValue(@"COMPASS_SW_SHORT", @"Foundation", nil, @"SW", @"Southwest, short"),
+ NSLocalizedStringWithDefaultValue(@"COMPASS_SWxW_SHORT", @"Foundation", nil, @"SW×W", @"Southwest by west, short"),
+ NSLocalizedStringWithDefaultValue(@"COMPASS_WSW_SHORT", @"Foundation", nil, @"WSW", @"West-southwest, short"),
+ NSLocalizedStringWithDefaultValue(@"COMPASS_WxS_SHORT", @"Foundation", nil, @"W×S", @"West by south, short"),
- NSLocalizedStringFromTable(@"W", @"Foundation", @"West, short"),
- NSLocalizedStringFromTable(@"W×N", @"Foundation", @"West by north, short"),
- NSLocalizedStringFromTable(@"WNW", @"Foundation", @"West-northwest, short"),
- NSLocalizedStringFromTable(@"NW×W", @"Foundation", @"Northwest by west, short"),
- NSLocalizedStringFromTable(@"NW", @"Foundation", @"Northwest, short"),
- NSLocalizedStringFromTable(@"NW×N", @"Foundation", @"Northwest by north, short"),
- NSLocalizedStringFromTable(@"NNW", @"Foundation", @"North-northwest, short"),
- NSLocalizedStringFromTable(@"N×W", @"Foundation", @"North by west, short"),
+ NSLocalizedStringWithDefaultValue(@"COMPASS_W_SHORT", @"Foundation", nil, @"W", @"West, short"),
+ NSLocalizedStringWithDefaultValue(@"COMPASS_WxN_SHORT", @"Foundation", nil, @"W×N", @"West by north, short"),
+ NSLocalizedStringWithDefaultValue(@"COMPASS_WNW_SHORT", @"Foundation", nil, @"WNW", @"West-northwest, short"),
+ NSLocalizedStringWithDefaultValue(@"COMPASS_NWxW_SHORT", @"Foundation", nil, @"NW×W", @"Northwest by west, short"),
+ NSLocalizedStringWithDefaultValue(@"COMPASS_NW_SHORT", @"Foundation", nil, @"NW", @"Northwest, short"),
+ NSLocalizedStringWithDefaultValue(@"COMPASS_NWxN_SHORT", @"Foundation", nil, @"NW×N", @"Northwest by north, short"),
+ NSLocalizedStringWithDefaultValue(@"COMPASS_NNW_SHORT", @"Foundation", nil, @"NNW", @"North-northwest, short"),
+ NSLocalizedStringWithDefaultValue(@"COMPASS_NxW_SHORT", @"Foundation", nil, @"N×W", @"North by west, short"),
];
longStrings = @[
- NSLocalizedStringFromTable(@"north", @"Foundation", @"North, long"),
- NSLocalizedStringFromTable(@"north by east", @"Foundation", @"North by east, long"),
- NSLocalizedStringFromTable(@"north-northeast", @"Foundation", @"North-northeast, long"),
- NSLocalizedStringFromTable(@"northeast by north", @"Foundation", @"Northeast by north, long"),
- NSLocalizedStringFromTable(@"northeast", @"Foundation", @"Northeast, long"),
- NSLocalizedStringFromTable(@"northeast by east", @"Foundation", @"Northeast by east, long"),
- NSLocalizedStringFromTable(@"east-northeast", @"Foundation", @"East-northeast, long"),
- NSLocalizedStringFromTable(@"east by north", @"Foundation", @"East by north, long"),
+ NSLocalizedStringWithDefaultValue(@"COMPASS_N_LONG", @"Foundation", nil, @"north", @"North, long"),
+ NSLocalizedStringWithDefaultValue(@"COMPASS_NxE_LONG", @"Foundation", nil, @"north by east", @"North by east, long"),
+ NSLocalizedStringWithDefaultValue(@"COMPASS_NNE_LONG", @"Foundation", nil, @"north-northeast", @"North-northeast, long"),
+ NSLocalizedStringWithDefaultValue(@"COMPASS_NExN_LONG", @"Foundation", nil, @"northeast by north", @"Northeast by north, long"),
+ NSLocalizedStringWithDefaultValue(@"COMPASS_NE_LONG", @"Foundation", nil, @"northeast", @"Northeast, long"),
+ NSLocalizedStringWithDefaultValue(@"COMPASS_NExE_LONG", @"Foundation", nil, @"northeast by east", @"Northeast by east, long"),
+ NSLocalizedStringWithDefaultValue(@"COMPASS_ENE_LONG", @"Foundation", nil, @"east-northeast", @"East-northeast, long"),
+ NSLocalizedStringWithDefaultValue(@"COMPASS_ExN_LONG", @"Foundation", nil, @"east by north", @"East by north, long"),
- NSLocalizedStringFromTable(@"east", @"Foundation", @"East, long"),
- NSLocalizedStringFromTable(@"east by south", @"Foundation", @"East by south, long"),
- NSLocalizedStringFromTable(@"east-southeast", @"Foundation", @"East-southeast, long"),
- NSLocalizedStringFromTable(@"southeast by east", @"Foundation", @"Southeast by east, long"),
- NSLocalizedStringFromTable(@"southeast", @"Foundation", @"Southeast, long"),
- NSLocalizedStringFromTable(@"southeast by south", @"Foundation", @"Southeast by south, long"),
- NSLocalizedStringFromTable(@"south-southeast", @"Foundation", @"South-southeast, long"),
- NSLocalizedStringFromTable(@"south by east", @"Foundation", @"South by east, long"),
+ NSLocalizedStringWithDefaultValue(@"COMPASS_E_LONG", @"Foundation", nil, @"east", @"East, long"),
+ NSLocalizedStringWithDefaultValue(@"COMPASS_ExS_LONG", @"Foundation", nil, @"east by south", @"East by south, long"),
+ NSLocalizedStringWithDefaultValue(@"COMPASS_ESE_LONG", @"Foundation", nil, @"east-southeast", @"East-southeast, long"),
+ NSLocalizedStringWithDefaultValue(@"COMPASS_SExE_LONG", @"Foundation", nil, @"southeast by east", @"Southeast by east, long"),
+ NSLocalizedStringWithDefaultValue(@"COMPASS_SE_LONG", @"Foundation", nil, @"southeast", @"Southeast, long"),
+ NSLocalizedStringWithDefaultValue(@"COMPASS_SExS_LONG", @"Foundation", nil, @"southeast by south", @"Southeast by south, long"),
+ NSLocalizedStringWithDefaultValue(@"COMPASS_SSE_LONG", @"Foundation", nil, @"south-southeast", @"South-southeast, long"),
+ NSLocalizedStringWithDefaultValue(@"COMPASS_SxE_LONG", @"Foundation", nil, @"south by east", @"South by east, long"),
- NSLocalizedStringFromTable(@"south", @"Foundation", @"South, long"),
- NSLocalizedStringFromTable(@"south by west", @"Foundation", @"South by west, long"),
- NSLocalizedStringFromTable(@"south-southwest", @"Foundation", @"South-southwest, long"),
- NSLocalizedStringFromTable(@"southwest by south", @"Foundation", @"Southwest by south, long"),
- NSLocalizedStringFromTable(@"southwest", @"Foundation", @"Southwest, long"),
- NSLocalizedStringFromTable(@"southwest by west", @"Foundation", @"Southwest by west, long"),
- NSLocalizedStringFromTable(@"west-southwest", @"Foundation", @"West-southwest, long"),
- NSLocalizedStringFromTable(@"west by south", @"Foundation", @"West by south, long"),
+ NSLocalizedStringWithDefaultValue(@"COMPASS_S_LONG", @"Foundation", nil, @"south", @"South, long"),
+ NSLocalizedStringWithDefaultValue(@"COMPASS_SxW_LONG", @"Foundation", nil, @"south by west", @"South by west, long"),
+ NSLocalizedStringWithDefaultValue(@"COMPASS_SSW_LONG", @"Foundation", nil, @"south-southwest", @"South-southwest, long"),
+ NSLocalizedStringWithDefaultValue(@"COMPASS_SWxS_LONG", @"Foundation", nil, @"southwest by south", @"Southwest by south, long"),
+ NSLocalizedStringWithDefaultValue(@"COMPASS_SW_LONG", @"Foundation", nil, @"southwest", @"Southwest, long"),
+ NSLocalizedStringWithDefaultValue(@"COMPASS_SWxW_LONG", @"Foundation", nil, @"southwest by west", @"Southwest by west, long"),
+ NSLocalizedStringWithDefaultValue(@"COMPASS_WSW_LONG", @"Foundation", nil, @"west-southwest", @"West-southwest, long"),
+ NSLocalizedStringWithDefaultValue(@"COMPASS_WxS_LONG", @"Foundation", nil, @"west by south", @"West by south, long"),
- NSLocalizedStringFromTable(@"west", @"Foundation", @"West, long"),
- NSLocalizedStringFromTable(@"west by north", @"Foundation", @"West by north, long"),
- NSLocalizedStringFromTable(@"west-northwest", @"Foundation", @"West-northwest, long"),
- NSLocalizedStringFromTable(@"northwest by west", @"Foundation", @"Northwest by west, long"),
- NSLocalizedStringFromTable(@"northwest", @"Foundation", @"Northwest, long"),
- NSLocalizedStringFromTable(@"northwest by north", @"Foundation", @"Northwest by north, long"),
- NSLocalizedStringFromTable(@"north-northwest", @"Foundation", @"North-northwest, long"),
- NSLocalizedStringFromTable(@"north by west", @"Foundation", @"North by west, long"),
+ NSLocalizedStringWithDefaultValue(@"COMPASS_W_LONG", @"Foundation", nil, @"west", @"West, long"),
+ NSLocalizedStringWithDefaultValue(@"COMPASS_WxN_LONG", @"Foundation", nil, @"west by north", @"West by north, long"),
+ NSLocalizedStringWithDefaultValue(@"COMPASS_WNW_LONG", @"Foundation", nil, @"west-northwest", @"West-northwest, long"),
+ NSLocalizedStringWithDefaultValue(@"COMPASS_NWxW_LONG", @"Foundation", nil, @"northwest by west", @"Northwest by west, long"),
+ NSLocalizedStringWithDefaultValue(@"COMPASS_NW_LONG", @"Foundation", nil, @"northwest", @"Northwest, long"),
+ NSLocalizedStringWithDefaultValue(@"COMPASS_NWxN_LONG", @"Foundation", nil, @"northwest by north", @"Northwest by north, long"),
+ NSLocalizedStringWithDefaultValue(@"COMPASS_NNW_LONG", @"Foundation", nil, @"north-northwest", @"North-northwest, long"),
+ NSLocalizedStringWithDefaultValue(@"COMPASS_NxW_LONG", @"Foundation", nil, @"north by west", @"North by west, long"),
];
NSAssert(shortStrings.count == longStrings.count, @"Long and short compass direction string arrays must have the same size.");
diff --git a/platform/darwin/src/MGLCoordinateFormatter.m b/platform/darwin/src/MGLCoordinateFormatter.m
index 043c14b1ff..682f771faa 100644
--- a/platform/darwin/src/MGLCoordinateFormatter.m
+++ b/platform/darwin/src/MGLCoordinateFormatter.m
@@ -22,27 +22,27 @@
NSString *stringFormat;
switch (self.unitStyle) {
case NSFormattingUnitStyleShort:
- positiveLatitudeFormat = NSLocalizedStringFromTable(@"%@N", @"Foundation", @"North latitude format, short");
- negativeLatitudeFormat = NSLocalizedStringFromTable(@"%@S", @"Foundation", @"South latitude format, short");
- positiveLongitudeFormat = NSLocalizedStringFromTable(@"%@E", @"Foundation", @"East longitude format, short");
- negativeLongitudeFormat = NSLocalizedStringFromTable(@"%@W", @"Foundation", @"West longitude format, short");
- stringFormat = NSLocalizedStringFromTable(@"%@, %@", @"Foundation", @"Latitude-longitude format, short");
+ positiveLatitudeFormat = NSLocalizedStringWithDefaultValue(@"COORD_N_SHORT", @"Foundation", nil, @"%@N", @"North latitude format, short: {latitude}");
+ negativeLatitudeFormat = NSLocalizedStringWithDefaultValue(@"COORD_S_SHORT", @"Foundation", nil, @"%@S", @"South latitude format, short: {latitude}");
+ positiveLongitudeFormat = NSLocalizedStringWithDefaultValue(@"COORD_E_SHORT", @"Foundation", nil, @"%@E", @"East longitude format, short: {longitude}");
+ negativeLongitudeFormat = NSLocalizedStringWithDefaultValue(@"COORD_W_SHORT", @"Foundation", nil, @"%@W", @"West longitude format, short: {longitude}");
+ stringFormat = NSLocalizedStringWithDefaultValue(@"COORD_FMT_SHORT", @"Foundation", nil, @"%@, %@", @"Coordinate pair format, short: {latitude}, {longitude}");
break;
case NSFormattingUnitStyleMedium:
- positiveLatitudeFormat = NSLocalizedStringFromTable(@"%@ north", @"Foundation", @"North latitude format, medium");
- negativeLatitudeFormat = NSLocalizedStringFromTable(@"%@ south", @"Foundation", @"South latitude format, medium");
- positiveLongitudeFormat = NSLocalizedStringFromTable(@"%@ east", @"Foundation", @"East longitude format, medium");
- negativeLongitudeFormat = NSLocalizedStringFromTable(@"%@ west", @"Foundation", @"West longitude format, medium");
- stringFormat = NSLocalizedStringFromTable(@"%@, %@", @"Foundation", @"Latitude-longitude format, medium");
+ positiveLatitudeFormat = NSLocalizedStringWithDefaultValue(@"COORD_N_MEDIUM", @"Foundation", nil, @"%@ north", @"North latitude format, medium: {latitude}");
+ negativeLatitudeFormat = NSLocalizedStringWithDefaultValue(@"COORD_S_MEDIUM", @"Foundation", nil, @"%@ south", @"South latitude format, medium: {latitude}");
+ positiveLongitudeFormat = NSLocalizedStringWithDefaultValue(@"COORD_E_MEDIUM", @"Foundation", nil, @"%@ east", @"East longitude format, medium: {longitude}");
+ negativeLongitudeFormat = NSLocalizedStringWithDefaultValue(@"COORD_W_MEDIUM", @"Foundation", nil, @"%@ west", @"West longitude format, medium: {longitude}");
+ stringFormat = NSLocalizedStringWithDefaultValue(@"COORD_FMT_MEDIUM", @"Foundation", nil, @"%@, %@", @"Coordinate pair format, medium: {latitude}, {longitude}");
break;
case NSFormattingUnitStyleLong:
- positiveLatitudeFormat = NSLocalizedStringFromTable(@"%@ north", @"Foundation", @"North latitude format, long");
- negativeLatitudeFormat = NSLocalizedStringFromTable(@"%@ south", @"Foundation", @"South latitude format, long");
- positiveLongitudeFormat = NSLocalizedStringFromTable(@"%@ east", @"Foundation", @"East longitude format, long");
- negativeLongitudeFormat = NSLocalizedStringFromTable(@"%@ west", @"Foundation", @"West longitude format, long");
- stringFormat = NSLocalizedStringFromTable(@"%@ by %@", @"Foundation", @"Latitude-longitude format, long");
+ positiveLatitudeFormat = NSLocalizedStringWithDefaultValue(@"COORD_N_LONG", @"Foundation", nil, @"%@ north", @"North latitude format, long: {latitude}");
+ negativeLatitudeFormat = NSLocalizedStringWithDefaultValue(@"COORD_S_LONG", @"Foundation", nil, @"%@ south", @"South latitude format, long: {latitude}");
+ positiveLongitudeFormat = NSLocalizedStringWithDefaultValue(@"COORD_E_LONG", @"Foundation", nil, @"%@ east", @"East longitude format, long: {longitude}");
+ negativeLongitudeFormat = NSLocalizedStringWithDefaultValue(@"COORD_W_LONG", @"Foundation", nil, @"%@ west", @"West longitude format, long: {longitude}");
+ stringFormat = NSLocalizedStringWithDefaultValue(@"COORD_FMT_LONG", @"Foundation", nil, @"%@ by %@", @"Coordinate pair format, long: {latitude}, {longitude}");
break;
}
NSString *latitudeString = [self stringFromLocationDegrees:coordinate.latitude
@@ -65,27 +65,27 @@
NSString *degreesMinutesSecondsFormat;
switch (self.unitStyle) {
case NSFormattingUnitStyleShort:
- degreesFormat = NSLocalizedStringFromTable(@"%d°", @"Foundation", @"Degrees format, short");
- minutesFormat = NSLocalizedStringFromTable(@"%d′", @"Foundation", @"Minutes format, short");
- secondsFormat = NSLocalizedStringFromTable(@"%d″", @"Foundation", @"Seconds format, short");
- degreesMinutesFormat = NSLocalizedStringFromTable(@"%@%@", @"Foundation", @"Degrees-minutes format, short");
- degreesMinutesSecondsFormat = NSLocalizedStringFromTable(@"%@%@%@", @"Foundation", @"Degrees-minutes-seconds format, short");
+ degreesFormat = NSLocalizedStringWithDefaultValue(@"COORD_DEG_SHORT", @"Foundation", nil, @"%d°", @"Degrees format, short: {degrees}");
+ minutesFormat = NSLocalizedStringWithDefaultValue(@"COORD_MIN_SHORT", @"Foundation", nil, @"%d′", @"Minutes format, short: {minutes}");
+ secondsFormat = NSLocalizedStringWithDefaultValue(@"COORD_SEC_SHORT", @"Foundation", nil, @"%d″", @"Seconds format, short: {seconds}");
+ degreesMinutesFormat = NSLocalizedStringWithDefaultValue(@"COORD_DM_SHORT", @"Foundation", nil, @"%@%@", @"Coordinate format, short: {degrees}{minutes}");
+ degreesMinutesSecondsFormat = NSLocalizedStringWithDefaultValue(@"COORD_DMS_SHORT", @"Foundation", nil, @"%@%@%@", @"Coordinate format, short: {degrees}{minutes}{seconds}");
break;
case NSFormattingUnitStyleMedium:
- degreesFormat = NSLocalizedStringFromTable(@"%d°", @"Foundation", @"Degrees format, medium");
- minutesFormat = NSLocalizedStringFromTable(@"%d′", @"Foundation", @"Minutes format, medium");
- secondsFormat = NSLocalizedStringFromTable(@"%d″", @"Foundation", @"Seconds format, medium");
- degreesMinutesFormat = NSLocalizedStringFromTable(@"%@%@", @"Foundation", @"Degrees-minutes format, medium");
- degreesMinutesSecondsFormat = NSLocalizedStringFromTable(@"%@%@%@", @"Foundation", @"Degrees-minutes-seconds format, medium");
+ degreesFormat = NSLocalizedStringWithDefaultValue(@"COORD_DEG_MEDIUM", @"Foundation", nil, @"%d°", @"Degrees format, medium: {degrees}");
+ minutesFormat = NSLocalizedStringWithDefaultValue(@"COORD_MIN_MEDIUM", @"Foundation", nil, @"%d′", @"Minutes format, medium: {minutes}");
+ secondsFormat = NSLocalizedStringWithDefaultValue(@"COORD_SEC_MEDIUM", @"Foundation", nil, @"%d″", @"Seconds format, medium: {seconds}");
+ degreesMinutesFormat = NSLocalizedStringWithDefaultValue(@"COORD_DM_MEDIUM", @"Foundation", nil, @"%@%@", @"Coordinate format, medium: {degrees}{minutes}");
+ degreesMinutesSecondsFormat = NSLocalizedStringWithDefaultValue(@"COORD_DMS_MEDIUM", @"Foundation", nil, @"%@%@%@", @"Coordinate format, medium: {degrees}{minutes}{seconds}");
break;
case NSFormattingUnitStyleLong:
- degreesFormat = NSLocalizedStringFromTable(@"%d degree(s)", @"Foundation", @"Degrees format, long");
- minutesFormat = NSLocalizedStringFromTable(@"%d minute(s)", @"Foundation", @"Minutes format, long");
- secondsFormat = NSLocalizedStringFromTable(@"%d second(s)", @"Foundation", @"Seconds format, long");
- degreesMinutesFormat = NSLocalizedStringFromTable(@"%@ and %@", @"Foundation", @"Degrees-minutes format, long");
- degreesMinutesSecondsFormat = NSLocalizedStringFromTable(@"%@, %@, and %@", @"Foundation", @"Degrees-minutes-seconds format, long");
+ degreesFormat = NSLocalizedStringWithDefaultValue(@"COORD_DEG_LONG", @"Foundation", nil, @"%d degree(s)", @"Degrees format, long");
+ minutesFormat = NSLocalizedStringWithDefaultValue(@"COORD_MIN_LONG", @"Foundation", nil, @"%d minute(s)", @"Minutes format, long");
+ secondsFormat = NSLocalizedStringWithDefaultValue(@"COORD_SEC_LONG", @"Foundation", nil, @"%d second(s)", @"Seconds format, long");
+ degreesMinutesFormat = NSLocalizedStringWithDefaultValue(@"COORD_DM_LONG", @"Foundation", nil, @"%@ and %@", @"Coordinate format, long: {degrees}{minutes}");
+ degreesMinutesSecondsFormat = NSLocalizedStringWithDefaultValue(@"COORD_DMS_LONG", @"Foundation", nil, @"%@, %@, and %@", @"Coordinate format, long: {degrees}{minutes}{seconds}");
break;
}
diff --git a/platform/darwin/src/NSBundle+MGLAdditions.h b/platform/darwin/src/NSBundle+MGLAdditions.h
index bab70f38bc..1fc9e8b896 100644
--- a/platform/darwin/src/NSBundle+MGLAdditions.h
+++ b/platform/darwin/src/NSBundle+MGLAdditions.h
@@ -23,6 +23,10 @@ NS_ASSUME_NONNULL_BEGIN
#define NSLocalizedStringFromTable(key, tbl, comment) \
[[NSBundle mgl_frameworkBundle] localizedStringForKey:(key) value:@"" table:(tbl)]
+#undef NSLocalizedStringWithDefaultValue
+#define NSLocalizedStringWithDefaultValue(key, tbl, bundle, val, comment) \
+ [[NSBundle mgl_frameworkBundle] localizedStringForKey:(key) value:(val) table:(tbl)]
+
@interface NSBundle (MGLAdditions)
/// Returns the bundle containing the SDK’s classes and Info.plist file.
diff --git a/platform/ios/app/Base.lproj/Localizable.strings b/platform/ios/app/Base.lproj/Localizable.strings
deleted file mode 100644
index 8eb0a3e120..0000000000
--- a/platform/ios/app/Base.lproj/Localizable.strings
+++ /dev/null
@@ -1,138 +0,0 @@
-/* Offline pack status: completed, expected, bytes */
-"%@ of %@ resources (%@)" = "%1$@ of %2$@ resources (%3$@)";
-
-/* Offline pack status: completed, bytes */
-"%@ resources (%@)" = "%1$@ resources (%2$@)";
-
-/* Title of the access token prompt */
-"Access Token" = "Access Token";
-
-/* Action in the settings action sheet */
-"Add 1,000 Points" = "Add 1,000 Points";
-
-/* Action in the settings action sheet */
-"Add 10,000 Points" = "Add 10,000 Points";
-
-/* Action in the settings action sheet */
-"Add 100 Points" = "Add 100 Points";
-
-/* Action in the settings action sheet */
-"Add Custom Callout Point" = "Add Custom Callout Point";
-
-/* Title of offline pack name prompt */
-"Add Offline Pack" = "Add Offline Pack";
-
-/* Action in the settings action sheet */
-"Add Test Shapes" = "Add Test Shapes";
-
-/* Offline pack status: expected resources */
-"at least %@" = "at least %@";
-
-/* Offline pack status */
-"Calculating progress…" = "Calculating progress…";
-
-/* No comment provided by engineer. */
-"Cancel" = "Cancel";
-
-/* Error title */
-"Can’t Add Offline Pack" = "Can’t Add Offline Pack";
-
-/* Message of offline pack name prompt */
-"Choose a name for the pack:" = "Choose a name for the pack:";
-
-/* User tracking mode */
-"Course" = "Course";
-
-/* Title of a custom callout view */
-"Custom Callout" = "Custom Callout";
-
-/* Style name */
-"Dark" = "Dark";
-
-/* Action in the settings action sheet */
-"Delete Telemetry Logfile" = "Delete Telemetry Logfile";
-
-/* Title of the button for downloading offline pack */
-"Download" = "Download";
-
-/* Offline pack status: completed, expected, bytes */
-"Downloading %@ of %@ resources (%@ so far)…" = "Downloading %1$@ of %2$@ resources (%3$@ so far)…";
-
-/* Title of a dropped pin annotation */
-"Dropped Pin" = "Dropped Pin";
-
-/* Style name */
-"Emerald" = "Emerald";
-
-/* Message of the access token prompt */
-"Enter your Mapbox access token to load Mapbox-hosted tiles and styles:" = "Enter your Mapbox access token to load Mapbox-hosted tiles and styles:";
-
-/* Error title */
-"Error Downloading Offline Pack" = "Error Downloading Offline Pack";
-
-/* Action in the settings action sheet */
-"Hide Collision Boxes" = "Hide Collision Boxes";
-
-/* Action in the settings action sheet */
-"Hide Custom Style Layer" = "Hide Custom Style Layer";
-
-/* Action in the settings action sheet */
-"Hide Tile Boundaries" = "Hide Tile Boundaries";
-
-/* Action in the settings action sheet */
-"Hide Tile Info" = "Hide Tile Info";
-
-/* Action in the settings action sheet */
-"Hide Tile Timestamps" = "Hide Tile Timestamps";
-
-/* Style name */
-"Hybrid" = "Hybrid";
-
-/* Style name */
-"Light" = "Light";
-
-/* Title of the settings action sheet */
-"Map Settings" = "Map Settings";
-
-/* Error message: name, reason */
-"Mapbox GL encountered an error while downloading the offline pack “%@”: %@" = "Mapbox GL encountered an error while downloading the offline pack “%1$@”: %2$@";
-
-/* Error message: name */
-"Mapbox GL was unable to add the offline pack “%@”." = "Mapbox GL was unable to add the offline pack “%@”.";
-
-/* No comment provided by engineer. */
-"OK" = "OK";
-
-/* Action in the settings action sheet */
-"Print Telemetry Logfile" = "Print Telemetry Logfile";
-
-/* Action in the settings action sheet */
-"Remove Annotations" = "Remove Annotations";
-
-/* Action in the settings action sheet */
-"Reset Position" = "Reset Position";
-
-/* Style name */
-"Satellite" = "Satellite";
-
-/* Action in the settings action sheet */
-"Show Collision Boxes" = "Show Collision Boxes";
-
-/* Action in the settings action sheet */
-"Show Custom Style Layer" = "Show Custom Style Layer";
-
-/* Action in the settings action sheet */
-"Show Tile Boundaries" = "Show Tile Boundaries";
-
-/* Action in the settings action sheet */
-"Show Tile Info" = "Show Tile Info";
-
-/* Action in the settings action sheet */
-"Show Tile Timestamps" = "Show Tile Timestamps";
-
-/* Action in the settings action sheet */
-"Start World Tour" = "Start World Tour";
-
-/* Style name */
-"Streets" = "Streets";
-
diff --git a/platform/ios/app/Base.lproj/LaunchScreen.storyboard b/platform/ios/app/LaunchScreen.storyboard
index 323bd43177..323bd43177 100644
--- a/platform/ios/app/Base.lproj/LaunchScreen.storyboard
+++ b/platform/ios/app/LaunchScreen.storyboard
diff --git a/platform/ios/app/MBXOfflinePacksTableViewController.m b/platform/ios/app/MBXOfflinePacksTableViewController.m
index dea443942c..008d843b1e 100644
--- a/platform/ios/app/MBXOfflinePacksTableViewController.m
+++ b/platform/ios/app/MBXOfflinePacksTableViewController.m
@@ -86,13 +86,13 @@ static NSString * const MBXOfflinePacksTableViewActiveCellReuseIdentifier = @"Ac
}
- (IBAction)addCurrentRegion:(id)sender {
- UIAlertController *alertController = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"Add Offline Pack", @"Title of offline pack name prompt") message:NSLocalizedString(@"Choose a name for the pack:", @"Message of offline pack name prompt") preferredStyle:UIAlertControllerStyleAlert];
+ UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"Add Offline Pack" message:@"Choose a name for the pack:" preferredStyle:UIAlertControllerStyleAlert];
[alertController addTextFieldWithConfigurationHandler:^(UITextField * _Nonnull textField) {
textField.placeholder = [NSString stringWithFormat:@"%@", MGLStringFromCoordinateBounds(self.mapView.visibleCoordinateBounds)];
}];
- [alertController addAction:[UIAlertAction actionWithTitle:NSLocalizedString(@"Cancel", @"") style:UIAlertActionStyleCancel handler:nil]];
+ [alertController addAction:[UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:nil]];
- UIAlertAction *downloadAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"Download", @"Title of the button for downloading offline pack") style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
+ UIAlertAction *downloadAction = [UIAlertAction actionWithTitle:@"Download" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
MGLMapView *mapView = self.mapView;
NSAssert(mapView, @"No map view to get the current region from.");
@@ -109,9 +109,9 @@ static NSString * const MBXOfflinePacksTableViewActiveCellReuseIdentifier = @"Ac
[[MGLOfflineStorage sharedOfflineStorage] addPackForRegion:region withContext:context completionHandler:^(MGLOfflinePack *pack, NSError *error) {
if (error) {
- NSString *message = [NSString stringWithFormat:NSLocalizedString(@"Mapbox GL was unable to add the offline pack “%@”.", @"Error message: name"), name];
- UIAlertController *alertController = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"Can’t Add Offline Pack", @"Error title") message:message preferredStyle:UIAlertControllerStyleAlert];
- [alertController addAction:[UIAlertAction actionWithTitle:NSLocalizedString(@"OK", @"") style:UIAlertActionStyleDefault handler:nil]];
+ NSString *message = [NSString stringWithFormat:@"Mapbox GL was unable to add the offline pack “%@”.", name];
+ UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"Can’t Add Offline Pack" message:message preferredStyle:UIAlertControllerStyleAlert];
+ [alertController addAction:[UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:nil]];
[self presentViewController:alertController animated:YES completion:nil];
} else {
[pack resume];
@@ -154,16 +154,16 @@ static NSString * const MBXOfflinePacksTableViewActiveCellReuseIdentifier = @"Ac
NSString *statusString;
switch (pack.state) {
case MGLOfflinePackStateUnknown:
- statusString = NSLocalizedString(@"Calculating progress…", @"Offline pack status");
+ statusString = @"Calculating progress…";
break;
case MGLOfflinePackStateInactive:
- statusString = [NSString stringWithFormat:NSLocalizedString(@"%@ of %@ resources (%@)", @"Offline pack status: completed, expected, bytes"),
+ statusString = [NSString stringWithFormat:@"%@ of %@ resources (%@)",
completedString, expectedString, byteCountString];
break;
case MGLOfflinePackStateComplete:
- statusString = [NSString stringWithFormat:NSLocalizedString(@"%@ resources (%@)", @"Offline pack status: completed, bytes"),
+ statusString = [NSString stringWithFormat:@"%@ resources (%@)",
completedString, byteCountString];
break;
@@ -173,9 +173,9 @@ static NSString * const MBXOfflinePacksTableViewActiveCellReuseIdentifier = @"Ac
numberStyle:NSNumberFormatterDecimalStyle];
}
if (progress.maximumResourcesExpected > progress.countOfResourcesExpected) {
- expectedString = [NSString stringWithFormat:NSLocalizedString(@"at least %@", @"Offline pack status: expected resources"), expectedString];
+ expectedString = [NSString stringWithFormat:@"at least %@", expectedString];
}
- statusString = [NSString stringWithFormat:NSLocalizedString(@"Downloading %@ of %@ resources (%@ so far)…", @"Offline pack status: completed, expected, bytes"),
+ statusString = [NSString stringWithFormat:@"Downloading %@ of %@ resources (%@ so far)…",
completedString, expectedString, byteCountString];
break;
@@ -247,12 +247,12 @@ static NSString * const MBXOfflinePacksTableViewActiveCellReuseIdentifier = @"Ac
NSError *error = notification.userInfo[MGLOfflinePackErrorUserInfoKey];
NSAssert([error isKindOfClass:[NSError class]], @"MGLOfflineStorage notification has a non-error error.");
- NSString *message = [NSString stringWithFormat:NSLocalizedString(@"Mapbox GL encountered an error while downloading the offline pack “%@”: %@", @"Error message: name, reason"), pack.name, error.localizedFailureReason];
+ NSString *message = [NSString stringWithFormat:@"Mapbox GL encountered an error while downloading the offline pack “%@”: %@", pack.name, error.localizedFailureReason];
if (error.code == MGLErrorCodeConnectionFailed) {
NSLog(@"%@", message);
} else {
- UIAlertController *alertController = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"Error Downloading Offline Pack", @"Error title") message:message preferredStyle:UIAlertControllerStyleAlert];
- [alertController addAction:[UIAlertAction actionWithTitle:NSLocalizedString(@"OK", @"") style:UIAlertActionStyleDefault handler:nil]];
+ UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"Error Downloading Offline Pack" message:message preferredStyle:UIAlertControllerStyleAlert];
+ [alertController addAction:[UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:nil]];
[self presentViewController:alertController animated:YES completion:nil];
}
}
diff --git a/platform/ios/app/MBXViewController.m b/platform/ios/app/MBXViewController.m
index 9df38a0847..8f628e8126 100644
--- a/platform/ios/app/MBXViewController.m
+++ b/platform/ios/app/MBXViewController.m
@@ -78,7 +78,7 @@ static const CLLocationCoordinate2D WorldTourDestinations[] = {
}
else
{
- UIAlertController *alertController = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"Access Token", @"Title of the access token prompt") message:NSLocalizedString(@"Enter your Mapbox access token to load Mapbox-hosted tiles and styles:", @"Message of the access token prompt") preferredStyle:UIAlertControllerStyleAlert];
+ UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"Access Token" message:@"Enter your Mapbox access token to load Mapbox-hosted tiles and styles:" preferredStyle:UIAlertControllerStyleAlert];
[alertController addTextFieldWithConfigurationHandler:^(UITextField * _Nonnull textField)
{
textField.keyboardType = UIKeyboardTypeURL;
@@ -86,8 +86,8 @@ static const CLLocationCoordinate2D WorldTourDestinations[] = {
textField.autocapitalizationType = UITextAutocapitalizationTypeNone;
}];
- [alertController addAction:[UIAlertAction actionWithTitle:NSLocalizedString(@"Cancel", @"") style:UIAlertActionStyleCancel handler:nil]];
- UIAlertAction *OKAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"OK", @"") style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action)
+ [alertController addAction:[UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:nil]];
+ UIAlertAction *OKAction = [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action)
{
UITextField *textField = alertController.textFields.firstObject;
NSString *accessToken = textField.text;
@@ -160,36 +160,36 @@ static const CLLocationCoordinate2D WorldTourDestinations[] = {
- (IBAction)showSettings:(__unused id)sender
{
MGLMapDebugMaskOptions debugMask = self.mapView.debugMask;
- UIActionSheet *sheet = [[UIActionSheet alloc] initWithTitle:NSLocalizedString(@"Map Settings", @"Title of the settings action sheet")
+ UIActionSheet *sheet = [[UIActionSheet alloc] initWithTitle:@"Map Settings"
delegate:self
- cancelButtonTitle:NSLocalizedString(@"Cancel", @"")
+ cancelButtonTitle:@"Cancel"
destructiveButtonTitle:nil
otherButtonTitles:
- NSLocalizedString(@"Reset Position", @"Action in the settings action sheet"),
+ @"Reset Position",
((debugMask & MGLMapDebugTileBoundariesMask)
- ? NSLocalizedString(@"Hide Tile Boundaries", @"Action in the settings action sheet")
- : NSLocalizedString(@"Show Tile Boundaries", @"Action in the settings action sheet")),
+ ? @"Hide Tile Boundaries"
+ : @"Show Tile Boundaries"),
((debugMask & MGLMapDebugTileInfoMask)
- ? NSLocalizedString(@"Hide Tile Info", @"Action in the settings action sheet")
- : NSLocalizedString(@"Show Tile Info", @"Action in the settings action sheet")),
+ ? @"Hide Tile Info"
+ : @"Show Tile Info"),
((debugMask & MGLMapDebugTimestampsMask)
- ? NSLocalizedString(@"Hide Tile Timestamps", @"Action in the settings action sheet")
- : NSLocalizedString(@"Show Tile Timestamps", @"Action in the settings action sheet")),
+ ? @"Hide Tile Timestamps"
+ : @"Show Tile Timestamps"),
((debugMask & MGLMapDebugCollisionBoxesMask)
- ? NSLocalizedString(@"Hide Collision Boxes", @"Action in the settings action sheet")
- : NSLocalizedString(@"Show Collision Boxes", @"Action in the settings action sheet")),
- NSLocalizedString(@"Add 100 Points", @"Action in the settings action sheet"),
- NSLocalizedString(@"Add 1,000 Points", @"Action in the settings action sheet"),
- NSLocalizedString(@"Add 10,000 Points", @"Action in the settings action sheet"),
- NSLocalizedString(@"Add Test Shapes", @"Action in the settings action sheet"),
- NSLocalizedString(@"Start World Tour", @"Action in the settings action sheet"),
- NSLocalizedString(@"Add Custom Callout Point", @"Action in the settings action sheet"),
- NSLocalizedString(@"Remove Annotations", @"Action in the settings action sheet"),
+ ? @"Hide Collision Boxes"
+ : @"Show Collision Boxes"),
+ @"Add 100 Points",
+ @"Add 1,000 Points",
+ @"Add 10,000 Points",
+ @"Add Test Shapes",
+ @"Start World Tour",
+ @"Add Custom Callout Point",
+ @"Remove Annotations",
(_isShowingCustomStyleLayer
- ? NSLocalizedString(@"Hide Custom Style Layer", @"Action in the settings action sheet")
- : NSLocalizedString(@"Show Custom Style Layer", @"Action in the settings action sheet")),
- NSLocalizedString(@"Print Telemetry Logfile", @"Action in the settings action sheet"),
- NSLocalizedString(@"Delete Telemetry Logfile", @"Action in the settings action sheet"),
+ ? @"Hide Custom Style Layer"
+ : @"Show Custom Style Layer"),
+ @"Print Telemetry Logfile",
+ @"Delete Telemetry Logfile",
nil];
[sheet showFromBarButtonItem:self.navigationItem.leftBarButtonItem animated:YES];
@@ -446,7 +446,7 @@ static const CLLocationCoordinate2D WorldTourDestinations[] = {
MBXCustomCalloutAnnotation *annotation = [[MBXCustomCalloutAnnotation alloc] init];
annotation.coordinate = CLLocationCoordinate2DMake(48.8533940, 2.3775439);
- annotation.title = NSLocalizedString(@"Custom Callout", @"Title of a custom callout view");
+ annotation.title = @"Custom Callout";
[self.mapView addAnnotation:annotation];
[self.mapView showAnnotations:@[annotation] animated:YES];
@@ -459,7 +459,7 @@ static const CLLocationCoordinate2D WorldTourDestinations[] = {
MBXDroppedPinAnnotation *point = [[MBXDroppedPinAnnotation alloc] init];
point.coordinate = [self.mapView convertPoint:[longPress locationInView:longPress.view]
toCoordinateFromView:self.mapView];
- point.title = NSLocalizedString(@"Dropped Pin", @"Title of a dropped pin annotation");
+ point.title = @"Dropped Pin";
point.subtitle = [[[MGLCoordinateFormatter alloc] init] stringFromCoordinate:point.coordinate];
[self.mapView addAnnotation:point];
[self.mapView selectAnnotation:point animated:YES];
@@ -474,12 +474,12 @@ static const CLLocationCoordinate2D WorldTourDestinations[] = {
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
styleNames = @[
- NSLocalizedString(@"Streets", @"Style name"),
- NSLocalizedString(@"Emerald", @"Style name"),
- NSLocalizedString(@"Light", @"Style name"),
- NSLocalizedString(@"Dark", @"Style name"),
- NSLocalizedString(@"Satellite", @"Style name"),
- NSLocalizedString(@"Hybrid", @"Style name"),
+ @"Streets",
+ @"Emerald",
+ @"Light",
+ @"Dark",
+ @"Satellite",
+ @"Hybrid",
];
styleURLs = @[
[MGLStyle streetsStyleURL],
@@ -717,7 +717,7 @@ static const CLLocationCoordinate2D WorldTourDestinations[] = {
break;
case MGLUserTrackingModeFollowWithCourse:
newButtonImage = nil;
- newButtonTitle = NSLocalizedString(@"Course", @"User tracking mode");
+ newButtonTitle = @"Course";
break;
}
diff --git a/platform/ios/app/Base.lproj/Main.storyboard b/platform/ios/app/Main.storyboard
index 72f9a02219..72f9a02219 100644
--- a/platform/ios/app/Base.lproj/Main.storyboard
+++ b/platform/ios/app/Main.storyboard
diff --git a/platform/ios/ios.xcodeproj/project.pbxproj b/platform/ios/ios.xcodeproj/project.pbxproj
index 8237db02a8..978bf364ba 100644
--- a/platform/ios/ios.xcodeproj/project.pbxproj
+++ b/platform/ios/ios.xcodeproj/project.pbxproj
@@ -47,8 +47,8 @@
DA35A2CA1CCAAAD200E826B2 /* NSValue+MGLAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = DA35A2C71CCAAAD200E826B2 /* NSValue+MGLAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; };
DA35A2CB1CCAAAD200E826B2 /* NSValue+MGLAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = DA35A2C81CCAAAD200E826B2 /* NSValue+MGLAdditions.m */; };
DA35A2CC1CCAAAD200E826B2 /* NSValue+MGLAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = DA35A2C81CCAAAD200E826B2 /* NSValue+MGLAdditions.m */; };
- DA4A26941CB6E337000B7809 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DA1DC9561CB6C1C2006E619F /* Main.storyboard */; };
- DA4A26951CB6E337000B7809 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DA1DC95B1CB6C1C2006E619F /* LaunchScreen.storyboard */; };
+ DA821D061CCC6D59007508D4 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DA821D041CCC6D59007508D4 /* LaunchScreen.storyboard */; };
+ DA821D071CCC6D59007508D4 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DA821D051CCC6D59007508D4 /* Main.storyboard */; };
DA8847D91CBAF91600AB86E3 /* Mapbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DA8847D21CBAF91600AB86E3 /* Mapbox.framework */; };
DA8847DA1CBAF91600AB86E3 /* Mapbox.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = DA8847D21CBAF91600AB86E3 /* Mapbox.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
DA8847EF1CBAFA5100AB86E3 /* MGLAccountManager.h in Headers */ = {isa = PBXBuildFile; fileRef = DA8847DF1CBAFA5100AB86E3 /* MGLAccountManager.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -134,8 +134,8 @@
DA88488C1CBB037E00AB86E3 /* SMCalloutView.m in Sources */ = {isa = PBXBuildFile; fileRef = DA88488A1CBB037E00AB86E3 /* SMCalloutView.m */; };
DA88488E1CBB047F00AB86E3 /* reachability.h in Headers */ = {isa = PBXBuildFile; fileRef = DA88488D1CBB047F00AB86E3 /* reachability.h */; };
DA8848901CBB048E00AB86E3 /* reachability.m in Sources */ = {isa = PBXBuildFile; fileRef = DA88488F1CBB048E00AB86E3 /* reachability.m */; };
- DA89632B1CC4E66500684375 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = DA8963291CC4E66500684375 /* Localizable.strings */; };
- DA89632F1CC4EE3300684375 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = DA89632C1CC4ECD300684375 /* Localizable.strings */; };
+ DA8933A31CCC95B000E68420 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = DA89339F1CCC951200E68420 /* Localizable.strings */; };
+ DA8933A41CCC95B000E68420 /* Foundation.strings in Resources */ = {isa = PBXBuildFile; fileRef = DA89339D1CCC951200E68420 /* Foundation.strings */; };
DA8963371CC549A100684375 /* glyphs in Resources */ = {isa = PBXBuildFile; fileRef = DA8963331CC549A100684375 /* glyphs */; };
DA8963381CC549A100684375 /* sprites in Resources */ = {isa = PBXBuildFile; fileRef = DA8963341CC549A100684375 /* sprites */; };
DA8963391CC549A100684375 /* styles in Resources */ = {isa = PBXBuildFile; fileRef = DA8963351CC549A100684375 /* styles */; };
@@ -201,7 +201,6 @@
DABFB8711CBE9A0F00D62B32 /* MGLMapView+MGLCustomStyleLayerAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = DA8848381CBAFB8500AB86E3 /* MGLMapView+MGLCustomStyleLayerAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; };
DABFB8721CBE9A0F00D62B32 /* MGLUserLocation.h in Headers */ = {isa = PBXBuildFile; fileRef = DA8848391CBAFB8500AB86E3 /* MGLUserLocation.h */; settings = {ATTRIBUTES = (Public, ); }; };
DABFB8731CBE9A9900D62B32 /* Mapbox.h in Headers */ = {isa = PBXBuildFile; fileRef = DA88485E1CBAFC2E00AB86E3 /* Mapbox.h */; settings = {ATTRIBUTES = (Public, ); }; };
- DAF9E8901CCBF7DC004C7E73 /* Foundation.strings in Resources */ = {isa = PBXBuildFile; fileRef = DAF9E88E1CCBF7DC004C7E73 /* Foundation.strings */; };
DAF9E8931CCBFA03004C7E73 /* Foundation.stringsdict in Resources */ = {isa = PBXBuildFile; fileRef = DAF9E8911CCBFA03004C7E73 /* Foundation.stringsdict */; };
/* End PBXBuildFile section */
@@ -268,8 +267,6 @@
DA1DC94A1CB6C1C2006E619F /* Mapbox GL.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Mapbox GL.app"; sourceTree = BUILT_PRODUCTS_DIR; };
DA1DC9501CB6C1C2006E619F /* MBXAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MBXAppDelegate.h; sourceTree = "<group>"; };
DA1DC9531CB6C1C2006E619F /* MBXViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MBXViewController.h; sourceTree = "<group>"; };
- DA1DC9571CB6C1C2006E619F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
- DA1DC95C1CB6C1C2006E619F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
DA1DC95E1CB6C1C2006E619F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
DA1DC9661CB6C6B7006E619F /* MBXCustomCalloutView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MBXCustomCalloutView.h; sourceTree = "<group>"; };
DA1DC9671CB6C6B7006E619F /* MBXCustomCalloutView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MBXCustomCalloutView.m; sourceTree = "<group>"; };
@@ -305,6 +302,8 @@
DA35A2C81CCAAAD200E826B2 /* NSValue+MGLAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSValue+MGLAdditions.m"; sourceTree = "<group>"; };
DA35A2D11CCAB25200E826B2 /* jazzy.yml */ = {isa = PBXFileReference; lastKnownFileType = text; path = jazzy.yml; sourceTree = "<group>"; };
DA4A26961CB6E795000B7809 /* Mapbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Mapbox.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+ DA821D041CCC6D59007508D4 /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = "<group>"; };
+ DA821D051CCC6D59007508D4 /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Main.storyboard; sourceTree = "<group>"; };
DA8847D21CBAF91600AB86E3 /* Mapbox.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Mapbox.framework; sourceTree = BUILT_PRODUCTS_DIR; };
DA8847D61CBAF91600AB86E3 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
DA8847DF1CBAFA5100AB86E3 /* MGLAccountManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGLAccountManager.h; sourceTree = "<group>"; };
@@ -391,8 +390,8 @@
DA88488A1CBB037E00AB86E3 /* SMCalloutView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SMCalloutView.m; sourceTree = "<group>"; };
DA88488D1CBB047F00AB86E3 /* reachability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = reachability.h; path = ../../include/mbgl/platform/darwin/reachability.h; sourceTree = "<group>"; };
DA88488F1CBB048E00AB86E3 /* reachability.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = reachability.m; path = src/reachability.m; sourceTree = "<group>"; };
- DA89632A1CC4E66500684375 /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Base; path = Base.lproj/Localizable.strings; sourceTree = "<group>"; };
- DA89632D1CC4ECD300684375 /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Base; path = Base.lproj/Localizable.strings; sourceTree = "<group>"; };
+ DA89339E1CCC951200E68420 /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Base; path = Base.lproj/Foundation.strings; sourceTree = "<group>"; };
+ DA8933A01CCC951200E68420 /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Base; path = Base.lproj/Localizable.strings; sourceTree = "<group>"; };
DA8963331CC549A100684375 /* glyphs */ = {isa = PBXFileReference; lastKnownFileType = folder; path = glyphs; sourceTree = "<group>"; };
DA8963341CC549A100684375 /* sprites */ = {isa = PBXFileReference; lastKnownFileType = folder; path = sprites; sourceTree = "<group>"; };
DA8963351CC549A100684375 /* styles */ = {isa = PBXFileReference; lastKnownFileType = folder; path = styles; sourceTree = "<group>"; };
@@ -415,7 +414,6 @@
DABCABBF1CB80717000A7C39 /* locations.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = locations.cpp; sourceTree = "<group>"; };
DABCABC01CB80717000A7C39 /* locations.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = locations.hpp; sourceTree = "<group>"; };
DAC07C961CBB2CD6000CB309 /* mbgl.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = mbgl.xcconfig; path = ../../build/ios/mbgl.xcconfig; sourceTree = "<group>"; };
- DAF9E88F1CCBF7DC004C7E73 /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Base; path = Base.lproj/Foundation.strings; sourceTree = "<group>"; };
DAF9E8921CCBFA03004C7E73 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = en; path = en.lproj/Foundation.stringsdict; sourceTree = "<group>"; };
/* End PBXFileReference section */
@@ -502,10 +500,9 @@
DA1DC9691CB6C6B7006E619F /* MBXOfflinePacksTableViewController.m */,
DA1DC9531CB6C1C2006E619F /* MBXViewController.h */,
DA1DC99A1CB6E064006E619F /* MBXViewController.m */,
- DA1DC9561CB6C1C2006E619F /* Main.storyboard */,
- DA1DC95B1CB6C1C2006E619F /* LaunchScreen.storyboard */,
+ DA821D051CCC6D59007508D4 /* Main.storyboard */,
+ DA821D041CCC6D59007508D4 /* LaunchScreen.storyboard */,
DA1DC99E1CB6E088006E619F /* Assets.xcassets */,
- DA8963291CC4E66500684375 /* Localizable.strings */,
DA1DC96C1CB6C6CE006E619F /* points.geojson */,
DA1DC96D1CB6C6CE006E619F /* polyline.geojson */,
DA1DC96F1CB6C6CE006E619F /* threestates.geojson */,
@@ -664,8 +661,8 @@
DA8848621CBAFCC100AB86E3 /* Resources */ = {
isa = PBXGroup;
children = (
- DAF9E88E1CCBF7DC004C7E73 /* Foundation.strings */,
- DA89632C1CC4ECD300684375 /* Localizable.strings */,
+ DA89339F1CCC951200E68420 /* Localizable.strings */,
+ DA89339D1CCC951200E68420 /* Foundation.strings */,
DAF9E8911CCBFA03004C7E73 /* Foundation.stringsdict */,
DA8848771CBAFD5C00AB86E3 /* api_mapbox_com-digicert.der */,
DA8848781CBAFD5C00AB86E3 /* api_mapbox_com-geotrust.der */,
@@ -1009,13 +1006,12 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
- DA4A26941CB6E337000B7809 /* Main.storyboard in Resources */,
- DA4A26951CB6E337000B7809 /* LaunchScreen.storyboard in Resources */,
DA1DC9701CB6C6CE006E619F /* points.geojson in Resources */,
DA1DC9711CB6C6CE006E619F /* polyline.geojson in Resources */,
- DA89632B1CC4E66500684375 /* Localizable.strings in Resources */,
DA1DC99D1CB6E076006E619F /* Default-568h@2x.png in Resources */,
+ DA821D071CCC6D59007508D4 /* Main.storyboard in Resources */,
DA1DC9731CB6C6CE006E619F /* threestates.geojson in Resources */,
+ DA821D061CCC6D59007508D4 /* LaunchScreen.storyboard in Resources */,
DA1DC99F1CB6E088006E619F /* Assets.xcassets in Resources */,
DA1DC9721CB6C6CE006E619F /* Settings.bundle in Resources */,
);
@@ -1032,11 +1028,11 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
- DA89632F1CC4EE3300684375 /* Localizable.strings in Resources */,
- DAF9E8901CCBF7DC004C7E73 /* Foundation.strings in Resources */,
DA8848731CBAFCC100AB86E3 /* mapbox.png in Resources */,
DA8848741CBAFCC100AB86E3 /* mapbox@2x.png in Resources */,
DA88487A1CBAFD5C00AB86E3 /* api_mapbox_com-digicert.der in Resources */,
+ DA8933A31CCC95B000E68420 /* Localizable.strings in Resources */,
+ DA8933A41CCC95B000E68420 /* Foundation.strings in Resources */,
DA88486D1CBAFCC100AB86E3 /* Compass.png in Resources */,
DAF9E8931CCBFA03004C7E73 /* Foundation.stringsdict in Resources */,
DA8848721CBAFCC100AB86E3 /* default_marker@3x.png in Resources */,
@@ -1199,34 +1195,18 @@
/* End PBXTargetDependency section */
/* Begin PBXVariantGroup section */
- DA1DC9561CB6C1C2006E619F /* Main.storyboard */ = {
+ DA89339D1CCC951200E68420 /* Foundation.strings */ = {
isa = PBXVariantGroup;
children = (
- DA1DC9571CB6C1C2006E619F /* Base */,
+ DA89339E1CCC951200E68420 /* Base */,
);
- name = Main.storyboard;
- sourceTree = "<group>";
- };
- DA1DC95B1CB6C1C2006E619F /* LaunchScreen.storyboard */ = {
- isa = PBXVariantGroup;
- children = (
- DA1DC95C1CB6C1C2006E619F /* Base */,
- );
- name = LaunchScreen.storyboard;
- sourceTree = "<group>";
- };
- DA8963291CC4E66500684375 /* Localizable.strings */ = {
- isa = PBXVariantGroup;
- children = (
- DA89632A1CC4E66500684375 /* Base */,
- );
- name = Localizable.strings;
+ name = Foundation.strings;
sourceTree = "<group>";
};
- DA89632C1CC4ECD300684375 /* Localizable.strings */ = {
+ DA89339F1CCC951200E68420 /* Localizable.strings */ = {
isa = PBXVariantGroup;
children = (
- DA89632D1CC4ECD300684375 /* Base */,
+ DA8933A01CCC951200E68420 /* Base */,
);
name = Localizable.strings;
sourceTree = "<group>";
@@ -1239,14 +1219,6 @@
name = LaunchScreen.storyboard;
sourceTree = "<group>";
};
- DAF9E88E1CCBF7DC004C7E73 /* Foundation.strings */ = {
- isa = PBXVariantGroup;
- children = (
- DAF9E88F1CCBF7DC004C7E73 /* Base */,
- );
- name = Foundation.strings;
- sourceTree = "<group>";
- };
DAF9E8911CCBFA03004C7E73 /* Foundation.stringsdict */ = {
isa = PBXVariantGroup;
children = (
diff --git a/platform/ios/resources/Base.lproj/Foundation.strings b/platform/ios/resources/Base.lproj/Foundation.strings
index 30fe3a3e91..f76ac949d7 100644
--- a/platform/ios/resources/Base.lproj/Foundation.strings
+++ b/platform/ios/resources/Base.lproj/Foundation.strings
@@ -1,269 +1,291 @@
-/* Degrees-minutes format, long */
-"%@ and %@" = "%1$@ and %2$@";
+/* Clock position format, long: {hours} o’clock */
+"CLOCK_FMT_LONG" = "%@ o’clock";
-/* Latitude-longitude format, long */
-"%@ by %@" = "%1$@ by %2$@";
+/* Clock position format, medium: {hours} o’clock */
+"CLOCK_FMT_MEDIUM" = "%@ o’clock";
-/* East longitude format, long
- East longitude format, medium */
-"%@ east" = "%@ east";
+/* Clock position format, short: {hours}:00 */
+"CLOCK_FMT_SHORT" = "%@:00";
-/* North latitude format, long
- North latitude format, medium */
-"%@ north" = "%@ north";
+/* East, long */
+"COMPASS_E_LONG" = "east";
-/* Clock position format, long style
- Clock position format, medium style */
-"%@ o’clock" = "%@ o’clock";
+/* East, short */
+"COMPASS_E_SHORT" = "E";
-/* South latitude format, long
- South latitude format, medium */
-"%@ south" = "%@ south";
+/* East-northeast, long */
+"COMPASS_ENE_LONG" = "east-northeast";
-/* West longitude format, long
- West longitude format, medium */
-"%@ west" = "%@ west";
+/* East-northeast, short */
+"COMPASS_ENE_SHORT" = "ENE";
-/* Degrees-minutes format, medium
- Degrees-minutes format, short */
-"%@%@" = "%1$@%2$@";
+/* East-southeast, long */
+"COMPASS_ESE_LONG" = "east-southeast";
-/* Degrees-minutes-seconds format, medium
- Degrees-minutes-seconds format, short */
-"%@%@%@" = "%1$@%2$@%3$@";
+/* East-southeast, short */
+"COMPASS_ESE_SHORT" = "ESE";
-/* Latitude-longitude format, medium
- Latitude-longitude format, short */
-"%@, %@" = "%1$@, %2$@";
+/* East by north, long */
+"COMPASS_ExN_LONG" = "east by north";
-/* Degrees-minutes-seconds format, long */
-"%@, %@, and %@" = "%1$@, %2$@, and %3$@";
+/* East by north, short */
+"COMPASS_ExN_SHORT" = "E×N";
-/* Clock position format, short style */
-"%@:00" = "%@:00";
+/* East by south, long */
+"COMPASS_ExS_LONG" = "east by south";
-/* East longitude format, short */
-"%@E" = "%@E";
+/* East by south, short */
+"COMPASS_ExS_SHORT" = "E×S";
-/* North latitude format, short */
-"%@N" = "%@N";
+/* North, long */
+"COMPASS_N_LONG" = "north";
-/* South latitude format, short */
-"%@S" = "%@S";
+/* North, short */
+"COMPASS_N_SHORT" = "N";
-/* West longitude format, short */
-"%@W" = "%@W";
+/* Northeast, long */
+"COMPASS_NE_LONG" = "northeast";
-/* Degrees format, long */
-"%d degree(s)" = "%d degree(s)";
+/* Northeast, short */
+"COMPASS_NE_SHORT" = "NE";
-/* Minutes format, long */
-"%d minute(s)" = "%d minute(s)";
+/* Northeast by east, long */
+"COMPASS_NExE_LONG" = "northeast by east";
-/* Seconds format, long */
-"%d second(s)" = "%d second(s)";
+/* Northeast by east, short */
+"COMPASS_NExE_SHORT" = "NE×E";
-/* Degrees format, medium
- Degrees format, short */
-"%d°" = "%d°";
+/* Northeast by north, long */
+"COMPASS_NExN_LONG" = "northeast by north";
-/* Minutes format, medium
- Minutes format, short */
-"%d′" = "%d′";
+/* Northeast by north, short */
+"COMPASS_NExN_SHORT" = "NE×N";
-/* Seconds format, medium
- Seconds format, short */
-"%d″" = "%d″";
+/* North-northeast, long */
+"COMPASS_NNE_LONG" = "north-northeast";
-/* East, short */
-"E" = "E";
+/* North-northeast, short */
+"COMPASS_NNE_SHORT" = "NNE";
-/* East, long */
-"east" = "east";
+/* North-northwest, long */
+"COMPASS_NNW_LONG" = "north-northwest";
-/* East by north, long */
-"east by north" = "east by north";
+/* North-northwest, short */
+"COMPASS_NNW_SHORT" = "NNW";
-/* East by south, long */
-"east by south" = "east by south";
+/* Northwest, long */
+"COMPASS_NW_LONG" = "northwest";
-/* East-northeast, long */
-"east-northeast" = "east-northeast";
+/* Northwest, short */
+"COMPASS_NW_SHORT" = "NW";
-/* East-southeast, long */
-"east-southeast" = "east-southeast";
+/* Northwest by north, long */
+"COMPASS_NWxN_LONG" = "northwest by north";
-/* East-northeast, short */
-"ENE" = "ENE";
+/* Northwest by north, short */
+"COMPASS_NWxN_SHORT" = "NW×N";
-/* East-southeast, short */
-"ESE" = "ESE";
+/* Northwest by west, long */
+"COMPASS_NWxW_LONG" = "northwest by west";
-/* East by north, short */
-"E×N" = "E×N";
+/* Northwest by west, short */
+"COMPASS_NWxW_SHORT" = "NW×W";
-/* East by south, short */
-"E×S" = "E×S";
+/* North by east, long */
+"COMPASS_NxE_LONG" = "north by east";
-/* North, short */
-"N" = "N";
+/* North by east, short */
+"COMPASS_NxE_SHORT" = "N×E";
-/* Northeast, short */
-"NE" = "NE";
+/* North by west, long */
+"COMPASS_NxW_LONG" = "north by west";
-/* Northeast by east, short */
-"NE×E" = "NE×E";
+/* North by west, short */
+"COMPASS_NxW_SHORT" = "N×W";
-/* Northeast by north, short */
-"NE×N" = "NE×N";
+/* South, long */
+"COMPASS_S_LONG" = "south";
-/* North-northeast, short */
-"NNE" = "NNE";
+/* South, short */
+"COMPASS_S_SHORT" = "S";
-/* North-northwest, short */
-"NNW" = "NNW";
+/* Southeast, long */
+"COMPASS_SE_LONG" = "southeast";
-/* North, long */
-"north" = "north";
+/* Southeast, short */
+"COMPASS_SE_SHORT" = "SE";
-/* North by east, long */
-"north by east" = "north by east";
+/* Southeast by east, long */
+"COMPASS_SExE_LONG" = "southeast by east";
-/* North by west, long */
-"north by west" = "north by west";
+/* Southeast by east, short */
+"COMPASS_SExE_SHORT" = "SE×E";
-/* North-northeast, long */
-"north-northeast" = "north-northeast";
+/* Southeast by south, long */
+"COMPASS_SExS_LONG" = "southeast by south";
-/* North-northwest, long */
-"north-northwest" = "north-northwest";
+/* Southeast by south, short */
+"COMPASS_SExS_SHORT" = "SE×S";
-/* Northeast, long */
-"northeast" = "northeast";
+/* South-southeast, long */
+"COMPASS_SSE_LONG" = "south-southeast";
-/* Northeast by east, long */
-"northeast by east" = "northeast by east";
+/* South-southeast, short */
+"COMPASS_SSE_SHORT" = "SSE";
-/* Northeast by north, long */
-"northeast by north" = "northeast by north";
+/* South-southwest, long */
+"COMPASS_SSW_LONG" = "south-southwest";
-/* Northwest, long */
-"northwest" = "northwest";
+/* South-southwest, short */
+"COMPASS_SSW_SHORT" = "SSW";
-/* Northwest by north, long */
-"northwest by north" = "northwest by north";
+/* Southwest, long */
+"COMPASS_SW_LONG" = "southwest";
-/* Northwest by west, long */
-"northwest by west" = "northwest by west";
+/* Southwest, short */
+"COMPASS_SW_SHORT" = "SW";
-/* Northwest, short */
-"NW" = "NW";
+/* Southwest by south, long */
+"COMPASS_SWxS_LONG" = "southwest by south";
-/* Northwest by north, short */
-"NW×N" = "NW×N";
+/* Southwest by south, short */
+"COMPASS_SWxS_SHORT" = "SW×S";
-/* Northwest by west, short */
-"NW×W" = "NW×W";
+/* Southwest by west, long */
+"COMPASS_SWxW_LONG" = "southwest by west";
-/* North by east, short */
-"N×E" = "N×E";
+/* Southwest by west, short */
+"COMPASS_SWxW_SHORT" = "SW×W";
-/* North by west, short */
-"N×W" = "N×W";
+/* South by east, long */
+"COMPASS_SxE_LONG" = "south by east";
-/* South, short */
-"S" = "S";
+/* South by east, short */
+"COMPASS_SxE_SHORT" = "S×E";
-/* Southeast, short */
-"SE" = "SE";
+/* South by west, long */
+"COMPASS_SxW_LONG" = "south by west";
-/* Southeast by east, short */
-"SE×E" = "SE×E";
+/* South by west, short */
+"COMPASS_SxW_SHORT" = "S×W";
-/* Southeast by south, short */
-"SE×S" = "SE×S";
+/* West, long */
+"COMPASS_W_LONG" = "west";
-/* South, long */
-"south" = "south";
+/* West, short */
+"COMPASS_W_SHORT" = "W";
-/* South by east, long */
-"south by east" = "south by east";
+/* West-northwest, long */
+"COMPASS_WNW_LONG" = "west-northwest";
-/* South by west, long */
-"south by west" = "south by west";
+/* West-northwest, short */
+"COMPASS_WNW_SHORT" = "WNW";
-/* South-southeast, long */
-"south-southeast" = "south-southeast";
+/* West-southwest, long */
+"COMPASS_WSW_LONG" = "west-southwest";
-/* South-southwest, long */
-"south-southwest" = "south-southwest";
+/* West-southwest, short */
+"COMPASS_WSW_SHORT" = "WSW";
-/* Southeast, long */
-"southeast" = "southeast";
+/* West by north, long */
+"COMPASS_WxN_LONG" = "west by north";
-/* Southeast by east, long */
-"southeast by east" = "southeast by east";
+/* West by north, short */
+"COMPASS_WxN_SHORT" = "W×N";
-/* Southeast by south, long */
-"southeast by south" = "southeast by south";
+/* West by south, long */
+"COMPASS_WxS_LONG" = "west by south";
-/* Southwest, long */
-"southwest" = "southwest";
+/* West by south, short */
+"COMPASS_WxS_SHORT" = "W×S";
-/* Southwest by south, long */
-"southwest by south" = "southwest by south";
+/* Degrees format, long */
+"COORD_DEG_LONG" = "%d degree(s)";
-/* Southwest by west, long */
-"southwest by west" = "southwest by west";
+/* Degrees format, medium: {degrees} */
+"COORD_DEG_MEDIUM" = "%d°";
-/* South-southeast, short */
-"SSE" = "SSE";
+/* Degrees format, short: {degrees} */
+"COORD_DEG_SHORT" = "%d°";
-/* South-southwest, short */
-"SSW" = "SSW";
+/* Coordinate format, long: {degrees}{minutes} */
+"COORD_DM_LONG" = "%1$@ and %2$@";
-/* Southwest, short */
-"SW" = "SW";
+/* Coordinate format, medium: {degrees}{minutes} */
+"COORD_DM_MEDIUM" = "%1$@%2$@";
-/* Southwest by south, short */
-"SW×S" = "SW×S";
+/* Coordinate format, short: {degrees}{minutes} */
+"COORD_DM_SHORT" = "%1$@%2$@";
-/* Southwest by west, short */
-"SW×W" = "SW×W";
+/* Coordinate format, long: {degrees}{minutes}{seconds} */
+"COORD_DMS_LONG" = "%1$@, %2$@, and %3$@";
-/* South by east, short */
-"S×E" = "S×E";
+/* Coordinate format, medium: {degrees}{minutes}{seconds} */
+"COORD_DMS_MEDIUM" = "%1$@%2$@%3$@";
-/* South by west, short */
-"S×W" = "S×W";
+/* Coordinate format, short: {degrees}{minutes}{seconds} */
+"COORD_DMS_SHORT" = "%1$@%2$@%3$@";
-/* West, short */
-"W" = "W";
+/* East longitude format, long: {longitude} */
+"COORD_E_LONG" = "%@ east";
-/* West, long */
-"west" = "west";
+/* East longitude format, medium: {longitude} */
+"COORD_E_MEDIUM" = "%@ east";
-/* West by north, long */
-"west by north" = "west by north";
+/* East longitude format, short: {longitude} */
+"COORD_E_SHORT" = "%@E";
-/* West by south, long */
-"west by south" = "west by south";
+/* Coordinate pair format, long: {latitude}, {longitude} */
+"COORD_FMT_LONG" = "%1$@ by %2$@";
-/* West-northwest, long */
-"west-northwest" = "west-northwest";
+/* Coordinate pair format, medium: {latitude}, {longitude} */
+"COORD_FMT_MEDIUM" = "%1$@, %2$@";
-/* West-southwest, long */
-"west-southwest" = "west-southwest";
+/* Coordinate pair format, short: {latitude}, {longitude} */
+"COORD_FMT_SHORT" = "%1$@, %2$@";
-/* West-northwest, short */
-"WNW" = "WNW";
+/* Minutes format, long */
+"COORD_MIN_LONG" = "%d minute(s)";
-/* West-southwest, short */
-"WSW" = "WSW";
+/* Minutes format, medium: {minutes} */
+"COORD_MIN_MEDIUM" = "%d′";
-/* West by north, short */
-"W×N" = "W×N";
+/* Minutes format, short: {minutes} */
+"COORD_MIN_SHORT" = "%d′";
-/* West by south, short */
-"W×S" = "W×S";
+/* North latitude format, long: {latitude} */
+"COORD_N_LONG" = "%@ north";
+
+/* North latitude format, medium: {latitude} */
+"COORD_N_MEDIUM" = "%@ north";
+
+/* North latitude format, short: {latitude} */
+"COORD_N_SHORT" = "%@N";
+
+/* South latitude format, long: {latitude} */
+"COORD_S_LONG" = "%@ south";
+
+/* South latitude format, medium: {latitude} */
+"COORD_S_MEDIUM" = "%@ south";
+
+/* South latitude format, short: {latitude} */
+"COORD_S_SHORT" = "%@S";
+
+/* Seconds format, long */
+"COORD_SEC_LONG" = "%d second(s)";
+
+/* Seconds format, medium: {seconds} */
+"COORD_SEC_MEDIUM" = "%d″";
+
+/* Seconds format, short: {seconds} */
+"COORD_SEC_SHORT" = "%d″";
+
+/* West longitude format, long: {longitude} */
+"COORD_W_LONG" = "%@ west";
+
+/* West longitude format, medium: {longitude} */
+"COORD_W_MEDIUM" = "%@ west";
+
+/* West longitude format, short: {longitude} */
+"COORD_W_SHORT" = "%@W";
diff --git a/platform/ios/resources/Base.lproj/Localizable.strings b/platform/ios/resources/Base.lproj/Localizable.strings
index b72bc21e63..cf6de337c4 100644
--- a/platform/ios/resources/Base.lproj/Localizable.strings
+++ b/platform/ios/resources/Base.lproj/Localizable.strings
@@ -1,75 +1,75 @@
-/* Accessibility label */
-"Attribution info" = "Attribution info";
+/* No comment provided by engineer. */
+"API_CLIENT_400_DESC" = "The session data task failed. Original request was: %@";
+
+/* No comment provided by engineer. */
+"API_CLIENT_400_REASON" = "The status code was %ld";
/* No comment provided by engineer. */
-"Cancel" = "Cancel";
+"CANCEL" = "Cancel";
/* Accessibility label */
-"Compass" = "Compass";
+"COMPASS_A11Y_LABEL" = "Compass";
-/* Telemetry prompt button */
-"Don’t Participate" = "Don’t Participate";
+/* Compass abbreviation for north */
+"COMPASS_NORTH" = "N";
-/* Action in attribution sheet */
-"Improve This Map" = "Improve This Map";
+/* Copyright notice in attribution sheet */
+"COPY_MAPBOX" = "© Mapbox";
-/* Telemetry prompt button */
-"Keep Participating" = "Keep Participating";
+/* Copyright notice in attribution sheet */
+"COPY_OSM" = "© OpenStreetMap";
-/* Telemetry prompt title */
-"Make Mapbox Maps Better" = "Make Mapbox Maps Better";
+/* Instructions in Interface Builder designable; {key}, {plist file name} */
+"DESIGNABLE" = "To display a Mapbox-hosted map here, set %1$@ to your access token in %2$@\n\nFor detailed instructions, see:";
+
+/* Setup documentation URL display string; keep as short as possible */
+"FIRST_STEPS_URL" = "mapbox.com/help/first-steps-ios-sdk";
/* Accessibility label */
-"Map" = "Map";
+"INFO_A11Y_LABEL" = "Attribution info";
-/* Action sheet title */
-"Mapbox iOS SDK" = "Mapbox iOS SDK";
+/* Accessibility label */
+"LOGO_A11Y_LABEL" = "Mapbox logo";
/* Accessibility label */
-"Mapbox logo" = "Mapbox logo";
+"MAP_A11Y_LABEL" = "Map";
/* Action in attribution sheet */
-"Mapbox Telemetry" = "Mapbox Telemetry";
+"MAP_FEEDBACK" = "Improve This Map";
-/* Setup documentation URL display string */
-"mapbox.com/help/first-steps-ios-sdk" = "mapbox.com/help/first-steps-ios-sdk";
+/* Action sheet title */
+"SDK_NAME" = "Mapbox iOS SDK";
-/* Compass abbreviation for north */
-"N" = "N";
+/* Telemetry prompt message */
+"TELEMETRY_DISABLED_MSG" = "You can help make OpenStreetMap and Mapbox maps better by contributing anonymous usage data.";
+
+/* Telemetry prompt button */
+"TELEMETRY_DISABLED_OFF" = "Don’t Participate";
/* Telemetry prompt button */
-"Participate" = "Participate";
+"TELEMETRY_DISABLED_ON" = "Participate";
+
+/* Telemetry prompt message */
+"TELEMETRY_ENABLED_MSG" = "You are helping to make OpenStreetMap and Mapbox maps better by contributing anonymous usage data.";
/* Telemetry prompt button */
-"Stop Participating" = "Stop Participating";
+"TELEMETRY_ENABLED_OFF" = "Stop Participating";
/* Telemetry prompt button */
-"Tell Me More" = "Tell Me More";
+"TELEMETRY_ENABLED_ON" = "Keep Participating";
-/* No comment provided by engineer. */
-"The session data task failed. Original request was: %@" = "The session data task failed. Original request was: %@";
+/* Telemetry prompt button */
+"TELEMETRY_MORE" = "Tell Me More";
-/* No comment provided by engineer. */
-"The status code was %ld" = "The status code was %ld";
+/* Action in attribution sheet */
+"TELEMETRY_NAME" = "Mapbox Telemetry";
-/* Instructions in Interface Builder designable; property list dictionary key, file name */
-"To display a Mapbox-hosted map here, set %@ to your access token in %@\n\nFor detailed instructions, see:" = "To display a Mapbox-hosted map here, set %1$@ to your access token in %2$@\n\nFor detailed instructions, see:";
+/* Telemetry prompt title */
+"TELEMETRY_TITLE" = "Make Mapbox Maps Better";
/* Accessibility label */
-"User location" = "User location";
-
-/* Telemetry prompt message */
-"You are helping to make OpenStreetMap and Mapbox maps better by contributing anonymous usage data." = "You are helping to make OpenStreetMap and Mapbox maps better by contributing anonymous usage data.";
+"USER_DOT_A11Y_LABEL" = "User location";
/* Default user location annotation title */
-"You Are Here" = "You Are Here";
-
-/* Telemetry prompt message */
-"You can help make OpenStreetMap and Mapbox maps better by contributing anonymous usage data." = "You can help make OpenStreetMap and Mapbox maps better by contributing anonymous usage data.";
-
-/* Action in attribution sheet */
-"© Mapbox" = "© Mapbox";
-
-/* Action in attribution sheet */
-"© OpenStreetMap" = "© OpenStreetMap";
+"USER_DOT_TITLE" = "You Are Here";
diff --git a/platform/ios/resources/en.lproj/Foundation.stringsdict b/platform/ios/resources/en.lproj/Foundation.stringsdict
index 99352d3d4a..5f23fff93b 100644
--- a/platform/ios/resources/en.lproj/Foundation.stringsdict
+++ b/platform/ios/resources/en.lproj/Foundation.stringsdict
@@ -2,7 +2,7 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
- <key>%d degree(s)</key>
+ <key>COORD_DEG_LONG</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@degrees@</string>
@@ -18,7 +18,7 @@
<string>%d degrees</string>
</dict>
</dict>
- <key>%d minute(s)</key>
+ <key>COORD_MIN_LONG</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@minutes@</string>
@@ -34,7 +34,7 @@
<string>%d minutes</string>
</dict>
</dict>
- <key>%d second(s)</key>
+ <key>COORD_SEC_LONG</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@seconds@</string>
diff --git a/platform/ios/src/MGLAPIClient.m b/platform/ios/src/MGLAPIClient.m
index 62886713eb..86f57e4e88 100644
--- a/platform/ios/src/MGLAPIClient.m
+++ b/platform/ios/src/MGLAPIClient.m
@@ -47,8 +47,8 @@ static NSString * const MGLAPIClientHTTPMethodPost = @"POST";
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *)response;
NSError *statusError = nil;
if (httpResponse.statusCode >= 400) {
- NSString *description = [NSString stringWithFormat:NSLocalizedString(@"The session data task failed. Original request was: %@", nil), dataTask.originalRequest];
- NSString *reason = [NSString stringWithFormat:NSLocalizedString(@"The status code was %ld", nil), (long)httpResponse.statusCode];
+ NSString *description = [NSString stringWithFormat:NSLocalizedStringWithDefaultValue(@"API_CLIENT_400_DESC", nil, nil, @"The session data task failed. Original request was: %@", nil), dataTask.originalRequest];
+ NSString *reason = [NSString stringWithFormat:NSLocalizedStringWithDefaultValue(@"API_CLIENT_400_REASON", nil, nil, @"The status code was %ld", nil), (long)httpResponse.statusCode];
NSDictionary *userInfo = @{NSLocalizedDescriptionKey: description,
NSLocalizedFailureReasonErrorKey: reason};
statusError = [NSError errorWithDomain:MGLErrorDomain code:1 userInfo:userInfo];
diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm
index 9290a00fa9..3d3666c6f6 100644
--- a/platform/ios/src/MGLMapView.mm
+++ b/platform/ios/src/MGLMapView.mm
@@ -303,7 +303,7 @@ mbgl::Duration MGLDurationInSeconds(NSTimeInterval duration)
[self createGLView];
}
- self.accessibilityLabel = NSLocalizedString(@"Map", @"Accessibility label");
+ self.accessibilityLabel = NSLocalizedStringWithDefaultValue(@"MAP_A11Y_LABEL", nil, nil, @"Map", @"Accessibility label");
self.backgroundColor = [UIColor clearColor];
self.clipsToBounds = YES;
@@ -348,7 +348,7 @@ mbgl::Duration MGLDurationInSeconds(NSTimeInterval duration)
//
UIImage *logo = [[MGLMapView resourceImageNamed:@"mapbox.png"] imageWithAlignmentRectInsets:UIEdgeInsetsMake(1.5, 4, 3.5, 2)];
_logoView = [[UIImageView alloc] initWithImage:logo];
- _logoView.accessibilityLabel = NSLocalizedString(@"Mapbox logo", @"Accessibility label");
+ _logoView.accessibilityLabel = NSLocalizedStringWithDefaultValue(@"LOGO_A11Y_LABEL", nil, nil, @"Mapbox logo", @"Accessibility label");
_logoView.translatesAutoresizingMaskIntoConstraints = NO;
[self addSubview:_logoView];
_logoViewConstraints = [NSMutableArray array];
@@ -356,7 +356,7 @@ mbgl::Duration MGLDurationInSeconds(NSTimeInterval duration)
// setup attribution
//
_attributionButton = [UIButton buttonWithType:UIButtonTypeInfoLight];
- _attributionButton.accessibilityLabel = NSLocalizedString(@"Attribution info", @"Accessibility label");
+ _attributionButton.accessibilityLabel = NSLocalizedStringWithDefaultValue(@"INFO_A11Y_LABEL", nil, nil, @"Attribution info", @"Accessibility label");
[_attributionButton addTarget:self action:@selector(showAttribution) forControlEvents:UIControlEventTouchUpInside];
_attributionButton.translatesAutoresizingMaskIntoConstraints = NO;
[self addSubview:_attributionButton];
@@ -366,7 +366,7 @@ mbgl::Duration MGLDurationInSeconds(NSTimeInterval duration)
// setup compass
//
_compassView = [[UIImageView alloc] initWithImage:self.compassImage];
- _compassView.accessibilityLabel = NSLocalizedString(@"Compass", @"Accessibility label");
+ _compassView.accessibilityLabel = NSLocalizedStringWithDefaultValue(@"COMPASS_A11Y_LABEL", nil, nil, @"Compass", @"Accessibility label");
_compassView.frame = CGRectMake(0, 0, _compassView.image.size.width, _compassView.image.size.height);
_compassView.alpha = 0;
_compassView.userInteractionEnabled = YES;
@@ -497,7 +497,7 @@ mbgl::Duration MGLDurationInSeconds(NSTimeInterval duration)
UIGraphicsBeginImageContextWithOptions(scaleImage.size, NO, [UIScreen mainScreen].scale);
[scaleImage drawInRect:{ CGPointZero, scaleImage.size }];
- NSAttributedString *north = [[NSAttributedString alloc] initWithString:NSLocalizedString(@"N", @"Compass abbreviation for north") attributes:@{
+ NSAttributedString *north = [[NSAttributedString alloc] initWithString:NSLocalizedStringWithDefaultValue(@"COMPASS_NORTH", nil, nil, @"N", @"Compass abbreviation for north") attributes:@{
NSFontAttributeName: [UIFont systemFontOfSize:9 weight:UIFontWeightUltraLight],
NSForegroundColorAttributeName: [UIColor whiteColor],
}];
@@ -1536,15 +1536,15 @@ mbgl::Duration MGLDurationInSeconds(NSTimeInterval duration)
{
if ( ! self.attributionSheet)
{
- self.attributionSheet = [[UIActionSheet alloc] initWithTitle:NSLocalizedString(@"Mapbox iOS SDK", @"Action sheet title")
+ self.attributionSheet = [[UIActionSheet alloc] initWithTitle:NSLocalizedStringWithDefaultValue(@"SDK_NAME", nil, nil, @"Mapbox iOS SDK", @"Action sheet title")
delegate:self
- cancelButtonTitle:NSLocalizedString(@"Cancel", @"")
+ cancelButtonTitle:NSLocalizedStringWithDefaultValue(@"CANCEL", nil, nil, @"Cancel", @"")
destructiveButtonTitle:nil
otherButtonTitles:
- NSLocalizedString(@"© Mapbox", @"Action in attribution sheet"),
- NSLocalizedString(@"© OpenStreetMap", @"Action in attribution sheet"),
- NSLocalizedString(@"Improve This Map", @"Action in attribution sheet"),
- NSLocalizedString(@"Mapbox Telemetry", @"Action in attribution sheet"),
+ NSLocalizedStringWithDefaultValue(@"COPY_MAPBOX", nil, nil, @"© Mapbox", @"Copyright notice in attribution sheet"),
+ NSLocalizedStringWithDefaultValue(@"COPY_OSM", nil, nil, @"© OpenStreetMap", @"Copyright notice in attribution sheet"),
+ NSLocalizedStringWithDefaultValue(@"MAP_FEEDBACK", nil, nil, @"Improve This Map", @"Action in attribution sheet"),
+ NSLocalizedStringWithDefaultValue(@"TELEMETRY_NAME", nil, nil, @"Mapbox Telemetry", @"Action in attribution sheet"),
nil];
}
@@ -1579,22 +1579,22 @@ mbgl::Duration MGLDurationInSeconds(NSTimeInterval duration)
if ([[NSUserDefaults standardUserDefaults] boolForKey:@"MGLMapboxMetricsEnabled"])
{
- message = NSLocalizedString(@"You are helping to make OpenStreetMap and Mapbox maps better by contributing anonymous usage data.", @"Telemetry prompt message");
- participate = NSLocalizedString(@"Keep Participating", @"Telemetry prompt button");
- optOut = NSLocalizedString(@"Stop Participating", @"Telemetry prompt button");
+ message = NSLocalizedStringWithDefaultValue(@"TELEMETRY_ENABLED_MSG", nil, nil, @"You are helping to make OpenStreetMap and Mapbox maps better by contributing anonymous usage data.", @"Telemetry prompt message");
+ participate = NSLocalizedStringWithDefaultValue(@"TELEMETRY_ENABLED_ON", nil, nil, @"Keep Participating", @"Telemetry prompt button");
+ optOut = NSLocalizedStringWithDefaultValue(@"TELEMETRY_ENABLED_OFF", nil, nil, @"Stop Participating", @"Telemetry prompt button");
}
else
{
- message = NSLocalizedString(@"You can help make OpenStreetMap and Mapbox maps better by contributing anonymous usage data.", @"Telemetry prompt message");
- participate = NSLocalizedString(@"Participate", @"Telemetry prompt button");
- optOut = NSLocalizedString(@"Don’t Participate", @"Telemetry prompt button");
+ message = NSLocalizedStringWithDefaultValue(@"TELEMETRY_DISABLED_MSG", nil, nil, @"You can help make OpenStreetMap and Mapbox maps better by contributing anonymous usage data.", @"Telemetry prompt message");
+ participate = NSLocalizedStringWithDefaultValue(@"TELEMETRY_DISABLED_ON", nil, nil, @"Participate", @"Telemetry prompt button");
+ optOut = NSLocalizedStringWithDefaultValue(@"TELEMETRY_DISABLED_OFF", nil, nil, @"Don’t Participate", @"Telemetry prompt button");
}
- UIAlertView *alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Make Mapbox Maps Better", @"Telemetry prompt title")
+ UIAlertView *alert = [[UIAlertView alloc] initWithTitle:NSLocalizedStringWithDefaultValue(@"TELEMETRY_TITLE", nil, nil, @"Make Mapbox Maps Better", @"Telemetry prompt title")
message:message
delegate:self
cancelButtonTitle:participate
- otherButtonTitles:NSLocalizedString(@"Tell Me More", @"Telemetry prompt button"), optOut, nil];
+ otherButtonTitles:NSLocalizedStringWithDefaultValue(@"TELEMETRY_MORE", nil, nil, @"Tell Me More", @"Telemetry prompt button"), optOut, nil];
[alert show];
}
}
@@ -4071,7 +4071,7 @@ mbgl::Duration MGLDurationInSeconds(NSTimeInterval duration)
// Explanation
UILabel *explanationLabel = [[UILabel alloc] init];
- explanationLabel.text = [NSString stringWithFormat:NSLocalizedString(@"To display a Mapbox-hosted map here, set %@ to your access token in %@\n\nFor detailed instructions, see:", @"Instructions in Interface Builder designable; property list dictionary key, file name"), @"MGLMapboxAccessToken", @"Info.plist"];
+ explanationLabel.text = [NSString stringWithFormat:NSLocalizedStringWithDefaultValue(@"DESIGNABLE", nil, nil, @"To display a Mapbox-hosted map here, set %@ to your access token in %@\n\nFor detailed instructions, see:", @"Instructions in Interface Builder designable; {key}, {plist file name}"), @"MGLMapboxAccessToken", @"Info.plist"];
explanationLabel.font = [UIFont preferredFontForTextStyle:UIFontTextStyleBody];
explanationLabel.numberOfLines = 0;
explanationLabel.translatesAutoresizingMaskIntoConstraints = NO;
@@ -4081,7 +4081,7 @@ mbgl::Duration MGLDurationInSeconds(NSTimeInterval duration)
// Link
UIButton *linkButton = [UIButton buttonWithType:UIButtonTypeSystem];
- [linkButton setTitle:NSLocalizedString(@"mapbox.com/help/first-steps-ios-sdk", @"Setup documentation URL display string") forState:UIControlStateNormal];
+ [linkButton setTitle:NSLocalizedStringWithDefaultValue(@"FIRST_STEPS_URL", nil, nil, @"mapbox.com/help/first-steps-ios-sdk", @"Setup documentation URL display string; keep as short as possible") forState:UIControlStateNormal];
linkButton.translatesAutoresizingMaskIntoConstraints = NO;
linkButton.titleLabel.numberOfLines = 0;
[linkButton setContentCompressionResistancePriority:UILayoutPriorityDefaultLow
diff --git a/platform/ios/src/MGLUserLocation.m b/platform/ios/src/MGLUserLocation.m
index 72acb6db97..a568ec8be1 100644
--- a/platform/ios/src/MGLUserLocation.m
+++ b/platform/ios/src/MGLUserLocation.m
@@ -69,7 +69,7 @@ NS_ASSUME_NONNULL_END
- (NSString *)title
{
- return _title ?: NSLocalizedString(@"You Are Here", @"Default user location annotation title");
+ return _title ?: NSLocalizedStringWithDefaultValue(@"USER_DOT_TITLE", nil, nil, @"You Are Here", @"Default user location annotation title");
}
- (NSString *)description
diff --git a/platform/ios/src/MGLUserLocationAnnotationView.m b/platform/ios/src/MGLUserLocationAnnotationView.m
index d0497416b8..be93b78841 100644
--- a/platform/ios/src/MGLUserLocationAnnotationView.m
+++ b/platform/ios/src/MGLUserLocationAnnotationView.m
@@ -54,7 +54,7 @@ const CGFloat MGLUserLocationAnnotationArrowSize = MGLUserLocationAnnotationPuck
self.annotation = [[MGLUserLocation alloc] initWithMapView:mapView];
_mapView = mapView;
[self setupLayers];
- self.accessibilityLabel = NSLocalizedString(@"User location", @"Accessibility label");
+ self.accessibilityLabel = NSLocalizedStringWithDefaultValue(@"USER_DOT_A11Y_LABEL", nil, nil, @"User location", @"Accessibility label");
}
return self;
}