mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -05:00
FEATURE: when post is too short, suggest using the like button instead
This commit is contained in:
parent
a3b6e3cb97
commit
3071650eb3
3 changed files with 6 additions and 1 deletions
|
@ -1,2 +1,2 @@
|
|||
<span class="close"><i class="fa fa-times-circle"></i></span>
|
||||
{{view.validation.reason}}
|
||||
{{{view.validation.reason}}}
|
||||
|
|
|
@ -573,6 +573,10 @@ const ComposerView = Discourse.View.extend(Ember.Evented, {
|
|||
reason = I18n.t('composer.error.post_missing');
|
||||
} else if( missingChars > 0 ) {
|
||||
reason = I18n.t('composer.error.post_length', {min: this.get('model.minimumPostLength')});
|
||||
let tl = Discourse.User.currentProp("trust_level");
|
||||
if (tl === 0 || tl === 1) {
|
||||
reason += "<br/>" + I18n.t('composer.error.try_like');
|
||||
}
|
||||
}
|
||||
|
||||
if( reason ) {
|
||||
|
|
|
@ -738,6 +738,7 @@ en:
|
|||
title_too_long: "Title can't be more than {{max}} characters"
|
||||
post_missing: "Post can't be empty"
|
||||
post_length: "Post must be at least {{min}} characters"
|
||||
try_like: 'Have you tried the <i class="fa fa-heart"></i> button?'
|
||||
category_missing: "You must choose a category"
|
||||
|
||||
save_edit: "Save Edit"
|
||||
|
|
Loading…
Reference in a new issue