import camelCase = require ( 'lodash/camelCase' ) ; import { getMessage as extensionGetMessage } from '../devtools/utils/i18n' ; type GetMessage = typeof import ( '@hint/utils-i18n' ) . getMessage ; export const getMessage = ( key , path , options ? ) => { const pathParts = path . split ( /\\|\//g ) ; const packageName = pathParts [ pathParts . length - 3 ] ; const prefix = camelCase ( packageName ) ; const substitutions = options && options . substitutions ; return extensionGetMessage ( `${ prefix }_${ key }` as any , substitutions ) ; } ;