Skip to content

Commit

Permalink
docs: localization
Browse files Browse the repository at this point in the history
  • Loading branch information
BroKun committed Nov 14, 2024
1 parent 762507c commit 9e4336d
Show file tree
Hide file tree
Showing 17 changed files with 307 additions and 229 deletions.
6 changes: 2 additions & 4 deletions apps/docs/docs/examples/application-react.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
---
title: 类 IDE 工作台
title: Workbench
order: 100
nav:
order: 3
---

# 应用示例
# Workbench Example

<code src="../../src/application-react"></code>
8 changes: 8 additions & 0 deletions apps/docs/docs/examples/application-react.zh-CN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: 工作台
order: 100
---

# 工作台示例

<code src="../../src/application-react"></code>
15 changes: 8 additions & 7 deletions apps/docs/docs/examples/command.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,29 @@
---
title: 命令
order: 7
title: Commands
order: 1

nav:
title: Example
order: 3
---

# 命令
# Commands

命令系统是非常基础的一个系统,其本身支持对可调用方法的管理器,我们通过统一的命令注册,来解决快捷键、菜单、工具栏、命令面板等不同 UI 入口的统一响应问题,也给插件得外部系统更浅的内部方法调用入口。
The command system is a very fundamental system that supports a manager for callable methods. By standardizing command registration, we address the unified response across different UI entry points such as shortcuts, menus, toolbars, and command panels. This also provides a simpler internal method invocation entry point for external systems of plugins.

## 简单使用
## Simple Usage

<code src="../../src/command/simple"></code>

用户可以 `CommandRegistry` 完成命令的注册和消费,我们也提供了 `CommandContribution` 扩展点。
Users can complete the registration and consumption of commands using `CommandRegistry`. We also provide the `CommandContribution` extension point.

```typescript
export type CommandContribution = {
registerCommands: (commands: CommandRegistry) => void;
};
```

我们在 `CommandRegistry` 上提供两种注册命令的形式
We offer two methods of registering commands on the `CommandRegistry`

```typescript
registerCommand(command: Command, handler?: CommandHandler): Disposable
Expand Down
6 changes: 2 additions & 4 deletions apps/docs/docs/examples/file-tree.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
---
title: 文件树
title: FileTree
order: 9
toc: file-tree
nav:
order: 3
---

# 文件树
# FileTree

<code src="../../src/file-tree"></code>
9 changes: 9 additions & 0 deletions apps/docs/docs/examples/file-tree.zh-CN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: 文件树
order: 9
toc: file-tree
---

# 文件树

<code src="../../src/file-tree"></code>
20 changes: 10 additions & 10 deletions apps/docs/docs/examples/keybind.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
---
title: 快捷键
title: Shortcuts
order: 7
nav:
order: 3
---

# 快捷键
# Shortcuts

## 注册命令快捷键
## Registering Command Shortcuts

我们默认注册快捷键与注册命令关联
By default, we register shortcuts associated with commands.

支持多种键盘组合方式:
It supports various keyboard combinations:

- 单一按键 `a`
- 组合按键 `shift+up`
- 连续按键 `d d`
- Single key `a`
- Combination keys `shift+up`
- Sequential keys `d d`

<code src="../../src/keybind/simple"></code>

## 快捷键的上下文切换
## Context Switching for Shortcuts

<code src="../../src/keybind/context"></code>

## 默认阻止
## Default Prevention

<code src="../../src/keybind/event-propagation"></code>
28 changes: 28 additions & 0 deletions apps/docs/docs/examples/keybind.zh-CN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
title: 快捷键
order: 7
nav:
order: 3
---

# 快捷键

## 注册命令快捷键

我们默认注册快捷键与注册命令关联

支持多种键盘组合方式:

- 单一按键 `a`
- 组合按键 `shift+up`
- 连续按键 `d d`

<code src="../../src/keybind/simple"></code>

## 快捷键的上下文切换

<code src="../../src/keybind/context"></code>

## 默认阻止

<code src="../../src/keybind/event-propagation"></code>
10 changes: 5 additions & 5 deletions apps/docs/docs/examples/menu.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
---
title: 菜单
title: Menus
order: 8
nav:
order: 3
---

# 菜单
# Menus

## 菜单栏
## Menu Bar

<code src="../../src/menu/menubar"></code>

## 右键菜单
## Context Menu

<code src="../../src/menu/context-menu"></code>

## antd 菜单
## Antd Menu

<code src="../../src/menu/antd-context-menu"></code>
20 changes: 20 additions & 0 deletions apps/docs/docs/examples/menu.zh-CN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
title: 菜单
order: 8
nav:
order: 3
---

# 菜单

## 菜单栏

<code src="../../src/menu/menubar"></code>

## 右键菜单

<code src="../../src/menu/context-menu"></code>

## antd 菜单

<code src="../../src/menu/antd-context-menu"></code>
10 changes: 5 additions & 5 deletions apps/docs/docs/examples/modal.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
---
title: 对话框
order: 8
title: Modal
order: 9
toc: modal
nav:
order: 3
---

# 对话框
# Modals

## antd 对话框
## Antd Modals

<code src="../../src/modal/antd-modal"></code>

## 自定义对话框主题和显示逻辑
## Custom Modals Theme and Display Logic

<code src="../../src/modal/custom-modal"></code>
17 changes: 17 additions & 0 deletions apps/docs/docs/examples/modal.zh-CN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
title: 对话框
order: 8
toc: modal
nav:
order: 3
---

# 对话框

## antd 对话框

<code src="../../src/modal/antd-modal"></code>

## 自定义对话框主题和显示逻辑

<code src="../../src/modal/custom-modal"></code>
10 changes: 5 additions & 5 deletions apps/docs/docs/examples/modular.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
---
title: 模块
title: Module
order: 20
nav:
order: 3
---

# 模块示例
# Module Example

简单的模块示例,包含布局和内容两个模块,内容模块的 view 展示在中部和顶部,并共享数据状态。
A simple module example that includes two modules: layout and content. The views of the content module are displayed in the center and top, and they share data state.

<code src="../../src/modular-basic"></code>

# 动态模块
# Dynamic Module

我们可以动态加载模块以后,再使用其中的 view。
We can dynamically load modules and then use the views within them.

<code src="../../src/modular-dynamic"></code>
18 changes: 18 additions & 0 deletions apps/docs/docs/examples/modular.zh-CN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
title: 模块
order: 20
nav:
order: 3
---

# 模块示例

简单的模块示例,包含布局和内容两个模块,内容模块的 view 展示在中部和顶部,并共享数据状态。

<code src="../../src/modular-basic"></code>

# 动态模块

我们可以动态加载模块以后,再使用其中的 view。

<code src="../../src/modular-dynamic"></code>
Loading

0 comments on commit 9e4336d

Please sign in to comment.