A platform for community discussion. Free, open, simple.
UX: Omit instruction note when `email_time_window_mins` is off (#19385)
Penar Musaraj0c50bacbc0c4
diff --git a/app/assets/javascripts/discourse/app/controllers/preferences/emails.js b/app/assets/javascripts/discourse/app/controllers/preferences/emails.jsindex 2709ebe99eb..a332882af52 100644--- a/app/assets/javascripts/discourse/app/controllers/preferences/emails.js+++ b/app/assets/javascripts/discourse/app/controllers/preferences/emails.js@@ -82,13 +82,11 @@ export default Controller.extend({@discourseComputed()emailFrequencyInstructions() {- if (this.siteSettings.email_time_window_mins) {- return I18n.t("user.email.frequency", {- count: this.siteSettings.email_time_window_mins,- });- } else {- return I18n.t("user.email.frequency_immediately");- }+ return this.siteSettings.email_time_window_mins+ ? I18n.t("user.email.frequency", {+ count: this.siteSettings.email_time_window_mins,+ })+ : null;},actions: {diff --git a/config/locales/client.en.yml b/config/locales/client.en.ymlindex 61f0eb27035..515419eba0e 100644--- a/config/locales/client.en.yml+++ b/config/locales/client.en.yml@@ -1496,7 +1496,6 @@ en:authenticated: "Your email has been authenticated by %{provider}"invite_auth_email_invalid: "Your invitation email does not match the email authenticated by %{provider}"authenticated_by_invite: "Your email has been authenticated by the invitation"- frequency_immediately: "We'll email you immediately if you haven't read the thing we're emailing you about."frequency:one: "We'll only email you if we haven't seen you in the last minute."other: "We'll only email you if we haven't seen you in the last %{count} minutes."