UX: Don't concatenate title on "Edit Category" dialog

This commit is contained in:
Gerhard Schlager 2019-03-04 18:06:56 +01:00
parent 35275c137b
commit 68e4aba369
3 changed files with 7 additions and 8 deletions

View File

@ -30,12 +30,11 @@ export default Ember.Controller.extend(ModalFunctionality, {
title: function() { title: function() {
if (this.get("model.id")) { 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 ( return I18n.t("category.create");
I18n.t("category.create") +
(this.get("model.name") ? " : " + this.get("model.name") : "")
);
}.property("model.id", "model.name"), }.property("model.id", "model.name"),
titleChanged: function() { titleChanged: function() {

View File

@ -24,5 +24,5 @@
class="btn-default edit-category" class="btn-default edit-category"
action=editCategory action=editCategory
icon="wrench" icon="wrench"
label="category.edit_long"}} label="category.edit"}}
{{/if}} {{/if}}

View File

@ -2352,8 +2352,8 @@ en:
none: "(no category)" none: "(no category)"
all: "All categories" all: "All categories"
choose: "category…" choose: "category…"
edit: "edit" edit: "Edit"
edit_long: "Edit" edit_dialog_title: "Edit: %{categoryName}"
view: "View Topics in Category" view: "View Topics in Category"
general: "General" general: "General"
settings: "Settings" settings: "Settings"