UX: better wording when there are no unused tags to delete

This commit is contained in:
Neil Lalonde 2020-08-19 11:31:32 -04:00
parent 367de2594d
commit 96511e4548
No known key found for this signature in database
GPG Key ID: FF871CA9037D0A91
2 changed files with 7 additions and 0 deletions

View File

@ -64,6 +64,12 @@ export default Controller.extend({
.then(result => {
const displayN = 20;
const tags = result["tags"];
if (tags.length === 0) {
bootbox.alert(I18n.t("tagging.delete_no_unused_tags"));
return;
}
const joinedTags = tags.slice(0, displayN).join(", ");
var more = Math.max(0, tags.length - displayN);

View File

@ -3355,6 +3355,7 @@ en:
delete_unused_confirmation_more_tags:
one: "%{tags} and %{count} more"
other: "%{tags} and %{count} more"
delete_no_unused_tags: "There are no unused tags."
delete_unused: "Delete Unused Tags"
delete_unused_description: "Delete all tags which are not attached to any topics or personal messages"
cancel_delete_unused: "Cancel"