diff --git a/assets/javascripts/discourse/components/modal/assign-user.js b/assets/javascripts/discourse/components/modal/assign-user.js index fb68511..838a6ce 100644 --- a/assets/javascripts/discourse/components/modal/assign-user.js +++ b/assets/javascripts/discourse/components/modal/assign-user.js @@ -15,22 +15,15 @@ export default class AssignUser extends Component { }; get title() { - let i18nSuffix; - - switch (this.model.targetType) { - case "Post": - i18nSuffix = "_post_modal"; - break; - case "Topic": - i18nSuffix = "_modal"; - break; + if (this.model.targetType === "Post") { + return I18n.t("discourse_assign.assign_post_modal.title"); } - return I18n.t( - `discourse_assign.assign${i18nSuffix}.${ - this.model.reassign ? "reassign_title" : "title" - }` - ); + if (this.model.reassign) { + return I18n.t("discourse_assign.assign_modal.edit_assignments_title"); + } else { + return I18n.t("discourse_assign.assign_modal.title"); + } } @action diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index 050feaa..4d4d97a 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -67,6 +67,7 @@ en: assign_modal: title: "Assign Topic" reassign_title: "Reassign Topic" + edit_assignments_title: "Edit Assignments" assign: "Assign" assignee_label: Assignee assignment_label: Assignment