@yuntijs/lowcode-i18n-extract
v1.1.2
Published
i18n extract tools for lowcode schema
Downloads
15
Maintainers
Readme
🌐 @yuntijs/lowcode-i18n-extract is an i18n extract tools for schema of lowcode engine inspired by Kiwi.
English ・ 简体中文 ・ Changelog · Report Bug · Request Feature
TOC
✨ Features
- [x] 🔠 Supports extracting Chinese text of
string
type from lowCode schema . - [x] 🚀 Supports extracting Chinese text of
JSExpression
andJSFunction
type from lowCode schema. - [ ] 🌐 Support automated i18n translation.
📦 Installation
To install @yuntijs/lowcode-i18n-extract, run the following command:
pnpm add @yuntijs/lowcode-i18n-extract
🌐 Usage
[!NOTE]
The @yuntijs/lowcode-i18n-extract is inspired by Kiwi, the i18n extraction solution can be said to be a simplified version of kiwi.
import { extractI18n } from '@yuntijs/lowcode-i18n-extract';
const schema = {
/** full schema here */
};
const { matches, schema: schemaWithI18n } = extractI18n(schema);
// matches are extracted i18n texts
// schemaWithI18n is scheam with i18n injected
⌨️ Local Development
You can use Github Codespaces for online development:
Or clone it for local development:
git clone https://github.com/yuntijs/lowcode-tools.git
cd lowcode-tools
pnpm install
pnpm dev:i18n-extract
🤝 Contributing
Contributions of all types are more than welcome, if you are interested in contributing code, feel free to check out our GitHub Issues to get stuck in to show us what you’re made of.