[24218] Fix reference to parent type name

pull/5004/head
Oliver Günther 8 years ago
parent f44091fbde
commit 463e2b8cb4
No known key found for this signature in database
GPG Key ID: 88872239EB414F99
  1. 2
      config/locales/js-en.yml
  2. 11
      frontend/app/components/wp-create/wp-create.controller.ts

@ -427,7 +427,7 @@ en:
create:
header: 'New %{type}'
header_no_type: 'New work package (Type not yet set)'
header_with_parent: 'New %{type} (Child of %{type} #%{id})'
header_with_parent: 'New %{type} (Child of %{parent_type} #%{id})'
button: 'Create'
no_results:
title: No work packages to display.

@ -40,10 +40,18 @@ export class WorkPackageCreateController {
public successState:string;
public get header():string {
if (!this.newWorkPackage.type) {
return this.I18n.t('js.work_packages.create.header_no_type');
}
if (this.parentWorkPackage) {
return this.I18n.t(
'js.work_packages.create.header_with_parent',
{ type: this.parentWorkPackage.type.name, id: this.parentWorkPackage.id }
{
type: this.newWorkPackage.type.name,
parent_type: this.parentWorkPackage.type.name,
id: this.parentWorkPackage.id
}
);
}
@ -54,7 +62,6 @@ export class WorkPackageCreateController {
);
}
return this.I18n.t('js.work_packages.create.header_no_type');
}
constructor(protected $state,

Loading…
Cancel
Save