diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2016-04-27 14:10:01 -0700 |
---|---|---|
committer | Minh Nguyễn <mxn@1ec5.org> | 2016-05-04 02:23:20 -0700 |
commit | 9a280b8d9df8bb726b1eb2979a651c5b33a5d159 (patch) | |
tree | 1fe1d69e68a2ff3de11f79fc29ae2a9ac67fffbc | |
parent | 7e6995d153f78ea3ef283acacb204e7e4e8684ec (diff) | |
download | qtlocation-mapboxgl-9a280b8d9df8bb726b1eb2979a651c5b33a5d159.tar.gz |
[ios] Corrected map accessibility value
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.
-rw-r--r-- | platform/ios/resources/en.lproj/Localizable.stringsdict | 12 | ||||
-rw-r--r-- | 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 68204839f9..ee4de02116 100644 --- a/platform/ios/resources/en.lproj/Localizable.stringsdict +++ b/platform/ios/resources/en.lproj/Localizable.stringsdict @@ -5,22 +5,18 @@ <key>MAP_A11Y_VALUE</key> <dict> <key>NSStringLocalizedFormatKey</key> - <string>%#@count@</string> + <string>Zoom %dx +%#@count@ visible</string> <key>count</key> <dict> <key>NSStringFormatSpecTypeKey</key> <string>NSStringPluralRuleType</string> <key>NSStringFormatValueTypeKey</key> <string>ld</string> - <key>zero</key> - <string>Zoom %dx -no annotations visible</string> <key>one</key> - <string>Zoom %dx -%d annotation visible</string> + <string>%d annotation</string> <key>other</key> - <string>Zoom %dx -%d annotations visible</string> + <string>%d annotations</string> </dict> </dict> </dict> diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm index 355f0b4155..cbf2a749cd 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]; } |