chore: replace all cn comments of fe to en version by volc api (#320)
This commit is contained in:
@@ -29,9 +29,9 @@ import { Application, IDEContainerModule } from '../application';
|
||||
import { IDEContainerContext } from './context';
|
||||
|
||||
export interface IDEProviderProps {
|
||||
containerModules?: interfaces.ContainerModule[]; // 注入的 IOC 包
|
||||
containerModules?: interfaces.ContainerModule[]; // Injected IOC packet
|
||||
container?: interfaces.Container;
|
||||
customPluginContext?: (container: interfaces.Container) => PluginContext; // 自定义插件的上下文
|
||||
customPluginContext?: (container: interfaces.Container) => PluginContext; // Customize the plugin's context
|
||||
plugins?: PluginsProvider<any>;
|
||||
children?: React.ReactElement<any, any> | null;
|
||||
}
|
||||
@@ -41,7 +41,7 @@ export interface IDEProviderRef {
|
||||
}
|
||||
|
||||
/**
|
||||
* IDE 容器
|
||||
* IDE Container
|
||||
*/
|
||||
const IDEProviderWithRef: ForwardRefRenderFunction<
|
||||
IDEProviderRef,
|
||||
@@ -55,7 +55,7 @@ const IDEProviderWithRef: ForwardRefRenderFunction<
|
||||
} = props;
|
||||
|
||||
/**
|
||||
* 创建 IOC 包
|
||||
* Create IOC package
|
||||
*/
|
||||
const container = useMemo(() => {
|
||||
const mainContainer: interfaces.Container =
|
||||
@@ -74,7 +74,7 @@ const IDEProviderWithRef: ForwardRefRenderFunction<
|
||||
}
|
||||
mainContainer.get(Application).init();
|
||||
return mainContainer;
|
||||
// @action 这里 props 数据如果更改不会触发刷新,不允许修改
|
||||
// @action Here props data will not trigger a refresh if changed, no modification is allowed
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
@@ -21,7 +21,7 @@ import { type interfaces } from 'inversify';
|
||||
import { IDEContainerContext } from './context';
|
||||
|
||||
/**
|
||||
* 获取 ide inversify container
|
||||
* Acquire ide inversified container
|
||||
*/
|
||||
export function useIDEContainer(): interfaces.Container {
|
||||
return React.useContext(IDEContainerContext);
|
||||
|
||||
@@ -19,7 +19,7 @@ import { type interfaces } from 'inversify';
|
||||
import { useIDEContainer } from './use-ide-container';
|
||||
|
||||
/**
|
||||
* 获取IDE的 IOC 模块
|
||||
* Get the IOC module of the IDE
|
||||
* @param identifier
|
||||
*/
|
||||
export function useIDEService<T>(identifier: interfaces.ServiceIdentifier): T {
|
||||
|
||||
@@ -21,7 +21,7 @@ import { type URI } from '../common';
|
||||
import { useIDEService } from './use-ide-service';
|
||||
|
||||
const useNavigation = (): {
|
||||
/** 可传入 URI 或 string,传入 string 时以 / 开头,和 react-router-dom 对齐 */
|
||||
/** You can pass in a URI or string, starting with/when passing in a string, aligned with react-router-dom */
|
||||
navigate: (uri: URI | string, replace?: boolean, options?: any) => void;
|
||||
history: NavigationHistory;
|
||||
back: () => Promise<void>;
|
||||
|
||||
Reference in New Issue
Block a user