diff --git a/src/translator.ts b/src/translator.ts index 07b9996e..2e86e9f2 100644 --- a/src/translator.ts +++ b/src/translator.ts @@ -218,15 +218,15 @@ export class SCThingTranslator { * All the values will be set to the known translations of the property/key name * @example * const translatedMetaDish = translator.translatedPropertyNames(SCThingType.CourseOfStudies); - * @param thing The thing whose property names will be translated + * @param type The type whose property names will be translated * @param language The language all property names will be translated to * @returns An object with the properties of the SCThingType where the values are the known property tranlations */ - public translatedPropertyNames(thing: T, + public translatedPropertyNames(type: SCThingType, language?: keyof SCTranslations): T | undefined { const targetLanguage = (typeof language !== 'undefined') ? language : this.language; - return this.getAllMetaFieldTranslations(thing.type, targetLanguage) as T; + return this.getAllMetaFieldTranslations(type, targetLanguage) as T; } /**