From 68e4aba369a96f4dedf73fcdb3cb7168b89384b4 Mon Sep 17 00:00:00 2001 From: Gerhard Schlager Date: Mon, 4 Mar 2019 18:06:56 +0100 Subject: [PATCH] UX: Don't concatenate title on "Edit Category" dialog --- .../discourse/controllers/edit-category.js.es6 | 9 ++++----- .../discourse/templates/components/d-navigation.hbs | 2 +- config/locales/client.en.yml | 4 ++-- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/app/assets/javascripts/discourse/controllers/edit-category.js.es6 b/app/assets/javascripts/discourse/controllers/edit-category.js.es6 index 06e0dd984c9..cb0db1da427 100644 --- a/app/assets/javascripts/discourse/controllers/edit-category.js.es6 +++ b/app/assets/javascripts/discourse/controllers/edit-category.js.es6 @@ -30,12 +30,11 @@ export default Ember.Controller.extend(ModalFunctionality, { title: function() { if (this.get("model.id")) { - return I18n.t("category.edit_long") + " : " + this.get("model.name"); + return I18n.t("category.edit_dialog_title", { + categoryName: this.get("model.name") + }); } - return ( - I18n.t("category.create") + - (this.get("model.name") ? " : " + this.get("model.name") : "") - ); + return I18n.t("category.create"); }.property("model.id", "model.name"), titleChanged: function() { diff --git a/app/assets/javascripts/discourse/templates/components/d-navigation.hbs b/app/assets/javascripts/discourse/templates/components/d-navigation.hbs index 2d1b956b610..5cf53f5a20a 100644 --- a/app/assets/javascripts/discourse/templates/components/d-navigation.hbs +++ b/app/assets/javascripts/discourse/templates/components/d-navigation.hbs @@ -24,5 +24,5 @@ class="btn-default edit-category" action=editCategory icon="wrench" - label="category.edit_long"}} + label="category.edit"}} {{/if}} diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index 0074c82f376..4ae368e72cf 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -2352,8 +2352,8 @@ en: none: "(no category)" all: "All categories" choose: "category…" - edit: "edit" - edit_long: "Edit" + edit: "Edit" + edit_dialog_title: "Edit: %{categoryName}" view: "View Topics in Category" general: "General" settings: "Settings"