import { IGroupTemplate } from "../types" ; import { getProp } from "@esri/hub-common" ; param { object } template param { string } title param { object } translation private export function _translateTeamTemplate ( template , title , translation ) { ( [ "titleI18n" , "descriptionI18n" , "snippetI18n" ] as const ) . forEach ( key => { const i18nKey = template . config [ key ] ; const targetProp = key . replace ( "I18n" , "" ) ; const val = getProp ( translation , `addons.services.teams.groups.${ i18nKey }` ) ; template [ targetProp ] = val . replace ( /{title}/g , title ) ; } ) ; return template ; }