mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-20 08:33:11 +00:00
refactor: update to recent changes in translator
This commit is contained in:
@@ -116,14 +116,14 @@ export class ContextMenuComponent {
|
||||
getTranslatedPropertyName(property: string, onlyForType?: SCThingType): string {
|
||||
return (this.translator
|
||||
// tslint:disable-next-line:no-any
|
||||
.translatedPropertyNames(onlyForType ? onlyForType : SCThingType.AcademicEvent) as any)[property];
|
||||
.translatedPropertyNames(typeof onlyForType !== 'undefined' ? onlyForType : SCThingType.AcademicEvent) as any)[property];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns translated type of given SCThingType string
|
||||
* Returns translated property value
|
||||
*/
|
||||
getTranslatedType(scThingType: string) {
|
||||
return this.translator.translatedThingType(scThingType as SCThingType);
|
||||
getTranslatedPropertyValue(onlyForType: SCThingType, field: string, key?: string): string | undefined {
|
||||
return this.translator.translatedPropertyValue(onlyForType, field, key);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user