]> cat aescling's git repositories - mastodon.git/commitdiff
Change language to be carried over on reply (#18557)
authorClaire <claire.github-309c@sitedethib.com>
Tue, 31 May 2022 03:53:43 +0000 (05:53 +0200)
committeraescling <aescling+gitlab@cat.family>
Sun, 28 Aug 2022 21:14:04 +0000 (17:14 -0400)
In most cases, replies to a toot are written in the same language as the
toot being replied to.

app/javascript/mastodon/reducers/compose.js

index d7478c33d4a9c93d937ceb7597671570df3184cf..7aac87b5c423fddc65cf018fb14be95a740b0f1e 100644 (file)
@@ -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'));