Fix <i18nMessage> not localizing the message.

--- Problem (#4173) ---
Messages under <i18nMessage> weren't localized although the translation is available. However, the tokens for these messages are localized, causing a mixed-language final string.

--- Fix ---
It appears that the original message (instead of the localized) was used in the token-substitution process.
This commit is contained in:
infiinte-persistence 2020-05-25 06:15:58 +08:00 committed by Sean Yesmunt
parent f1a62160b4
commit 23848dd37a

View file

@ -15,7 +15,7 @@ export default function I18nMessage(props: Props) {
return message;
}
const messageSubstrings = props.children.split(regexp),
const messageSubstrings = message.split(regexp),
tokens = props.tokens;
return (