@x1a0ma17x/zeppos-auto-i18n-translator
v1.0.0
Published
[![Contributors][contributors-shield]][contributors-url] [![Forks][forks-shield]][forks-url] [![Stargazers][stars-shield]][stars-url] [![Issues][issues-shield]][issues-url] [![MIT License][license-shield]][license-url]
Downloads
3
Readme
About The Project
A simple automatic i18n translation tool. You only need to write one .po file, and it will automatically generate .po files for other languages, helping developers quickly complete i18n translation tasks.
Getting Started
Prerequisites
You need to install Node.js and the required dependencies. For more details, please refer to Installation.
Installation
npm install @x1a0ma17x/zeppos-auto-i18n-translator -g
Usage
After installation, run the following command to generate the configuration file:
z18n
Configuration file parameters:
| Parameter | Description | Type | Example | | ------------ | --------------------- | ------ | ---------------------------------------- | | originLang | Original language | string | zh-CN | | targetLangs | Target languages | array | ["en-US", "zh-TW", "ru-RU", "fr-FR"] | | workingPath | i18n folder path | string | ./example/page/i18n | | adapter | Translation channel | string | Translated |
Both originLang
and targetLangs
should be standard language codes. Refer to the language codes supported by ZeppOS for more details.
Currently supported adapters:
| Adapter | Description | | ----------- | --------------------- | | Translated | Translation channel |
Once the configuration file is set, simply run z18n
to complete the translation.
Roadmap
- [ ] Support more adapters
- [ ] DeepL
See the open issues for a full list of proposed features (and known issues).
Contributing
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
License
Distributed under the MIT License. See LICENSE.txt
for more information.
Contact
XiaomaiTX - [email protected]
Project Link: https://github.com/XiaomaiTX/zeppos-auto-i18n-translator