diff --git a/README.md b/README.md index ead57aa..64c96b2 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ AI CLI Toolbox, enhancing git commit and i18n workflow efficiency -[Report Bug][github-issues-link] · [Request Feature][github-issues-link] +English ・ [简体中文](./README.zh-CN.md) ・ [Report Bug][github-issues-link] · [Request Feature][github-issues-link] diff --git a/README.zh-CN.md b/README.zh-CN.md new file mode 100644 index 0000000..2140956 --- /dev/null +++ b/README.zh-CN.md @@ -0,0 +1,173 @@ +
+ + + +

Lobe CLI 工具箱

+ +AI CLI 工具箱,提高 git 提交和国际化工作流的效率 + +[English](./README.md) ・ 简体中文 ・ [报告 Bug][github-issues-link] · [需求功能][github-issues-link] + + + +[![][github-release-shield]][github-release-link] +[![][github-releasedate-shield]][github-releasedate-link] +[![][github-action-test-shield]][github-action-test-link] +[![][github-action-release-shield]][github-action-release-link]
+[![][github-contributors-shield]][github-contributors-link] +[![][github-forks-shield]][github-forks-link] +[![][github-stars-shield]][github-stars-link] +[![][github-issues-shield]][github-issues-link] +[![][github-license-shield]][github-license-link] + +![][split] + +
+ +
+ +## 🪀 CLI 工具 + +| [**💌 Lobe Commit**][lobe-commit-github] [(中文)][lobe-commit-github-cn]
利用 Langchain/ChatGPT 生成基于 Gitmoji 的提交消息的 CLI 工具。

[![][lobe-commit-version] ![][lobe-commit-download]][lobe-commit-url] | [![][lobe-commit-cover]][lobe-commit-github] | +| :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------- | +| [**🌏 Lobe i18n**][lobe-i18n-github] [(中文)][lobe-i18n-github-cn]
国际化翻译过程的自动化工具,由 ChatGPT 提供支持。支持大文件的自动分割、增量更新和自定义选项,可以选择 OpenAI 模型、API 代理和温度等功能。

[![][lobe-i18n-version] ![][lobe-i18n-download]][lobe-i18n-url] | [![][lobe-i18n-cover]][lobe-i18n-github] | +| [**🔖 Lobe label**][lobe-label-github]
自动从模板仓库复制问题标签。

