Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Commit 62add8d

Browse files
committed
[ios, macos] Fix a localization issue.
1 parent 0ac95bd commit 62add8d

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

platform/darwin/src/NSExpression+MGLAdditions.mm

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1471,6 +1471,12 @@ - (NSExpression *)mgl_expressionLocalizedIntoLocale:(nullable NSLocale *)locale
14711471
if (localizedValues != self.constantValue) {
14721472
return [NSExpression expressionForConstantValue:localizedValues];
14731473
}
1474+
} else if ([self.constantValue isKindOfClass:[MGLAttributedExpression class]]) {
1475+
MGLAttributedExpression *attributedExpression = (MGLAttributedExpression *)self.constantValue;
1476+
NSExpression *localizedExpression = [attributedExpression.expression mgl_expressionLocalizedIntoLocale:locale];
1477+
MGLAttributedExpression *localizedAttributedExpression = [MGLAttributedExpression attributedExpression:localizedExpression attributes:attributedExpression.attributes];
1478+
1479+
return [NSExpression expressionForConstantValue:localizedAttributedExpression];
14741480
}
14751481
return self;
14761482
}

0 commit comments

Comments
 (0)