A platform for community discussion. Free, open, simple.
FIX: Translation improvements for unused tags (d89ffbe)
David Taylorba00fcc37180
diff --git a/app/assets/javascripts/discourse/controllers/tags-index.js.es6 b/app/assets/javascripts/discourse/controllers/tags-index.js.es6index 71b2c96da23..00c53920d23 100644--- a/app/assets/javascripts/discourse/controllers/tags-index.js.es6+++ b/app/assets/javascripts/discourse/controllers/tags-index.js.es6@@ -47,20 +47,22 @@ export default Ember.Controller.extend({.then(result => {const displayN = 20;const tags = result["tags"];- const tagString = tags.slice(0, displayN).join(", ");+ const joinedTags = tags.slice(0, displayN).join(", ");var more = Math.max(0, tags.length - displayN);- const string =++ const tagsString =more === 0- ? I18n.t("tagging.delete_unused_confirmation", {- count: tags.length,- tags: tagString- })- : I18n.t("tagging.delete_unused_confirmation_more", {- total: tags.length,- tags: tagString,- count: more+ ? joinedTags+ : I18n.t("tagging.delete_unused_confirmation_more_tags", {+ count: more,+ tags: joinedTags});+ const string = I18n.t("tagging.delete_unused_confirmation", {+ count: tags.length,+ tags: tagsString+ });+bootbox.confirm(string,I18n.t("tagging.cancel_delete_unused"),diff --git a/config/locales/client.en.yml b/config/locales/client.en.ymlindex 734f9592a0b..47658fd6c9b 100644--- a/config/locales/client.en.yml+++ b/config/locales/client.en.yml@@ -2711,11 +2711,11 @@ en:upload_instructions: "One per line, optionally with a tag group in the format 'tag_name,tag_group'."upload_successful: "Tags uploaded successfully"delete_unused_confirmation:- one: "1 tag will be deleted: %{tags}"- other: "{{count}} tags will be deleted: %{tags}"- delete_unused_confirmation_more:- one: "{{total}} tags will be deleted: %{tags} and one more"- other: "{{total}} tags will be deleted: %{tags} and %{count} more"+ one: "%{count} tag will be deleted: %{tags}"+ other: "%{count} tags will be deleted: %{tags}"+ delete_unused_confirmation_more_tags:+ one: "%{tags} and %{count} more"+ other: "%{tags} and %{count} more"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"