Files
qinglong/src/utils/init.ts
T
whyour ef348b445b fix: synchronize runtime locales and harden online updates
Translate UI, scheduler, validation, preload and maintenance messages dynamically, and propagate locale changes between workers. Harden update checks, downloads and terminal states, verify Debian pnpm, and ignore generated test artifacts.
2026-10-17 07:07:09 +08:00

18 lines
440 B
TypeScript

import { loader } from '@monaco-editor/react';
import config from './config';
import intl from 'react-intl-universal';
export function init(version: string) {
// monaco 编辑器配置cdn和locale
loader.config({
paths: {
vs: `${config.baseUrl}monaco-editor/min/vs`,
},
'vs/nls': {
availableLanguages: {
'*': intl.getInitOptions().currentLocale === 'en' ? 'i-default' : 'zh-cn',
},
},
});
}