From 68fa43d97c28799bab494a3f3cd78332d42d937c Mon Sep 17 00:00:00 2001 From: naskya Date: Wed, 6 Mar 2024 14:34:29 +0900 Subject: [PATCH] feat (client): add a toggleable setting to show no alt warning --- docs/changelog.md | 1 + locales/en-US.yml | 2 ++ locales/ja-JP.yml | 4 +++- locales/zh-TW.yml | 2 +- packages/client/src/components/MkDialog.vue | 9 ++++----- packages/client/src/components/MkPostForm.vue | 18 +++++++++++++++++- packages/client/src/pages/settings/general.vue | 6 ++++++ .../src/pages/settings/preferences-backups.vue | 1 + packages/client/src/store.ts | 4 ++++ 9 files changed, 39 insertions(+), 8 deletions(-) diff --git a/docs/changelog.md b/docs/changelog.md index 111d554eb2..6d8abed428 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -9,6 +9,7 @@ Critical security updates are indicated by the :warning: icon. - Show unlisted posts from following users in antennas (similar to [Fedibird](https://github.com/fedibird/mastodon/tree/fedibird) and [kmyblue](https://github.com/kmycode/mastodon), unlisted posts from people you don't follow won't be shown) - Add ability to publish the Local and Global timelines on `/timeline` page - Add langage annotation to post contents (!10687) +- Add a toggleable setting to show a warning when you attempt to post files without alt text - Fix bugs - Update documents diff --git a/locales/en-US.yml b/locales/en-US.yml index 1154802575..507dfce883 100644 --- a/locales/en-US.yml +++ b/locales/en-US.yml @@ -1215,6 +1215,8 @@ searchCwAndAlt: "Include content warnings and file descriptions" publishTimelines: "Publish timelines for visitors" publishTimelinesDescription: "If enabled, the Local and Global timeline will be shown on {url} even when signed out." +noAltTextWarning: "Some attached file(s) have no description. Did you forget to write?" +showNoAltTextWarning: "Show a warning if you attempt to post files without a description" _emojiModPerm: unauthorized: "None" diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 285d3f2d7e..af159bbf22 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -76,7 +76,7 @@ lists: "リスト" noLists: "リストはありません" note: "投稿" notes: "投稿" -toPost: "投稿" +toPost: "投稿する" following: "フォロー" followers: "フォロワー" followsYou: "フォローされています" @@ -1021,6 +1021,8 @@ searchPostsWithFiles: "添付ファイルのある投稿のみ" searchCwAndAlt: "閲覧注意の注釈と添付ファイルの代替テキストも検索する" publishTimelines: "非ログインユーザーにもタイムラインを公開する" publishTimelinesDescription: "有効にすると、{url} でローカルタイムラインとグローバルタイムラインが公開されます。" +noAltTextWarning: "説明が書かれていない添付ファイルがあります。書き忘れてはいませんか?" +showNoAltTextWarning: "説明が書かれていない添付ファイルを投稿しようとした場合に警告する" _sensitiveMediaDetection: description: "機械学習を使って自動でセンシティブなメディアを検出し、モデレーションに役立てられます。サーバーの負荷が少し増えます。" diff --git a/locales/zh-TW.yml b/locales/zh-TW.yml index 79ece76e5c..0c1ce84abd 100644 --- a/locales/zh-TW.yml +++ b/locales/zh-TW.yml @@ -73,7 +73,7 @@ lists: "清單" noLists: "你沒有任何清單" note: "貼文" notes: "貼文" -toPost: "貼文" +toPost: "發貼文" following: "追隨中" followers: "追隨者" followsYou: "追隨你的人" diff --git a/packages/client/src/components/MkDialog.vue b/packages/client/src/components/MkDialog.vue index 3c9e0e3a8c..2dca900235 100644 --- a/packages/client/src/components/MkDialog.vue +++ b/packages/client/src/components/MkDialog.vue @@ -144,16 +144,17 @@ :disabled="okButtonDisabled" @click="ok" >{{ - showCancelButton || input || select + okText ?? + (showCancelButton || input || select ? i18n.ts.ok - : i18n.ts.gotIt + : i18n.ts.gotIt) }} {{ i18n.ts.cancel }}{{ cancelText ?? i18n.ts.cancel }}
@@ -194,13 +195,11 @@