import { translateValueByKey } from '@oinone/kunlun-engine'; import { GenericType, StandardString } from '@oinone/kunlun-shared'; import type { Plugin } from 'vue'; export const $translate: Plugin = { install: (app) => { app.config.globalProperties.$translate = ( text: T, context?: Record ): T => { return translateValueByKey(text as unknown as GenericType, context) as unknown as T; }; } };