From df8a9343767ae25394ff4f0637ec7d974e8b5722 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguye=CC=82=CC=83n?= Date: Thu, 20 Feb 2020 17:05:05 -0800 Subject: [PATCH] [ios, macos] Streets tiles can contain Traditional Chinese, Vietnamese --- platform/darwin/src/MGLVectorTileSource.mm | 8 ++++---- platform/darwin/test/MGLStyleTests.mm | 2 +- platform/ios/CHANGELOG.md | 4 ++++ platform/macos/CHANGELOG.md | 1 + 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/platform/darwin/src/MGLVectorTileSource.mm b/platform/darwin/src/MGLVectorTileSource.mm index 9ab11e2e5..53eef0efd 100644 --- a/platform/darwin/src/MGLVectorTileSource.mm +++ b/platform/darwin/src/MGLVectorTileSource.mm @@ -89,8 +89,8 @@ https://www.mapbox.com/vector-tiles/mapbox-streets-v8/ */ static NSArray * const MGLMapboxStreetsLanguages = @[ - @"ar", @"de", @"en", @"es", @"fr", @"ja", @"ko", @"pt", @"ru", @"zh", - @"zh-Hans", + @"ar", @"de", @"en", @"es", @"fr", @"ja", @"ko", @"pt", @"ru", @"vi", + @"zh-Hans", @"zh-Hant", ]; /** @@ -98,8 +98,8 @@ static NSArray * const MGLMapboxStreetsLanguages = @[ `+[NSBundle preferredLocalizationsFromArray:forPreferences:]`. */ static NSArray * const MGLMapboxStreetsAlternativeLanguages = @[ - @"mul", @"ar", @"de", @"es", @"fr", @"ja", @"ko", @"pt", @"ru", @"zh", - @"zh-Hans", + @"mul", @"ar", @"de", @"es", @"fr", @"ja", @"ko", @"pt", @"ru", @"vi", + @"zh-Hans", @"zh-Hant", ]; + (NSSet *)mapboxStreetsLanguages { diff --git a/platform/darwin/test/MGLStyleTests.mm b/platform/darwin/test/MGLStyleTests.mm index ec2605646..44f6b792a 100644 --- a/platform/darwin/test/MGLStyleTests.mm +++ b/platform/darwin/test/MGLStyleTests.mm @@ -457,7 +457,7 @@ } { NSArray *preferences = @[@"zh-Hant"]; - XCTAssertNil([MGLVectorTileSource preferredMapboxStreetsLanguageForPreferences:preferences]); + XCTAssertEqualObjects([MGLVectorTileSource preferredMapboxStreetsLanguageForPreferences:preferences], @"zh-Hant"); } { NSArray *preferences = @[@"en", @"fr", @"el"]; diff --git a/platform/ios/CHANGELOG.md b/platform/ios/CHANGELOG.md index 8d3baa335..1b509baf6 100644 --- a/platform/ios/CHANGELOG.md +++ b/platform/ios/CHANGELOG.md @@ -2,6 +2,10 @@ Mapbox welcomes participation and contributions from everyone. Please read [CONTRIBUTING.md](../../CONTRIBUTING.md) to get started. +## master + +* The `-[MGLStyle localizeLabelsIntoLocale:]` and `-[NSExpression mgl_expressionLocalizedIntoLocale:]` methods can now localize text into Traditional Chinese and Vietnamese. ([#173](https://github.com/mapbox/mapbox-gl-native-ios/pull/173)) + ## 5.7.0 - February 13, 2020 ### Bug fixes diff --git a/platform/macos/CHANGELOG.md b/platform/macos/CHANGELOG.md index 50757673d..e09e91b2e 100644 --- a/platform/macos/CHANGELOG.md +++ b/platform/macos/CHANGELOG.md @@ -27,6 +27,7 @@ * Setting `MGLMapView.contentInset` now moves the map’s focal point to the center of the content frame after insetting. ([#14664](https://github.com/mapbox/mapbox-gl-native/pull/14664)) * Added the `-[MGLMapViewDelegate mapView:shouldRemoveStyleImage:]` method for optimizing style image caching. ([#14769](https://github.com/mapbox/mapbox-gl-native/pull/14769)) * Introduce `text-writing-mode` layout property for symbol layer ([#14932](https://github.com/mapbox/mapbox-gl-native/pull/14932)). The `text-writing-mode` layout property allows control over symbol's preferred writing mode. The new property value is an array, whose values are enumeration values from a ( `horizontal` | `vertical` ) set. +* The `-[MGLStyle localizeLabelsIntoLocale:]` and `-[NSExpression mgl_expressionLocalizedIntoLocale:]` methods can now localize text into Traditional Chinese and Vietnamese. ([#173](https://github.com/mapbox/mapbox-gl-native-ios/pull/173)) ### Other changes