REFACTOR: Rename SiteSetting.disable_edit_notifications to disable_system_edit_notifications (#7958)

REFACTOR: Rename SiteSetting.disable_edit_notifications to disable_system_edit_notifications (#7958)

  • REFACTOR: Rename SiteSetting.disable_edit_notifications to disable_system_edit_notifications
  • The older name could cause some confusion because the setting does not disable all edit notifications, only system ones.
  • FIX: Add frozen_string_literal: true in the migration

  • DEV: Deprecate ‘disable_edit_notifications’

diff --git a/app/services/post_action_notifier.rb b/app/services/post_action_notifier.rb
index 237f7e5..ee20f2d 100644
--- a/app/services/post_action_notifier.rb
+++ b/app/services/post_action_notifier.rb
@@ -97,7 +97,7 @@ class PostActionNotifier
     return if post_revision.user.blank?
     return if post.topic.blank?
     return if post.topic.private_message?
-    return if SiteSetting.disable_edit_notifications && post_revision.user_id == Discourse::SYSTEM_USER_ID
+    return if SiteSetting.disable_system_edit_notifications && post_revision.user_id == Discourse::SYSTEM_USER_ID
 
     user_ids = []
 
diff --git a/config/locales/server.ar.yml b/config/locales/server.ar.yml
index 40452d6..2564255 100644
--- a/config/locales/server.ar.yml
+++ b/config/locales/server.ar.yml
@@ -1165,7 +1165,7 @@ ar:
     dominating_topic_minimum_percent: "ما هي النسبه المئويه للمشاركات التي يجب علي المستخدم عملها في الموضوع قبل تلقيه لتنبيه عن خروجه لنطاق الموضوع"
     disable_avatar_education_message: "عطل الرسالة التعليمية لتغيير الصورة الرمزية."
     suppress_uncategorized_badge: "لا تظهر الشارة للموضوعات غير المصنفة في قائمة الموضوعات."
-    disable_edit_notifications: "لتعطيل تحرير الاشعارات بواسطة العضو النظام عندما يكون نشطاً 'download_remote_images_to_local'."
+    disable_system_edit_notifications: "لتعطيل تحرير الاشعارات بواسطة العضو النظام عندما يكون نشطاً 'download_remote_images_to_local'."
     automatically_unpin_topics: "تلقائياً قم بنزع الدبوس عندا يصل المستخدم إلي نهاية الصفحه"
     read_time_word_count: "عداد الكلمات للدقيقه لحساب الوقت المقدر للقراءه "
     full_name_required: "الإسم الكامل مطلوب وهو ضروري لإكمال الحساب "
diff --git a/config/locales/server.be.yml b/config/locales/server.be.yml
index 5efe2fa..a2387c4 100644
--- a/config/locales/server.be.yml
+++ b/config/locales/server.be.yml
@@ -1277,7 +1277,7 @@ be:
     suppress_uncategorized_badge: "Не паказваць значок для неклясыфікаваных тэма ў спісах тэмы."
     header_dropdown_category_count: "Колькі катэгорый могуць быць адлюстраваны ў меню загалоўка спісу."
     global_notice: "Дысплей настойлівая, EMERGENCY, неотстранимый глабальны банэр апавяшчэння для ўсіх наведвальнікаў, каб змяніць поле пустым, каб схаваць яго (HTML дазволена)."
-    disable_edit_notifications: "Адключае рэдагаваць апавяшчэння карыстальніка сістэмы, калі «download_remote_images_to_local» актыўна."
+    disable_system_edit_notifications: "Адключае рэдагаваць апавяшчэння карыстальніка сістэмы, калі «download_remote_images_to_local» актыўна."
     likes_notification_consolidation_threshold: "Колькасць ўпадабаных апавяшчэнняў, атрыманых да апавяшчэнняў аб'яднаны ў адну. Усталюйце 0, каб адключыць. Акно можа быць сканфігураваны з дапамогай `SiteSetting.likes_notification_consolidation_window_mins`."
     likes_notification_consolidation_window_mins: "Працягласць ў хвілінах, дзе упадабаныя апавяшчэння аб'яднаны ў адно апавяшчэнне, як толькі парог дасягнуты. Парог можа быць сканфігураваны з дапамогай `SiteSetting.likes_notification_consolidation_threshold`."
     automatically_unpin_topics: "Аўтаматычна распушчае мацаваньне тэмы, калі карыстальнік дасягае дна."
diff --git a/config/locales/server.bg.yml b/config/locales/server.bg.yml
index 4f5db7e..85c37f7 100644
--- a/config/locales/server.bg.yml
+++ b/config/locales/server.bg.yml
@@ -858,7 +858,7 @@ bg:
     enable_mobile_theme: "Мобилните устройства използват адаптирана тема с възможност за преминаване към нормален изглед. Забранете тази настройка, ако искате да използвате свой собствен стил за мобилните устройства."
     dominating_topic_minimum_percent: "Какъв процент публикации може да направи един потребител преди да бъде предупреден за доминиране в тема."
     suppress_uncategorized_badge: "Не показвай значката в списъците с теми за тези, които не са категоризирани. "
-    disable_edit_notifications: "Забрани редактирането на уведомления от системните потребители когато 'download_remote_images_to_local' е активно."
+    disable_system_edit_notifications: "Забрани редактирането на уведомления от системните потребители когато 'download_remote_images_to_local' е активно."
     full_name_required: "Полето 'Пълно име' е задължително в потребителския профил"
     enable_names: "Покажи пълното име на потребителите на техните профили, потребителски карти, и имейли. Деактивирай за скриване на пълното име навсякъде."
     display_name_on_posts: "Покажи пълните имена на потребителите в техните публикации като допълнение към потребителските им имена @username."
diff --git a/config/locales/server.bs_BA.yml b/config/locales/server.bs_BA.yml
index ce92af0..59a55ba 100644
--- a/config/locales/server.bs_BA.yml
+++ b/config/locales/server.bs_BA.yml
@@ -640,7 +640,7 @@ bs_BA:
     enable_mobile_theme: "Mobile devices use a mobile-friendly theme, with the ability to switch to the full site. Disable this if you want to use a custom stylesheet that is fully responsive."
     dominating_topic_minimum_percent: "What percentage of posts a user has to make in a topic before being reminded about overly dominating a topic."
     suppress_uncategorized_badge: "Don't show the badge for uncategorized topics in topic lists."
-    disable_edit_notifications: "Disables edit notifications by the system user when 'download_remote_images_to_local' is active."
+    disable_system_edit_notifications: "Disables edit notifications by the system user when 'download_remote_images_to_local' is active."
     enable_names: "Allow showing user full names. Disable to hide full names."
     display_name_on_posts: "Show a user's full name on their posts in addition to their @username."
     short_progress_text_threshold: "After the number of posts in a topic goes above this number, the progress bar will only show the current post number. If you change the progress bar's width, you may need to change this value."
diff --git a/config/locales/server.ca.yml b/config/locales/server.ca.yml
index bf9584f..39f5da0 100644
--- a/config/locales/server.ca.yml
+++ b/config/locales/server.ca.yml
@@ -1695,7 +1695,7 @@ ca:
     header_dropdown_category_count: "Quantes categories es poden mostrar en el menú desplegable de la capçalera."
     permalink_normalizations: "Aplica la següent expressió regular abans de coincidir enllaços permanents, per exemple: /(topic.*)\\?.*/\\1 treurà les cadenes de consulta de les rutes de temes. El format és regex+string fes servir \\1 etc. per accedir a captures"
     global_notice: "Mostra un bàner d'avís global d'EMERGÈNCIA URGENT, no descartable, a tots els visitants. Canvieu a blanc per a amagar-lo. (Es permet HTML.)"
-    disable_edit_notifications: "Inhabilita l'edició d'alertes de l'usuari del sistema quan 'download_remote_images_to_local' estigui actiu."
+    disable_system_edit_notifications: "Inhabilita l'edició d'alertes de l'usuari del sistema quan 'download_remote_images_to_local' estigui actiu."
     likes_notification_consolidation_threshold: "Nombre de notificacions amb 'M'agrada' rebudes abans de consolidar les notificacions en una de sola. 0 per desactivar. La finestra es pot configurar mitjançant `SiteSetting.likes_notification_consolidation_window_mins`."
     likes_notification_consolidation_window_mins: "Durada en minuts en què les notificacions amb 'M'agrada' es consoliden en una única notificació una vegada s'ha assolit el llindar. El llindar es pot configurar mitjançant `SiteSetting.likes_notification_consolidation_threshold`."
     automatically_unpin_topics: "Desclava temes automàticament quan l'usuari arribi al final."
diff --git a/config/locales/server.de.yml b/config/locales/server.de.yml
index f63783a..3a60fe6 100644
--- a/config/locales/server.de.yml
+++ b/config/locales/server.de.yml
@@ -1671,7 +1671,7 @@ de:
     header_dropdown_category_count: "Wie viele Kategorien im der Header Dropdown-Liste angezeigt werden können."

[... diff too long, it was truncated ...]

GitHub sha: dcb47d90

1 Like