mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-04-15 12:16:22 +00:00
fix system messages not being translated (#15405)
This commit is contained in:
parent
aa9b1b2cac
commit
563b780d85
2 changed files with 5 additions and 5 deletions
|
|
@ -129,9 +129,5 @@ export function translateMessage (lang, info) {
|
|||
default:
|
||||
msg = 'Error translating party chat. Unknown message type.';
|
||||
}
|
||||
|
||||
if (!msg.includes('`')) {
|
||||
msg = `\`${msg}\``;
|
||||
}
|
||||
return msg;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -359,7 +359,11 @@ schema.statics.toJSONCleanChat = async function groupToJSONCleanChat (group, use
|
|||
.map(chatMsg => {
|
||||
// Translate system messages
|
||||
if (!_.isEmpty(chatMsg.info)) {
|
||||
chatMsg.text = translateMessage(userLang, chatMsg.info);
|
||||
chatMsg.unformattedText = translateMessage(userLang, chatMsg.info);
|
||||
chatMsg.text = chatMsg.unformattedText;
|
||||
if (!chatMsg.text.includes('`')) {
|
||||
chatMsg.text = `\`${chatMsg.text}\``;
|
||||
}
|
||||
}
|
||||
|
||||
// Convert to timestamps because Android expects it
|
||||
|
|
|
|||
Loading…
Reference in a new issue