This repository has been archived by the owner on Jun 21, 2023. It is now read-only.
Automatic expression localization should try to use requested locale even if not officially supported by Streets source #445
Labels
-[NSExpression mgl_expressionLocalizedIntoLocale:]
only considers the passed-in locale if it’s one of the locales with a dedicatedname_*
property in the Mapbox Streets source. This check can get outdated: if a minor update to the Streets source adds a new language, users of that language don’t automatically see that language until we update a list on the client-side, as in #173. What’s more, if the application is pulling in a tileset other than the Streets source that follows thename_*
convention, it would be nice if this method would work without forcing the application to muck with expressions directly.The fix is to fashion another
name_*
key path expression based on thelocale
argument – without limiting it to the Streets languages – and inserting it at the front of this coalescing expression:mapbox-gl-native-ios/platform/darwin/src/NSExpression+MGLAdditions.mm
Lines 1567 to 1571 in a139216
mapbox-gl-native-ios/platform/darwin/src/NSExpression+MGLAdditions.mm
Line 1590 in a139216
/cc @mapbox/maps-ios
The text was updated successfully, but these errors were encountered: