Merge pull request #5227 from majakomel/delete-tag-confirm

UX: Improve Delete Tag Confirm Message
This commit is contained in:
Guo Xiang Tan 2017-10-09 11:26:12 +08:00 committed by GitHub
commit 1d0fadd48c
2 changed files with 7 additions and 2 deletions

View File

@ -115,7 +115,9 @@ export default Ember.Controller.extend(BulkTopicSelection, {
deleteTag() {
const self = this;
bootbox.confirm(I18n.t("tagging.delete_confirm"), function(result) {
const topicsLength = this.get('list.topic_list.topics.length');
const confirmText = topicsLength === 0 ? I18n.t("tagging.delete_confirm_no_topics") : I18n.t("tagging.delete_confirm", {count: topicsLength});
bootbox.confirm(confirmText, function(result) {
if (!result) { return; }
self.get("tag").destroyRecord().then(function() {

View File

@ -2459,7 +2459,10 @@ en:
tags: "Tags"
choose_for_topic: "choose optional tags for this topic"
delete_tag: "Delete Tag"
delete_confirm: "Are you sure you want to delete that tag?"
delete_confirm:
one: "Are you sure you want to delete this tag and remove it from 1 topic it is assigned to?"
other: "Are you sure you want to delete this tag and remove it from {{count}} topics it is assigned to?"
delete_confirm_no_topics: "Are you sure you want to delete this tag?"
rename_tag: "Rename Tag"
rename_instructions: "Choose a new name for the tag:"
sort_by: "Sort by:"