import { IManifestUpdater } from "../../IManifestUpdater" ; import { GeneratorTeamsAppOptions } from "../../../GeneratorTeamsAppOptions" ; export class LocalizationManifestUpdater implements IManifestUpdater { public updateManifest ( manifest , options ) { if ( options . localization ) { if ( ! options . defaultLanguage ) { throw "Localization requires a default language tag" ; } if ( ! manifest . localizationInfo ) { manifest . localizationInfo = { } ; } if ( options . defaultLanguage ) { manifest . localizationInfo . defaultLanguageTag = options . defaultLanguage ; } if ( options . additionalLanguage ) { const lang = { languageTag : options . additionalLanguage , file : `${ options . additionalLanguage }.json` } ; if ( ! manifest . localizationInfo . additionalLanguages ) { manifest . localizationInfo . additionalLanguages = [ ] ; } manifest . localizationInfo . additionalLanguages . push ( lang ) ; } } } }