From: Claire Date: Tue, 31 May 2022 03:53:43 +0000 (+0200) Subject: Change language to be carried over on reply (#18557) X-Git-Url: https://git.xn--scling-oua.cat.family/?a=commitdiff_plain;h=cebe28a4edf72277289aa1ede566bbdb8d1d4235;p=mastodon.git Change language to be carried over on reply (#18557) In most cases, replies to a toot are written in the same language as the toot being replied to. --- diff --git a/app/javascript/mastodon/reducers/compose.js b/app/javascript/mastodon/reducers/compose.js index d7478c33d..7aac87b5c 100644 --- a/app/javascript/mastodon/reducers/compose.js +++ b/app/javascript/mastodon/reducers/compose.js @@ -328,6 +328,10 @@ export default function compose(state = initialState, action) { map.set('preselectDate', new Date()); map.set('idempotencyKey', uuid()); + if (action.status.get('language')) { + map.set('language', action.status.get('language')); + } + if (action.status.get('spoiler_text').length > 0) { map.set('spoiler', true); map.set('spoiler_text', action.status.get('spoiler_text'));