style: translate more docs for i18n

pull/90/head
moonrailgun 3 years ago
parent 94f42134d9
commit d57900bd6d

@ -1,6 +1,6 @@
---
sidebar_position: 3
title: 系统架构
title: System Architecture
---
## Backend Architecture

@ -1,4 +1,4 @@
{
"label": "项目贡献",
"label": "Contribution",
"position": 90
}

@ -1,24 +1,24 @@
---
sidebar_position: 99
title: 生态与社区
title: Ecology & Community
---
`Tailchat` 是一个非常开放的平台,欢迎来自所有人的以任何形式的贡献。在这里收录一些`Tailchat`相关的第三方资源
`Tailchat` is a very open platform and welcomes contributions in any form from everyone. Here are some third-party resources related to `Tailchat`
欢迎提交 `pr/issue` 来提交你对`Tailchat`的贡献,让我们能够以下列表中收录:
Feel free submit `pr/issue` to submit your contribution to `Tailchat`, so that we can include it in the following list:
## 交流社区
## Exchange community
<img width="360" src="/img/wechat.jpg" />
[Join TailchatNightly Channel](https://nightly.paw.msgbyte.com/invite/8Jfm1dWb)
## 代码
## Code
*(empty)*
## 视频
## Video
- [【好玩儿的Docker项目】激情畅聊十分钟搭建一个插件化易拓展的开源即时聊天IM应用——Tailchat](https://www.bilibili.com/video/BV1aG411u7M8/)
## 文章
## Article
- [【好玩儿的Docker项目】激情畅聊十分钟搭建一个插件化易拓展的开源即时聊天IM应用——Tailchat](https://blog.laoda.de/archives/docker-compose-install-tailchat)

@ -1,4 +1,4 @@
{
"label": "开发文档",
"label": "Development Documentation",
"position": 2
}

@ -1,28 +1,30 @@
---
sidebar_position: 1
title: 身份组与权限
title: Identity Groups and Permissions
---
身份组是在群组管理中划分用户权限点的形式(RBAC)。
Identity groups are a form of dividing user authority points in group management (RBAC).
身份组是由一系列权限点的开关组合而成的而一个用户可能是由多个身份组组合而成的比如身份组A拥有A权限身份组B拥有B权限那么作为同时拥有身份组A和身份组B的用户C则拥有权限A和权限B。为了简化权限的设计权限点则是通过简单的`true/false`实现的
An identity group is composed of a series of permission point switches, and a user may be composed of multiple identity groups. For example, identity group A has A permission, and identity group B has B permission. User C in group A and identity group B has permission A and permission B. In order to simplify the design of permissions, permission points are implemented through simple `true/false`
更多关于 `RBAC` 可以查看相关wiki: https://en.wikipedia.org/wiki/Role-based_access_control 在此不做赘述。
More about `RBAC` can be found in the related wiki: https://en.wikipedia.org/wiki/Role-based_access_control I wont go into details here.
下面主要讲讲在 `Tailchat` 是如何增加/修改权限点的
The following mainly talks about how to add/modify permission points in `Tailchat`
## 内置权限
权限点需要同时在前端和后端均做一次声明,前端负责前端的显示,后端负责做兜底的权限校验。如果没有权限的话处理接口应当直接范围一个报错。
## Built-in permissions
### 前端管理
Permission points need to be declared on both the front-end and back-end at the same time. The front-end is responsible for the display of the front-end, and the back-end is responsible for the comprehensive permission verification. If there is no permission, the processing interface should directly throw an error.
### Frontend Management
The permission point list of the front end is maintained in `client/shared/utils/role-helper.ts`, including the permission point of the permission point, such as:
前端的权限点列表维护在 `client/shared/utils/role-helper.ts` 中, 包含权限点的权限点位, 如:
```tsx
export const PERMISSION = {
/**
* 非插件的权限点都叫core
* Non-plugin permission points are called core
*/
core: {
message: 'core.message',
@ -30,19 +32,20 @@ export const PERMISSION = {
};
```
以及权限点的在管理页面中的显示:
And the display of the permission point on the management page:
```tsx
export const getPermissionList = (): PermissionItemType[] => [
{
key: PERMISSION.core.message,
title: t('发送消息'),
desc: t('允许成员在文字频道发送消息'),
title: t('Send Message'),
desc: t('Allow members to send messages in text channel'),
default: true,
}
];
```
使用方式则是通过hooks获取维护在群组下的权限点:
The way to use it is to obtain the permission points maintained under the group through hooks:
```tsx
const [allowSendMessage] = useHasGroupPermission(groupId, [
@ -50,12 +53,12 @@ const [allowSendMessage] = useHasGroupPermission(groupId, [
]);
```
使用数组的方式便于一些业务逻辑需要拥有多个权限点。
The way of using arrays is convenient for some business logics that need to have multiple permission points.
### 后端
### backend
后端的权限声明则是在 `server/packages/sdk/src/services/lib/role.ts` 中维护,使用方式也非常简单。如下:
The permission statement of the backend is maintained in `server/packages/sdk/src/services/lib/role.ts`, and the usage method is very simple. as follows:
```ts
const [hasPermission] = await call(ctx).checkUserPermissions(
groupId,
@ -63,11 +66,11 @@ const [hasPermission] = await call(ctx).checkUserPermissions(
[PERMISSION.core.message]
);
if (!hasPermission) {
throw new NoPermissionError(t('没有操作权限'));
throw new NoPermissionError(t('no operation permission'));
}
```
## 插件权限
## Plugin permissions
TODO

@ -1,54 +1,64 @@
---
sidebar_position: 1
title: 贡献指南
title: Contribution Guidelines
---
`Tailchat` 是一个非常开放的项目,欢迎来自各种不同背景、任何形式的贡献。其插件的形式意味着允许`Tailchat` 可以承载任何想法的实现。
`Tailchat` is a very open project and welcomes contributions of any kind from all backgrounds. Its plugin architecture is meant to allow `Tailchat` to host the implementation of any idea.
我们期望 `Tailchat` 不仅仅是一个简单的聊天应用,更是一个连接不同工具、不同想法的空间。
We hope that `Tailchat` is not just a simple chat application, but a space to connect different tools and different ideas.
Github 地址: https://github.com/msgbyte/tailchat
Github link: https://github.com/msgbyte/tailchat
-----------
目前 `Tailchat` 所急需要贡献者角色:
Contributor roles are currently urgently needed for `Tailchat`:
### 前端插件开发者
- 熟悉 React 的使用
- 拥有一定的抽象化思维
- 有基本的审美能力
- 对开源项目抱有热情
### Front-end plugin developer
### 后端插件开发者
- Familiar with the use of React
- Possess certain abstract thinking
- Have basic aesthetic ability
- Passionate about open source projects
- 熟悉 Nodejs 的使用
- 对微服务有基本的认知
- 对开源项目抱有热情
### Backend plugin developers
### electron 应用开发者
- Familiar with the use of Nodejs
- Have a basic understanding of microservices
- Passionate about open source projects
- 了解跨平台的开发
- 熟悉代码注入,能够实现 render 进程与 main 进行数据交互
- 对开源项目抱有热情
### electron application developer
### uniapp w2a 应用开发者
- Understand cross-platform development
- Familiar with code injection, able to realize data interaction between render process and main
- Passionate about open source projects
- 熟悉uniapp应用的开发
- 熟悉unipush2的开发
- 对开源项目抱有热情
### React Native App Developers
### 运营同学
- Familiar with the development of React Native applications
- Familiar with the use of React Native Web
- Passionate about open source projects
- 了解基本的运营能力,有当过大群群主的经验
- 了解开源项目的宣传渠道与方式
- 沟通能力强
### Operation Classmates
### 其他
- Understand basic operational capabilities and have experience as a group leader
- Understand the publicity channels and methods of open source projects
- Strong communication skills
- Passionate about open source projects
更多的一切可能性...
### Ambassador
- Master the mother tongue and English (if English is the mother tongue, only English is enough)
- Have a certain understanding of the open source community
- Participate in the development of Tailchat usage and best practices
- Strong communication skills
- Passionate about open source projects
### other
More of all possibilities...
:::info
联系方式: 发送邮件到`moonrailgun@gmail.com` 或 [加入TailchatNightly频道](https://nightly.paw.msgbyte.com/invite/8Jfm1dWb)
Contact: Send an email to `moonrailgun@gmail.com` or [Join TailchatNightly Channel](https://nightly.paw.msgbyte.com/invite/8Jfm1dWb)
:::

@ -1,11 +1,11 @@
---
sidebar_position: 100
title: 演示环境与群组
title: Demo Environment and Groups
---
演示环境为体现在低配置服务器下 `Tailchat` 的表现(更少的资源占用是Tailchat的重点要求)。测试环境的服务器为 1C2G1M(一个cpu核心2g内存空间1mb带宽限制)。
The demonstration environment is to reflect the performance of `Tailchat` on a low-configuration server (less resource occupation is the key requirement of Tailchat). The server in the test environment is 1C2G1M (1 cpu core, 2g memory space, 1mb bandwidth limit).
另外, 这里有一些用于演示Tailchat功能的群组:
Also, here are some groups for demonstrating Tailchat functionality:
- [Tailchat Nightly](https://nightly.paw.msgbyte.com/invite/8Jfm1dWb)
- [原神](https://nightly.paw.msgbyte.com/invite/GFFzfD5H)
- [Genshin](https://nightly.paw.msgbyte.com/invite/GFFzfD5H)

@ -1,4 +1,4 @@
{
"label": "插件列表",
"label": "Plugin List",
"position": 20
}

@ -7,18 +7,6 @@
"message": "应用部署",
"description": "The label for category 应用部署 in sidebar tutorialSidebar"
},
"sidebar.tutorialSidebar.category.插件列表": {
"message": "插件列表",
"description": "The label for category 插件列表 in sidebar tutorialSidebar"
},
"sidebar.tutorialSidebar.category.项目贡献": {
"message": "项目贡献",
"description": "The label for category 项目贡献 in sidebar tutorialSidebar"
},
"sidebar.tutorialSidebar.category.开发文档": {
"message": "开发文档",
"description": "The label for category 开发文档 in sidebar tutorialSidebar"
},
"sidebar.tutorialSidebar.category.Operations": {
"message": "运维操作",
"description": "The label for category Operations in sidebar tutorialSidebar"
@ -42,5 +30,17 @@
"sidebar.tutorialSidebar.category.API Interface": {
"message": "API 接口",
"description": "The label for category API Interface in sidebar tutorialSidebar"
},
"sidebar.tutorialSidebar.category.Plugin List": {
"message": "插件列表",
"description": "The label for category Plugin List in sidebar tutorialSidebar"
},
"sidebar.tutorialSidebar.category.Contribution": {
"message": "项目贡献",
"description": "The label for category Contribution in sidebar tutorialSidebar"
},
"sidebar.tutorialSidebar.category.Development Documentation": {
"message": "开发文档",
"description": "The label for category Development Documentation in sidebar tutorialSidebar"
}
}

@ -32,10 +32,10 @@ Github 地址: https://github.com/msgbyte/tailchat
- 熟悉代码注入,能够实现 render 进程与 main 进行数据交互
- 对开源项目抱有热情
### uniapp w2a 应用开发者
### React Native 应用开发者
- 熟悉uniapp应用的开发
- 熟悉unipush2的开发
- 熟悉React Native应用的开发
- 熟悉React Native Web的使用
- 对开源项目抱有热情
### 运营同学
@ -43,6 +43,15 @@ Github 地址: https://github.com/msgbyte/tailchat
- 了解基本的运营能力,有当过大群群主的经验
- 了解开源项目的宣传渠道与方式
- 沟通能力强
- 对开源项目抱有热情
### 大使
- 掌握母语和英语(如英语为母语则仅英语即可)
- 对开源社群有一定了解
- 参与Tailchat使用方式与最佳实践的开发
- 沟通能力强
- 对开源项目抱有热情
### 其他

@ -54,7 +54,8 @@ export default function Home() {
>
<HomepageHeader />
<main>
<HomepageVideo />
{/* TODO: 全球化 */}
{/* <HomepageVideo /> */}
<HomepageFeatures />
</main>

Loading…
Cancel
Save