From 9a280b8d9df8bb726b1eb2979a651c5b33a5d159 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguye=CC=82=CC=83n?= Date: Wed, 27 Apr 2016 14:10:01 -0700 Subject: [PATCH] [ios] Corrected map accessibility value MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Corrected the English override strings for the map view’s accessibility value. Prior to this change, the accessibility value would say “0 annotation” instead of “0 annotations” for some reason. The zoom level in the map view’s accessibility value is off by two. --- .../ios/resources/en.lproj/Localizable.stringsdict | 12 ++++-------- platform/ios/src/MGLMapView.mm | 2 +- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/platform/ios/resources/en.lproj/Localizable.stringsdict b/platform/ios/resources/en.lproj/Localizable.stringsdict index 68204839f..ee4de0211 100644 --- a/platform/ios/resources/en.lproj/Localizable.stringsdict +++ b/platform/ios/resources/en.lproj/Localizable.stringsdict @@ -5,22 +5,18 @@ MAP_A11Y_VALUE NSStringLocalizedFormatKey - %#@count@ + Zoom %dx +%#@count@ visible count NSStringFormatSpecTypeKey NSStringPluralRuleType NSStringFormatValueTypeKey ld - zero - Zoom %dx -no annotations visible one - Zoom %dx -%d annotation visible + %d annotation other - Zoom %dx -%d annotations visible + %d annotations diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm index 355f0b415..cbf2a749c 100644 --- a/platform/ios/src/MGLMapView.mm +++ b/platform/ios/src/MGLMapView.mm @@ -1860,7 +1860,7 @@ mbgl::Duration MGLDurationInSeconds(NSTimeInterval duration) - (NSString *)accessibilityValue { - double zoomLevel = round(self.zoomLevel - 1); + double zoomLevel = round(self.zoomLevel + 1); return [NSString stringWithFormat:NSLocalizedStringWithDefaultValue(@"MAP_A11Y_VALUE", nil, nil, @"Zoom %dx\n%ld annotation(s) visible", @"Map accessibility value"), (int)zoomLevel, (long)self.accessibilityAnnotationCount]; }