summaryrefslogtreecommitdiff
path: root/platform/macos/CHANGELOG.md
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2018-04-16 15:24:33 -0700
committerGitHub <noreply@github.com>2018-04-16 15:24:33 -0700
commite16ce7d87954e86542e5ef142dbd3aa2e7bc30e4 (patch)
tree2bbb764024ea4bb9f4121ba3356b6ae19622a4e4 /platform/macos/CHANGELOG.md
parent62dd097328c1776cd62208baf6e46b1cd4154a52 (diff)
downloadqtlocation-mapboxgl-e16ce7d87954e86542e5ef142dbd3aa2e7bc30e4.tar.gz
Localize expressions more thoroughly (#11651)
* [ios] Removed changelog entry for Terrarium The broader feature is new to v4.0.0 as well. * [ios, macos] Localize expressions more thoroughly Replaced the MGLStyle.localizesLabels property with a -localizeLabelsIntoLocale: method that allows the caller to specify the locale to localize into. Also exposed a per-expression localization method for developers who want to vary behavior from layer to layer. * [macos] Offer English labels if preferred language is unsupported * [ios, macos] Removed dead code * [ios] Use new localization method in iosapp * [ios, macos] Fixed local name labels * [ios, macos] Convert tokens to key path expressions in stop dictionaries * [ios, macos] Streamlined token upgrading Separated token upgrading into a separate process that only happens as part of the MGLSymbolStyleLayer.text and MGLSymbolStyleLayer.iconImageName properties’ getters, so that it’s easy to remove later when mbgl changes obviate this workaround. Removed the replacesTokens parameter to the expression localization methods. * [ios, macos] Preserve whitespace between tokens * [ios, macos] Moved token replacement to a consistent category Fixed a build warning. * [ios, macos] Replace tokens in all string-typed getters For consistency, replace tokens with key paths in all string-typed style paint and layout properties. * [ios, macos] Test token replacement Added tests for replacement of tokens with key paths in expressions. Fixed token replacement for raw strings in stop dictionaries. Avoid sticking a single string inside an mgl_join: call. * [ios, macos] Test token replacement, localization Added unit tests of token replacement and localization of expressions. Only NSExpression is responsible for resolving the preferred language now, since NSLocale tends to tack a region code onto the locale identifier and the NSExpression method can be called independently anyways. Added a private variation of +[MGLVectorTileSource preferredMapboxStreetsLanguage] that takes an array of preferred languages. Fixed localization of non-expressions in stop dictionaries. * [ios, macos] Dictionary keys aren’t necessarily zoom levels
Diffstat (limited to 'platform/macos/CHANGELOG.md')
-rw-r--r--platform/macos/CHANGELOG.md1
1 files changed, 1 insertions, 0 deletions
diff --git a/platform/macos/CHANGELOG.md b/platform/macos/CHANGELOG.md
index 9df33211af..0cfba09455 100644
--- a/platform/macos/CHANGELOG.md
+++ b/platform/macos/CHANGELOG.md
@@ -9,6 +9,7 @@
* Renamed `MGLRasterSource` to `MGLRasterTileSource` and `MGLVectorSource` to `MGLVectorTileSource`. ([#11568](https://github.com/mapbox/mapbox-gl-native/pull/11568))
* Added an `MGLComputedShapeSource` class that allows applications to supply vector data to a style layer on a per-tile basis. ([#9983](https://github.com/mapbox/mapbox-gl-native/pull/9983))
* A style can now display smooth hillshading and customize its appearance at runtime using the `MGLHillshadeStyleLayer` class. Hillshading is based on a rasterized digital elevation model supplied by the `MGLRasterDEMSource` class. ([#10642](https://github.com/mapbox/mapbox-gl-native/pull/10642))
+* Replaced the `MGLStyle.localizesLabels` property with an `-[MGLStyle localizeLabelsIntoLocale:]` method that allows you to specify the language to localize into. Note that this method does not automatically update the style when the system’s preferred language changes. Also added an `-[NSExpression(MGLAdditions) mgl_expressionLocalizedIntoLocale:]` method for localizing an individual value used with `MGLSymbolStyleLayer.text`. ([#11651](https://github.com/mapbox/mapbox-gl-native/pull/11651))
* Fixed incorrect color calibration on macOS 10.13 High Sierra when using color-related methods of `MGLStyleLayer` subclasses, as well as when displaying an `MGLAttributionInfo`. It is no longer necessary to explicitly convert an `NSColor` to the sRGB color space before using these classes on High Sierra. ([#11391](https://github.com/mapbox/mapbox-gl-native/pull/11391))
* The `MGLSymbolStyleLayer.textFontNames` property can now depend on a feature’s attributes. ([#10850](https://github.com/mapbox/mapbox-gl-native/pull/10850))
* Properties such as `MGLSymbolStyleLayer.iconAllowsOverlap` and `MGLSymbolStyleLayer.iconIgnoresPlacement` now account for symbols in other sources. ([#10436](https://github.com/mapbox/mapbox-gl-native/pull/10436))