[30988] Translate widgets in the frontend

https://community.openproject.com/wp/30988
pull/7666/head
Oliver Günther 5 years ago
parent 26f4a52662
commit e10fae81e6
No known key found for this signature in database
GPG Key ID: A3A8BDAD7C0C552C
  1. 7
      frontend/src/app/modules/grids/widgets/abstract-widget.component.ts

@ -14,7 +14,12 @@ export abstract class AbstractWidgetComponent {
@Output() resourceChanged = new EventEmitter<WidgetChangeset>(); @Output() resourceChanged = new EventEmitter<WidgetChangeset>();
public get widgetName() { public get widgetName() {
return this.resource.options.name; let fallback = this.resource.options.name;
let widgetIdentifier = this.resource.identifier;
return this.i18n.t(
`js.grid.widgets.${widgetIdentifier}.title`,
{ defaultValue: fallback }
);
} }
public renameWidget(name:string) { public renameWidget(name:string) {

Loading…
Cancel
Save