mirror of
https://github.com/discourse/discourse.git
synced 2025-05-05 14:04:39 +08: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
@ -38,7 +38,11 @@ Discourse.AdminUser = Discourse.User.extend({
|
|||||||
|
|
||||||
deleteAllPostsExplanation: function() {
|
deleteAllPostsExplanation: function() {
|
||||||
if (!this.get('can_delete_all_posts')) {
|
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 {
|
} else {
|
||||||
return null;
|
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.)"
|
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.)"
|
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:
|
cant_delete_all_posts:
|
||||||
one: "Can't delete all posts. Some posts are older than %{count} day 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."
|
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_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_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"
|
delete_dont_block: "<b>Yes</b>, just delete the user"
|
||||||
|
@ -155,7 +155,9 @@ users:
|
|||||||
delete_user_max_post_age:
|
delete_user_max_post_age:
|
||||||
client: true
|
client: true
|
||||||
default: 60
|
default: 60
|
||||||
delete_all_posts_max: 15
|
delete_all_posts_max:
|
||||||
|
client: true
|
||||||
|
default: 15
|
||||||
redirect_users_to_top_page: true
|
redirect_users_to_top_page: true
|
||||||
|
|
||||||
posting:
|
posting:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user