From f30b6f55e2d8bfe07135728d9ea5b3e9e9bfa720 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?KMY=EF=BC=88=E9=9B=AA=E3=81=82=E3=81=99=E3=81=8B=EF=BC=89?= Date: Mon, 5 Feb 2024 09:52:44 +0900 Subject: [PATCH] =?UTF-8?q?Add:=20#465=20=E6=99=82=E9=99=90=E6=8A=95?= =?UTF-8?q?=E7=A8=BF=E3=81=AA=E3=81=A9=E3=81=AE=E7=BF=BB=E8=A8=B3=20(#521)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/javascript/mastodon/components/status.jsx | 7 ++---- .../components/expiration_dropdown.jsx | 23 +++++++++++++------ app/javascript/mastodon/locales/en.json | 7 ++++++ app/javascript/mastodon/locales/ja.json | 9 ++++++++ 4 files changed, 34 insertions(+), 12 deletions(-) diff --git a/app/javascript/mastodon/components/status.jsx b/app/javascript/mastodon/components/status.jsx index aea1d88312dea0..8ae2bb91ae2980 100644 --- a/app/javascript/mastodon/components/status.jsx +++ b/app/javascript/mastodon/components/status.jsx @@ -76,10 +76,7 @@ export const defaultMediaVisibility = (status) => { }; const messages = defineMessages({ - public_short: { id: 'privacy.public.short', defaultMessage: 'Public' }, - unlisted_short: { id: 'privacy.unlisted.short', defaultMessage: 'Quiet public' }, - private_short: { id: 'privacy.private.short', defaultMessage: 'Followers' }, - direct_short: { id: 'privacy.direct.short', defaultMessage: 'Specific people' }, + limited_short: { id: 'privacy.limited.short', defaultMessage: 'Limited' }, edited: { id: 'status.edited', defaultMessage: 'Edited {date}' }, }); @@ -612,7 +609,7 @@ class Status extends ImmutablePureComponent { const {statusContentProps, hashtagBar} = getHashtagBarForStatus(status); const expanded = !status.get('hidden') || status.get('spoiler_text').length === 0; - const withLimited = status.get('visibility_ex') === 'limited' && status.get('limited_scope') ? : null; + const withLimited = status.get('visibility_ex') === 'limited' && status.get('limited_scope') ? : null; const withQuote = status.get('quote_id') ? : null; const withReference = (!withQuote && status.get('status_references_count') > 0) ? : null; const withExpiration = status.get('expires_at') ? : null; diff --git a/app/javascript/mastodon/features/compose/components/expiration_dropdown.jsx b/app/javascript/mastodon/features/compose/components/expiration_dropdown.jsx index 44f946bcb8b816..dc0a268bb86960 100644 --- a/app/javascript/mastodon/features/compose/components/expiration_dropdown.jsx +++ b/app/javascript/mastodon/features/compose/components/expiration_dropdown.jsx @@ -13,6 +13,13 @@ import { Icon } from 'mastodon/components/icon'; const messages = defineMessages({ add_expiration: { id: 'status.expiration.add', defaultMessage: 'Set status expiration' }, + expiration_5_minutes: { id: 'status.expiration.5_minutes', defaultMessage: 'Remove 5 minutes later' }, + expiration_30_minutes: { id: 'status.expiration.30_minutes', defaultMessage: 'Remove 30 minutes later' }, + expiration_1_hour: { id: 'status.expiration.1_hour', defaultMessage: 'Remove 1 hour later' }, + expiration_3_hours: { id: 'status.expiration.3_hours', defaultMessage: 'Remove 3 hours later' }, + expiration_12_hours: { id: 'status.expiration.12_hours', defaultMessage: 'Remove 12 hours later' }, + expiration_1_day: { id: 'status.expiration.1_day', defaultMessage: 'Remove 1 day later' }, + expiration_7_days: { id: 'status.expiration.7_days', defaultMessage: 'Remove 7 days later' }, }); const listenerOptions = supportsPassiveEvents ? { passive: true, capture: true } : true; @@ -203,14 +210,16 @@ class ExpirationDropdown extends PureComponent { }; componentWillMount () { + const { intl } = this.props; + this.options = [ - { value: '#exp5m', text: '#exp5m (5 minutes)' }, - { value: '#exp30m', text: '#exp30m (30 minutes)' }, - { value: '#exp1h', text: '#exp1h (1 hour)' }, - { value: '#exp3h', text: '#exp3h (3 hours)' }, - { value: '#exp12h', text: '#exp12h (12 hours)' }, - { value: '#exp1d', text: '#exp1d (1 day)' }, - { value: '#exp7d', text: '#exp7d (7 days)' }, + { value: '#exp5m', text: intl.formatMessage(messages.expiration_5_minutes) }, + { value: '#exp30m', text: intl.formatMessage(messages.expiration_30_minutes) }, + { value: '#exp1h', text: intl.formatMessage(messages.expiration_1_hour) }, + { value: '#exp3h', text: intl.formatMessage(messages.expiration_3_hours) }, + { value: '#exp12h', text: intl.formatMessage(messages.expiration_12_hours) }, + { value: '#exp1d', text: intl.formatMessage(messages.expiration_1_day) }, + { value: '#exp7d', text: intl.formatMessage(messages.expiration_7_days) }, ]; } diff --git a/app/javascript/mastodon/locales/en.json b/app/javascript/mastodon/locales/en.json index b665fe6cbaf36c..c4d38984f48dd9 100644 --- a/app/javascript/mastodon/locales/en.json +++ b/app/javascript/mastodon/locales/en.json @@ -697,6 +697,13 @@ "status.embed": "Embed", "status.emoji_reaction": "Emoji reaction", "status.emoji_reaction.pick": "Pick emoji reaction", + "status.expiration.5_minutes": "Remove 5 minutes later", + "status.expiration.30_minutes": "Remove 30 minutes later", + "status.expiration.1_hour": "Remove 1 hour later", + "status.expiration.3_hours": "Remove 3 hours later", + "status.expiration.12_hours": "Remove 12 hours later", + "status.expiration.1_day": "Remove 1 day later", + "status.expiration.7_days": "Remove 7 days later", "status.expiration.add": "Set status expired time", "status.favourite": "Favorite", "status.filter": "Filter this post", diff --git a/app/javascript/mastodon/locales/ja.json b/app/javascript/mastodon/locales/ja.json index 0b8e84f90ce7f6..9db112f47fc34f 100644 --- a/app/javascript/mastodon/locales/ja.json +++ b/app/javascript/mastodon/locales/ja.json @@ -226,7 +226,9 @@ "compose_form.poll.duration": "アンケート期間", "compose_form.poll.switch_to_multiple": "複数選択に変更", "compose_form.poll.switch_to_single": "単一選択に変更", + "compose_form.publish": "投稿", "compose_form.publish_form": "投稿", + "compose_form.reply": "返信", "compose_form.spoiler.marked": "本文は警告の後ろに隠されます", "compose_form.spoiler.unmarked": "本文は隠されていません", "confirmation_modal.cancel": "キャンセル", @@ -772,6 +774,13 @@ "status.embed": "埋め込み", "status.emoji_reaction": "絵文字リアクション", "status.emoji_reaction.pick": "絵文字を追加する", + "status.expiration.5_minutes": "5 分後に削除", + "status.expiration.30_minutes": "30 分後に削除", + "status.expiration.1_hour": "1 時間後に削除", + "status.expiration.3_hours": "3 時間後に削除", + "status.expiration.12_hours": "12 時間後に削除", + "status.expiration.1_day": "1 日後に削除", + "status.expiration.7_days": "7 日後に削除", "status.expiration.add": "時限投稿を設定", "status.favourite": "お気に入り", "status.filter": "この投稿をフィルターする",