From 46bdd13491b08c2a2c03556036179b4ad5d0b4d6 Mon Sep 17 00:00:00 2001 From: Neil Lalonde Date: Fri, 25 Jul 2014 15:58:16 -0400 Subject: [PATCH] FIX: too_few_topics_notice check and message should use basic_requires_read_posts site setting --- app/assets/javascripts/discourse.js | 4 ++-- config/locales/client.en.yml | 2 +- config/site_settings.yml | 4 +++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/assets/javascripts/discourse.js b/app/assets/javascripts/discourse.js index db4bce187de..d0d8e38592b 100644 --- a/app/assets/javascripts/discourse.js +++ b/app/assets/javascripts/discourse.js @@ -152,8 +152,8 @@ window.Discourse = Ember.Application.createWithMixins(Discourse.Ajax, { post_count += c.get('post_count'); } }); - if (topic_count < 5 || post_count < 50) { - notices.push(I18n.t("too_few_topics_notice")); + if (topic_count < 5 || post_count < Discourse.SiteSettings.basic_requires_read_posts) { + notices.push(I18n.t("too_few_topics_notice", {posts: Discourse.SiteSettings.basic_requires_read_posts})); } } diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index 7749d3d35e7..4f90e8ae502 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -490,7 +490,7 @@ en: read_only_mode: enabled: "An administrator enabled read-only mode. You can continue to browse the site but interactions may not work." login_disabled: "Login is disabled while the site is in read only mode." - too_few_topics_notice: "Create at least 5 public topics and 30 public posts to get discussion started. New users will not be able to earn trust levels unless there's content for them to read." + too_few_topics_notice: "Create at least 5 public topics and %{posts} public posts to get discussion started. New users will not be able to earn trust levels unless there's content for them to read." learn_more: "learn more..." diff --git a/config/site_settings.yml b/config/site_settings.yml index 9016549b62e..5002ba34def 100644 --- a/config/site_settings.yml +++ b/config/site_settings.yml @@ -453,7 +453,9 @@ trust: default: 1 enum: 'TrustLevelSetting' basic_requires_topics_entered: 5 - basic_requires_read_posts: 30 + basic_requires_read_posts: + default: 30 + client: true basic_requires_time_spent_mins: 10 regular_requires_topics_entered: 20 regular_requires_read_posts: 100