From 987f190839052d3e4951a4be4f3cfa1c2755056a Mon Sep 17 00:00:00 2001 From: Claire Date: Sat, 12 Aug 2023 00:06:37 +0200 Subject: [PATCH] [Glitch] Fix reply not preserving the language from the replied-to post Port 34f3001278606f6c1371e3a7f4f1f7a6c235ec9b to glitch-soc Signed-off-by: Claire --- .../flavours/glitch/actions/importer/normalizer.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/javascript/flavours/glitch/actions/importer/normalizer.js b/app/javascript/flavours/glitch/actions/importer/normalizer.js index f58f275171..97f94d9e46 100644 --- a/app/javascript/flavours/glitch/actions/importer/normalizer.js +++ b/app/javascript/flavours/glitch/actions/importer/normalizer.js @@ -75,7 +75,10 @@ export function normalizeStatus(status, normalOldStatus, settings) { normalStatus.contentHtml = normalOldStatus.get('contentHtml'); normalStatus.spoilerHtml = normalOldStatus.get('spoilerHtml'); normalStatus.hidden = normalOldStatus.get('hidden'); - normalStatus.translation = normalOldStatus.get('translation'); + + if (normalOldStatus.get('translation')) { + normalStatus.translation = normalOldStatus.get('translation'); + } } else { const spoilerText = normalStatus.spoiler_text || ''; const searchContent = ([spoilerText, status.content].concat((status.poll && status.poll.options) ? status.poll.options.map(option => option.title) : [])).concat(status.media_attachments.map(att => att.description)).join('\n\n').replace(//g, '\n').replace(/<\/p>

/g, '\n\n');