about summary refs log tree commit diff
path: root/config
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2020-01-27 17:26:53 +0100
committerGitHub <noreply@github.com>2020-01-27 17:26:53 +0100
commit67b8af34b3df55ba74a53af731f275d0a4c6d9f8 (patch)
treed1f2420e0ea7cea72ea8032ce005c39c36f38a43 /config
parent8924743349ec5ce37cd949445e071c14968ec2ec (diff)
parentcf230d551f3081115402f74d4326a2682f27fedc (diff)
Merge pull request #1271 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'config')
-rw-r--r--config/application.rb1
-rw-r--r--config/locales/en.yml5
-rw-r--r--config/routes.rb8
3 files changed, 13 insertions, 1 deletions
diff --git a/config/application.rb b/config/application.rb
index bf25fa0d9..1baa166ce 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -73,6 +73,7 @@ module Mastodon
       :it,
       :ja,
       :ka,
+      :kab,
       :kk,
       :kn,
       :ko,
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 432661c09..5c402c0dc 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -232,6 +232,7 @@ en:
       deleted_status: "(deleted status)"
       title: Audit log
     announcements:
+      destroyed_msg: Announcement successfully deleted!
       edit:
         title: Edit announcement
       empty: No announcements found.
@@ -240,8 +241,12 @@ en:
         create: Create announcement
         title: New announcement
       published: Published
+      published_msg: Announcement successfully published!
+      scheduled_msg: Announcement scheduled for publication!
       time_range: Time range
       title: Announcements
+      unpublished_msg: Announcement successfully unpublished!
+      updated_msg: Announcement successfully updated!
     custom_emojis:
       assign_category: Assign category
       by_domain: Domain
diff --git a/config/routes.rb b/config/routes.rb
index 322d66aec..b56f7fd87 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -179,7 +179,13 @@ Rails.application.routes.draw do
     resources :email_domain_blocks, only: [:index, :new, :create, :destroy]
     resources :action_logs, only: [:index]
     resources :warning_presets, except: [:new]
-    resources :announcements, except: [:show]
+
+    resources :announcements, except: [:show] do
+      member do
+        post :publish
+        post :unpublish
+      end
+    end
 
     resource :settings, only: [:edit, :update]