1.1.2 • Published 1 month ago

@yuntijs/lowcode-i18n-extract v1.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
1 month ago

🌐 @yuntijs/lowcode-i18n-extract is an i18n extract tools for schema of lowcode engine inspired by Kiwi.

English ・ 简体中文Changelog · Report Bug · Request Feature

codecov

TOC

✨ Features

  • 🔠 Supports extracting Chinese text of string type from lowCode schema .
  • 🚀 Supports extracting Chinese text of JSExpression and JSFunction 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.


Copyright © 2024 YuntiJS. This project is MIT licensed.