From f2d50b0bac59f2eab1336722c86cef3c0a8a52a8 Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Thu, 26 Jan 2023 00:34:52 +0800 Subject: [PATCH] Add `lang` to all fields based on chosen language Reference: https://github.com/mastodon/mastodon/issues/19858 --- src/components/compose.jsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/components/compose.jsx b/src/components/compose.jsx index 368d8c93..0c544f0b 100644 --- a/src/components/compose.jsx +++ b/src/components/compose.jsx @@ -783,6 +783,7 @@ function Compose({ placeholder="Content warning" disabled={uiState === 'loading'} class="spoiler-text-field" + lang={language} style={{ opacity: sensitive ? 1 : 0, pointerEvents: sensitive ? 'auto' : 'none', @@ -847,6 +848,7 @@ function Compose({ } required={mediaAttachments.length === 0} disabled={uiState === 'loading'} + lang={language} onInput={() => { updateCharCount(); }} @@ -862,6 +864,7 @@ function Compose({ key={id || fileID || i} attachment={attachment} disabled={uiState === 'loading'} + lang={language} onDescriptionChange={(value) => { setMediaAttachments((attachments) => { const newAttachments = [...attachments]; @@ -895,6 +898,7 @@ function Compose({ )} {!!poll && ( {}, onRemove = () => {}, }) { @@ -1274,6 +1279,7 @@ function MediaAttachment({