mirror of
https://github.com/whyour/qinglong.git
synced 2026-10-17 07:20:51 +08:00
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.
18 lines
440 B
TypeScript
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',
|
|
},
|
|
},
|
|
});
|
|
}
|