diff --git a/app/assets/javascripts/discourse/templates/flag.js.handlebars b/app/assets/javascripts/discourse/templates/flag.js.handlebars index eb5f2cb81..115bbe594 100644 --- a/app/assets/javascripts/discourse/templates/flag.js.handlebars +++ b/app/assets/javascripts/discourse/templates/flag.js.handlebars @@ -31,6 +31,6 @@ {{#if view.showSubmit}} <div class="modal-footer"> - <button class='btn btn-primary' {{action createFlag target="view"}}>{{i18n flagging.action}}</button> + <button class='btn btn-primary' {{action createFlag target="view"}}>{{view.submitText}}</button> </div> {{/if}} diff --git a/app/assets/javascripts/discourse/views/modal/flag_view.js b/app/assets/javascripts/discourse/views/modal/flag_view.js index 064308dcf..6339287ef 100644 --- a/app/assets/javascripts/discourse/views/modal/flag_view.js +++ b/app/assets/javascripts/discourse/views/modal/flag_view.js @@ -73,6 +73,15 @@ Discourse.FlagView = Discourse.ModalBodyView.extend({ return false; }).property('isCustomFlag', 'selected.customMessageLength', 'postActionTypeId'), + submitText: function(){ + var action = this.get('selected'); + if (this.get('selected.is_custom_flag')) { + return Em.String.i18n("flagging.notify_action"); + } else { + return Em.String.i18n("flagging.action"); + } + }.property('selected'), + didInsertElement: function() { this.set('postActionTypeId', null); diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index c7c721f41..91bcf3708 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -727,6 +727,7 @@ en: flagging: title: 'Why are you flagging this post?' action: 'Flag Post' + notify_action: 'Notify' cant: "Sorry, you can't flag this post at this time." custom_placeholder_notify_user: "Why does this post require you to speak to this user directly and privately? Be specific, be constructive, and always be kind." custom_placeholder_notify_moderators: "Why does this post require moderator attention? Let us know specifically what you are concerned about, and provide relevant links where possible."