@yuntijs/lowcode-i18n-extract
TypeScript icon, indicating that this package has built-in type declarations

1.1.2 • Public • Published

Yunti Lowcode I18n Extract Tools

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

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

codecov

Table of contents

TOC

✨ Features

  • [x] 🔠 Supports extracting Chinese text of string type from lowCode schema .
  • [x] 🚀 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.


📝 License

Copyright © 2024 YuntiJS.
This project is MIT licensed.

Package Sidebar

Install

npm i @yuntijs/lowcode-i18n-extract

Weekly Downloads

3

Version

1.1.2

License

MIT

Unpacked Size

5 MB

Total Files

22

Last publish

Collaborators

  • carrotzpc