From f52c988e12e464e7baefc2fdb48ddf4a95584664 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Thu, 23 Jan 2020 22:00:13 +0100 Subject: Add announcements (#12662) * Add announcements Fix #11006 * Add reactions to announcements * Add admin UI for announcements * Add unit tests * Fix issues - Add `with_dismissed` param to announcements API - Fix end date not being formatted when time range is given - Fix announcement delete causing reactions to send streaming updates - Fix announcements container growing too wide and mascot too small - Fix `all_day` being settable when no time range is given - Change text "Update" to "Announcement" * Fix scheduler unpublishing announcements before they are due * Fix filter params not being passed to announcements filter --- config/locales/en.yml | 22 ++++++++++++++++++++++ config/locales/simple_form.en.yml | 12 ++++++++++++ 2 files changed, 34 insertions(+) (limited to 'config/locales') diff --git a/config/locales/en.yml b/config/locales/en.yml index 2bd84c264..c4e846354 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -198,11 +198,13 @@ en: change_email_user: "%{name} changed the e-mail address of user %{target}" confirm_user: "%{name} confirmed e-mail address of user %{target}" create_account_warning: "%{name} sent a warning to %{target}" + create_announcement: "%{name} created new announcement %{target}" create_custom_emoji: "%{name} uploaded new emoji %{target}" create_domain_allow: "%{name} whitelisted domain %{target}" create_domain_block: "%{name} blocked domain %{target}" create_email_domain_block: "%{name} blacklisted e-mail domain %{target}" demote_user: "%{name} demoted user %{target}" + destroy_announcement: "%{name} deleted announcement %{target}" destroy_custom_emoji: "%{name} destroyed emoji %{target}" destroy_domain_allow: "%{name} removed domain %{target} from whitelist" destroy_domain_block: "%{name} unblocked domain %{target}" @@ -224,10 +226,22 @@ en: unassigned_report: "%{name} unassigned report %{target}" unsilence_account: "%{name} unsilenced %{target}'s account" unsuspend_account: "%{name} unsuspended %{target}'s account" + update_announcement: "%{name} updated announcement %{target}" update_custom_emoji: "%{name} updated emoji %{target}" update_status: "%{name} updated status by %{target}" deleted_status: "(deleted status)" title: Audit log + announcements: + edit: + title: Edit announcement + empty: No announcements found. + live: Live + new: + create: Create announcement + title: New announcement + published: Published + time_range: Time range + title: Announcements custom_emojis: assign_category: Assign category by_domain: Domain @@ -657,6 +671,9 @@ en: hint_html: "Tip: We won't ask you for your password again for the next hour." invalid_password: Invalid password prompt: Confirm password to continue + date: + formats: + default: "%b %d, %Y" datetime: distance_in_words: about_x_hours: "%{count}h" @@ -758,6 +775,8 @@ en: all: All changes_saved_msg: Changes successfully saved! copy: Copy + delete: Delete + edit: Edit no_batch_actions_available: No batch actions available on this page order_by: Order by save_changes: Save changes @@ -930,6 +949,9 @@ en: other: Other posting_defaults: Posting defaults public_timelines: Public timelines + reactions: + errors: + unrecognized_emoji: is not a recognized emoji relationships: activity: Account activity dormant: Dormant diff --git a/config/locales/simple_form.en.yml b/config/locales/simple_form.en.yml index 66f518c1b..f050ec8a3 100644 --- a/config/locales/simple_form.en.yml +++ b/config/locales/simple_form.en.yml @@ -14,6 +14,12 @@ en: text_html: Optional. You can use toot syntax. You can add warning presets to save time type_html: Choose what to do with %{acct} warning_preset_id: Optional. You can still add custom text to end of the preset + announcement: + all_day: When checked, only the dates of the time range will be displayed + ends_at: Optional. Announcement will be automatically unpublished at this time + scheduled_at: Leave blank to publish the announcement immediately + starts_at: Optional. In case your announcement is bound to a specific time range + text: You can use toot syntax. Please be mindful of the space the announcement will take up on the user's screen defaults: autofollow: People who sign up through the invite will automatically follow you avatar: PNG, GIF or JPG. At most %{size}. Will be downscaled to %{dimensions}px @@ -83,6 +89,12 @@ en: silence: Silence suspend: Suspend and irreversibly delete account data warning_preset_id: Use a warning preset + announcement: + all_day: All-day event + ends_at: End of event + scheduled_at: Schedule publication + starts_at: Begin of event + text: Announcement defaults: autofollow: Invite to follow your account avatar: Avatar -- cgit