Skip to content

Commit

Permalink
✨ feat: Lobe I18N support markdown
Browse files Browse the repository at this point in the history
  • Loading branch information
canisminor1990 committed Nov 21, 2023
1 parent c234534 commit 931590f
Show file tree
Hide file tree
Showing 28 changed files with 1,050 additions and 118 deletions.
2 changes: 1 addition & 1 deletion packages/lobe-cli-ui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Lobe CLI UI is an open-source UI component library for building _AIGC_ cli apps

## 📦 Installation

> **Important**\
> \[!IMPORTANT]\
> This package is [ESM only](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c).
To install Lobe UI, run the following command:
Expand Down
10 changes: 5 additions & 5 deletions packages/lobe-commit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Lobe Commit is a CLI tool that uses ChatGPT to generate Gitmoji-based commit messages

English · [简体中文](./README-zh_CN.md) · [Changelog](./CHANGELOG.md) · [Report Bug][issues-url] · [Request Feature][issues-url]
English · [简体中文](./README.zh-CN.md) · [Changelog](./CHANGELOG.md) · [Report Bug][issues-url] · [Request Feature][issues-url]

[![][npm-release-shield]][npm-release-link]
[![][github-releasedate-shield]][github-releasedate-link]
Expand Down Expand Up @@ -69,7 +69,7 @@ To install Lobe Commit, run the following command:
npm install -g @lobehub/commit-cli
```

> **Note**\
> \[!NOTE]\
> Make sure your node version >= 18
<div align="right">
Expand All @@ -87,7 +87,7 @@ $ git add <files...>
$ lobe-commit
```

> **Note**\
> \[!NOTE]\
> Use the `lobe` alias if `lobe-commit` is too long for you.
<br/>
Expand All @@ -96,7 +96,7 @@ $ lobe-commit

With AI mode, you can generate a complete commit message using ChatGPT.

> **Important**\
> \[!IMPORTANT]\
> To use AI auto-generation, you need to fill in your OpenAI token in the settings by `lobe-commit -o`. and if you have special network requirements, you can add OpenAI's forwarding address in the settings.
![](https://gw.alipayobjects.com/zos/kitchen/qmXcNvnjKf/preview-ai.webp)
Expand All @@ -107,7 +107,7 @@ With AI mode, you can generate a complete commit message using ChatGPT.

In Editor mode, you can choose the `<type>(<optional scope>): <subject> [<issues>]` format by following a simple flow.

> **Note**\
> \[!NOTE]\
> If your project is a GitHub repository, the Editor mode feature will automatically fetch the issues associated with your repository. You can select multiple issues to link to your commit message by <kbd>space</kbd> .
![](https://gw.alipayobjects.com/zos/kitchen/QkJ5V8nbY6/preview-editor.webp)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Lobe Commit 是一款使用 ChatGPT 生成基于 Gitmoji 的 CLI 提交工具
npm install -g @lobehub/commit-cli
```

> **Note**\
> \[!NOTE]\
> 请确保 Node.js 版本 >= 18
<div align="right">
Expand All @@ -87,7 +87,7 @@ $ git add <files...>
$ lobe-commit
```

> **Note**\
> \[!NOTE]\
> 如果认为 `lobe-commit` 太长了,可以使用`lobe`别名
<br/>
Expand All @@ -96,7 +96,7 @@ $ lobe-commit

在 AI 模式下,可以使用 ChatGPT 生成完整的提交信息

> **Important**\
> \[!IMPORTANT]\
> 需要在设置中 `lobe-commit -o` 配置 OpenAI 令牌,同时如果有特殊的网络要求,也可以在设置中配置 OpenAI 的转发地址
![](https://gw.alipayobjects.com/zos/kitchen/qmXcNvnjKf/preview-ai.webp)
Expand All @@ -107,7 +107,7 @@ $ lobe-commit

在编辑器模式下,可以通过简单的流程生成 `<type>(<optional scope>): <subject> [<issues>]` 格式的提交信息,使用 <kbd>TAB</kbd> 返回上一步

> **Note**\
> \[!NOTE]\
> 如果项目是 GitHub Repo,则将自动获取该仓库的 issues,可以使用 <kbd>空格</kbd> 选择多个问题将其链接到提交信息中
![](https://gw.alipayobjects.com/zos/kitchen/QkJ5V8nbY6/preview-editor.webp)
Expand Down
6 changes: 3 additions & 3 deletions packages/lobe-i18n/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Lobe i18n is a tool that automates the i18n (internationalization) translation process using ChatGPT. It supports features such as automatic splitting of large files, incremental updates, and customization options for the OpenAI model, API proxy, and temperature.

English · [简体中文](./README-zh_CN.md) · [Changelog](./CHANGELOG.md) · [Report Bug][issues-url] · [Request Feature][issues-url]
English · [简体中文](./README.zh-CN.md) · [Changelog](./CHANGELOG.md) · [Report Bug][issues-url] · [Request Feature][issues-url]

<!-- SHIELD GROUP -->

Expand Down Expand Up @@ -70,7 +70,7 @@ To install Lobe i8n, run the following command:
npm install -g @lobehub/i18n-cli
```

> **Note**\
> \[!NOTE]\
> Make sure you have Node.js version >= 18\*
<div align="right">
Expand All @@ -87,7 +87,7 @@ To initialize the Lobe i8n configuration, run the following command:
$ lobe-i18n --config # or use the short flag -o
```

> **Important**\
> \[!IMPORTANT]\
> To use AI auto-generation, fill in the [OpenAI token](https://platform.openai.com/account/api-keys) in the settings
<div align="right">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Lobe i18n 是一款使用 ChatGPT 自动化 i18n 的 CLI 流程工具
npm install -g @lobehub/i18n-cli
```

> **Note**\
> \[!NOTE]\
> 请确保 \* _Node.js_ _版本_ _>= 18_
<div align="right">
Expand All @@ -88,7 +88,7 @@ npm install -g @lobehub/i18n-cli
$ lobe-i18n --config # 或使用短标志 -o
```

> **Important**\
> \[!IMPORTANT]\
> 要使用 AI 自动生成,需要在设置中填写 [OpenAI 令牌](https://platform.openai.com/account/api-keys)
<div align="right">
Expand Down
11 changes: 11 additions & 0 deletions packages/lobe-i18n/examples/markdown/.i18nrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module.exports = {
markdown: {
entry: ['./README.zh-CN.md', './docs'],
entryLocale: 'zh-CN',
entryExtension: '.zh-CN.md',
outputLocales: ['en-US'],
outputExtensionsOverrides: {
'en-US': '.md',
},
},
};
Loading

0 comments on commit 931590f

Please sign in to comment.