[![][lobe-label-version] ![][lobe-label-download]][lobe-label-url] | [![][lobe-label-cover]][lobe-label-github] | + +
+ +[![][back-to-top]](#readme-top) + +
+ +## 📦 生态系统 + +| 名称 | 仓库 | NPM | 下载 | +| ----------------------------------- | ------------------------------------------- | ---------------------------------- | --------------------- | +| [@lobehub/cli-ui][ui-url] | [packages/lobe-cli-ui][ui-github] | [![][ui-shield]][ui-url] | ![][ui-download] | +| [@lobehub/cli-shebang][shebang-url] | [packages/lobe-cli-shebang][shebang-github] | [![][shebang-shield]][shebang-url] | ![][shebang-download] | + +
+ +[![][back-to-top]](#readme-top) + +
+ +## ⌨️ 本地开发 + +你可以使用 Github Codespaces 进行在线开发: + +[![][github-codespace-shield]][github-codespace-link] + +或者克隆到本地进行开发: + +[![][bun-shield]][bun-link] + +```bash +$ git clone https://github.com/lobehub/lobe-cli-toolbox.git +$ cd lobe-cli-toolbox +$ bun install +``` + +
+ +[![][back-to-top]](#readme-top) + +
+ +## 🤝 贡献 + +欢迎各种类型的贡献,如果您有兴趣贡献代码,请随时查看我们的 GitHub [Issues][github-issues-link] 来展示你的才能。 + +[![][pr-welcome-shield]][pr-welcome-link] + +[![][github-contrib-shield]][github-contrib-link] + +
+ +[![][back-to-top]](#readme-top) + +
+ +## 🔗 链接 + +### 更多产品 + +- **[🤖 Lobe Chat][lobe-chat]** - 一个开源、可扩展的(软件功能调用)高性能聊天机器人框架。支持一键免费部署私人 ChatGPT/LLM Web 应用程序。 +- **[🤯 Lobe Theme][lobe-theme]** - 稳定扩散 WebUI 的现代主题,精致的界面设计,高度可定制的用户界面和提高效率的功能。 + +### 鸣谢 + +- **langchainjs** - +- **ink** - + +
+ +[![][back-to-top]](#readme-top) + +
+ +--- + +#### 📝 License + +Copyright © 2023 [LobeHub][profile-link].
+This project is [MIT](./LICENSE) licensed. + + + +[back-to-top]: https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square +[bun-link]: https://bun.sh +[bun-shield]: https://img.shields.io/badge/-speedup%20with%20bun-black?logo=bun&style=for-the-badge +[github-action-release-link]: https://github.com/lobehub/lobe-cli-toolbox/actions/workflows/release.yml +[github-action-release-shield]: https://img.shields.io/github/actions/workflow/status/lobehub/lobe-cli-toolbox/release.yml?label=release&labelColor=black&logo=githubactions&logoColor=white&style=flat-square +[github-action-test-link]: https://github.com/lobehub/lobe-cli-toolbox/actions/workflows/test.yml +[github-action-test-shield]: https://img.shields.io/github/actions/workflow/status/lobehub/lobe-cli-toolbox/test.yml?label=test&labelColor=black&logo=githubactions&logoColor=white&style=flat-square +[github-codespace-link]: https://codespaces.new/lobehub/lobe-cli-toolbox +[github-codespace-shield]: https://github.com/codespaces/badge.svg +[github-contrib-link]: https://github.com/lobehub/lobe-cli-toolbox/graphs/contributors +[github-contrib-shield]: https://contrib.rocks/image?repo=lobehub%2Flobe-cli-toolbox +[github-contributors-link]: https://github.com/lobehub/lobe-cli-toolbox/graphs/contributors +[github-contributors-shield]: https://img.shields.io/github/contributors/lobehub/lobe-cli-toolbox?color=c4f042&labelColor=black&style=flat-square +[github-forks-link]: https://github.com/lobehub/lobe-cli-toolbox/network/members +[github-forks-shield]: https://img.shields.io/github/forks/lobehub/lobe-cli-toolbox?color=8ae8ff&labelColor=black&style=flat-square +[github-issues-link]: https://github.com/lobehub/lobe-cli-toolbox/issues +[github-issues-shield]: https://img.shields.io/github/issues/lobehub/lobe-cli-toolbox?color=ff80eb&labelColor=black&style=flat-square +[github-license-link]: https://github.com/lobehub/lobe-cli-toolbox/blob/main/LICENSE +[github-license-shield]: https://img.shields.io/github/license/lobehub/lobe-cli-toolbox?color=white&labelColor=black&style=flat-square +[github-release-link]: https://github.com/lobehub/lobe-cli-toolbox/releases +[github-release-shield]: https://img.shields.io/github/v/release/lobehub/lobe-cli-toolbox?color=369eff&labelColor=black&logo=github&style=flat-square +[github-releasedate-link]: https://github.com/lobehub/lobe-cli-toolbox/releases +[github-releasedate-shield]: https://img.shields.io/github/release-date/lobehub/lobe-cli-toolbox?labelColor=black&style=flat-square +[github-stars-link]: https://github.com/lobehub/lobe-cli-toolbox/network/stargazers +[github-stars-shield]: https://img.shields.io/github/stars/lobehub/lobe-cli-toolbox?color=ffcb47&labelColor=black&style=flat-square +[lobe-chat]: https://github.com/lobehub/lobe-chat +[lobe-commit-cover]: https://gw.alipayobjects.com/zos/kitchen/3%26ByxtP39X/preview.webp +[lobe-commit-download]: https://img.shields.io/npm/dt/@lobehub/commit-cli?labelColor=black&&style=flat-square +[lobe-commit-github]: https://github.com/lobehub/lobe-cli-toolbox/tree/master/packages/lobe-commit +[lobe-commit-github-cn]: https://github.com/lobehub/lobe-cli-toolbox/blob/master/packages/lobe-commit/README.zh-CN.md +[lobe-commit-url]: https://www.npmjs.com/package/@lobehub/commit-cli +[lobe-commit-version]: https://img.shields.io/npm/v/@lobehub/commit-cli?color=369eff&labelColor=black&logo=npm&logoColor=white&style=flat-square +[lobe-i18n-cover]: https://gw.alipayobjects.com/zos/kitchen/AH7rvv06qn/preview-i18n.webp +[lobe-i18n-download]: https://img.shields.io/npm/dt/@lobehub/i18n-cli?labelColor=black&&style=flat-square +[lobe-i18n-github]: https://github.com/lobehub/lobe-cli-toolbox/tree/master/packages/lobe-i18n +[lobe-i18n-github-cn]: https://github.com/lobehub/lobe-cli-toolbox/blob/master/packages/lobe-i18n/README.zh-CN.md +[lobe-i18n-url]: https://www.npmjs.com/package/@lobehub/i18n-cli +[lobe-i18n-version]: https://img.shields.io/npm/v/@lobehub/i18n-cli?color=369eff&labelColor=black&logo=npm&logoColor=white&style=flat-square +[lobe-label-cover]: https://gw.alipayobjects.com/zos/kitchen/qeTFEqgF8O/437shots_so.png +[lobe-label-download]: https://img.shields.io/npm/dt/@lobehub/label-cli?labelColor=black&&style=flat-square +[lobe-label-github]: https://github.com/lobehub/lobe-cli-toolbox/tree/master/packages/lobe-label +[lobe-label-url]: https://www.npmjs.com/package/@lobehub/label-cli +[lobe-label-version]: https://img.shields.io/npm/v/@lobehub/label-cli?color=369eff&labelColor=black&logo=npm&logoColor=white&style=flat-square +[lobe-theme]: https://github.com/lobehub/sd-webui-lobe-theme +[pr-welcome-link]: https://github.com/lobehub/lobe-cli-toolbox/pulls +[pr-welcome-shield]: https://img.shields.io/badge/%F0%9F%A4%AF%20PR%20WELCOME-%E2%86%92-ffcb47?labelColor=black&style=for-the-badge +[profile-link]: https://github.com/lobehub +[shebang-download]: https://img.shields.io/npm/dt/@lobehub/cli-shebang?labelColor=black&style=flat-square +[shebang-github]: https://github.com/lobehub/lobe-cli-toolbox/tree/master/packages/lobe-cli-shebang +[shebang-shield]: https://img.shields.io/npm/v/@lobehub/cli-shebang?color=369eff&labelColor=black&logo=npm&logoColor=white&style=flat-square +[shebang-url]: https://www.npmjs.com/package/@lobehub/cli-shebang +[split]: https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/rainbow.png +[ui-download]: https://img.shields.io/npm/dt/@lobehub/cli-ui?labelColor=black&style=flat-square +[ui-github]: https://github.com/lobehub/lobe-cli-toolbox/tree/master/packages/lobe-cli-ui +[ui-shield]: https://img.shields.io/npm/v/@lobehub/cli-ui?color=369eff&labelColor=black&logo=npm&logoColor=white&style=flat-square +[ui-url]: https://www.npmjs.com/package/@lobehub/cli-ui diff --git a/packages/lobe-i18n/README.md b/packages/lobe-i18n/README.md index 55e9540..838706b 100644 --- a/packages/lobe-i18n/README.md +++ b/packages/lobe-i18n/README.md @@ -8,7 +8,7 @@ Lobe i18n is a CLI workflow tool that uses ChatGPT for automated i18n. -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] diff --git a/packages/lobe-i18n/README.zh-CN.md b/packages/lobe-i18n/README.zh-CN.md index 0da9709..f715d95 100644 --- a/packages/lobe-i18n/README.zh-CN.md +++ b/packages/lobe-i18n/README.zh-CN.md @@ -8,7 +8,7 @@ Lobe i18n 是一款使用 ChatGPT 自动化 i18n 的 CLI 流程工具 -[English](./README.md)・简体中文・[Changelog](./CHANGELOG.md) · [Report Bug][issues-url] · [Request Feature][issues-url] +[English](./README.md) ・ 简体中文 ・ [Changelog](./CHANGELOG.md) · [Report Bug][issues-url] · [Request Feature][issues-url] diff --git a/packages/lobe-i18n/src/commands/TranslateMarkdown/index.tsx b/packages/lobe-i18n/src/commands/TranslateMarkdown/index.tsx index d5fc8b3..06bd7bc 100644 --- a/packages/lobe-i18n/src/commands/TranslateMarkdown/index.tsx +++ b/packages/lobe-i18n/src/commands/TranslateMarkdown/index.tsx @@ -41,7 +41,9 @@ class TranslateMarkdown { if (!entry || entry.length === 0) alert.error('No markdown entry was found.', true); - const files = globSync(entry, { ignore: this.markdownConfig.exclude }); + const files = globSync(entry, { ignore: this.markdownConfig.exclude }).filter((file) => + file.includes(this.markdownConfig.entryExtension || '.md'), + ); if (!files || files.length === 0) alert.error('No markdown entry was found.', true);