From 13cc0fd665696e9d0fcdd00300b422465418cf14 Mon Sep 17 00:00:00 2001 From: Maja Komel Date: Fri, 6 Oct 2017 15:35:15 +0200 Subject: [PATCH] replace zero key with no_topics --- app/assets/javascripts/discourse/controllers/tags-show.js.es6 | 3 ++- config/locales/client.en.yml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/discourse/controllers/tags-show.js.es6 b/app/assets/javascripts/discourse/controllers/tags-show.js.es6 index 3cb203b9349..e7f607174ec 100644 --- a/app/assets/javascripts/discourse/controllers/tags-show.js.es6 +++ b/app/assets/javascripts/discourse/controllers/tags-show.js.es6 @@ -116,7 +116,8 @@ export default Ember.Controller.extend(BulkTopicSelection, { deleteTag() { const self = this; const topicsLength = this.get('list.topic_list.topics.length'); - bootbox.confirm(I18n.t("tagging.delete_confirm", {count: topicsLength}), function(result) { + 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() { diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index be0751c5d74..02078982668 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -2457,7 +2457,7 @@ en: 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?" - zero: "Are you sure you want to delete this tag?" + 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:"