mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -05:00
FIX: give an accurate reason why a user's posts can be deleted from admin
This commit is contained in:
parent
9003186f69
commit
2c4ada6c7d
3 changed files with 13 additions and 4 deletions
|
@ -38,7 +38,11 @@ Discourse.AdminUser = Discourse.User.extend({
|
|||
|
||||
deleteAllPostsExplanation: function() {
|
||||
if (!this.get('can_delete_all_posts')) {
|
||||
return I18n.t('admin.user.cant_delete_all_posts', {count: Discourse.SiteSettings.delete_user_max_post_age});
|
||||
if (this.get('post_count') > Discourse.SiteSettings.delete_all_posts_max) {
|
||||
return I18n.t('admin.user.cant_delete_all_too_many_posts', {count: Discourse.SiteSettings.delete_all_posts_max});
|
||||
} else {
|
||||
return I18n.t('admin.user.cant_delete_all_posts', {count: Discourse.SiteSettings.delete_user_max_post_age});
|
||||
}
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -1631,8 +1631,11 @@ en:
|
|||
one: "Users can't be deleted if they have posts. Delete all posts before trying to delete a user. (Posts older than %{count} day old can't be deleted.)"
|
||||
other: "Users can't be deleted if they have posts. Delete all posts before trying to delete a user. (Posts older than %{count} days old can't be deleted.)"
|
||||
cant_delete_all_posts:
|
||||
one: "Can't delete all posts. Some posts are older than %{count} day old."
|
||||
other: "Can't delete all posts. Some posts are older than %{count} days old."
|
||||
one: "Can't delete all posts. Some posts are older than %{count} day old. (The delete_user_max_post_age setting.)"
|
||||
other: "Can't delete all posts. Some posts are older than %{count} days old. (The delete_user_max_post_age setting.)"
|
||||
cant_delete_all_too_many_posts:
|
||||
one: "Can't delete all posts because the user has more than 1 post. (The delete_all_posts_max setting.)"
|
||||
other: "Can't delete all posts because the user has more than %{count} posts. (The delete_all_posts_max setting.)"
|
||||
delete_confirm: "Are you SURE you want to delete this user? This action is permanent!"
|
||||
delete_and_block: "<b>Yes</b>, and <b>block</b> future signups from this email and IP address"
|
||||
delete_dont_block: "<b>Yes</b>, just delete the user"
|
||||
|
|
|
@ -155,7 +155,9 @@ users:
|
|||
delete_user_max_post_age:
|
||||
client: true
|
||||
default: 60
|
||||
delete_all_posts_max: 15
|
||||
delete_all_posts_max:
|
||||
client: true
|
||||
default: 15
|
||||
redirect_users_to_top_page: true
|
||||
|
||||
posting:
|
||||
|
|
Loading…
Reference in a new issue