diff options
Diffstat (limited to 'platform/darwin/src/NSExpression+MGLAdditions.mm')
-rw-r--r-- | platform/darwin/src/NSExpression+MGLAdditions.mm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/platform/darwin/src/NSExpression+MGLAdditions.mm b/platform/darwin/src/NSExpression+MGLAdditions.mm index 4b1fdb818e..9dad00e56e 100644 --- a/platform/darwin/src/NSExpression+MGLAdditions.mm +++ b/platform/darwin/src/NSExpression+MGLAdditions.mm @@ -1471,6 +1471,12 @@ NSDictionary<NSNumber *, NSExpression *> *MGLLocalizedStopDictionary(NSDictionar if (localizedValues != self.constantValue) { return [NSExpression expressionForConstantValue:localizedValues]; } + } else if ([self.constantValue isKindOfClass:[MGLAttributedExpression class]]) { + MGLAttributedExpression *attributedExpression = (MGLAttributedExpression *)self.constantValue; + NSExpression *localizedExpression = [attributedExpression.expression mgl_expressionLocalizedIntoLocale:locale]; + MGLAttributedExpression *localizedAttributedExpression = [MGLAttributedExpression attributedExpression:localizedExpression attributes:attributedExpression.attributes]; + + return [NSExpression expressionForConstantValue:localizedAttributedExpression]; } return self; } |