Skip to content

Commit

Permalink
chore: release 2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
eyelly-wu committed Jun 7, 2023
1 parent 287e513 commit b13123d
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 33 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![logo](https://s3.bmp.ovh/imgs/2022/06/25/3a1c742f283cf28e.png "logo")](https://github.com/i18n-pro/core "github")


English | [简体中文](https://github.com/i18n-pro/core/blob/v2.0.0-alpha.8/README_zh-CN.md)
English | [简体中文](https://github.com/i18n-pro/core/blob/v2.0.0/README_zh-CN.md)


<p style="font-size: 18px;">Lightweight, simple, flexible, automatic translation internationalization tool for JavaScript</p>
Expand Down Expand Up @@ -54,15 +54,15 @@ To make internationalization easy and enjoyable 😄💪🏻

# Principle

>Taking `Translation Text` as key is the key to all the functions of the library. If you have any questions about this, [Please see](https://github.com/i18n-pro/core/blob/v2.0.0-alpha.8/docs/dist/Q&A.md)
>Taking `Translation Text` as key is the key to all the functions of the library. If you have any questions about this, [Please see](https://github.com/i18n-pro/core/blob/v2.0.0/docs/dist/Q&A.md)
The library is mainly composed of two parts
* Command Line Tool
* Function API

**Command Line Tool**:Parse the text that needs to be translated based on specified rules (regular expressions), translate the text to the specified target language through a translation platform, and finally generate language pack files

An example of parsing text using [Matching Rules](https://github.com/i18n-pro/core/blob/v2.0.0-alpha.8/docs/dist/MATCH_RULE.md) is as follows:
An example of parsing text using [Matching Rules](https://github.com/i18n-pro/core/blob/v2.0.0/docs/dist/MATCH_RULE.md) is as follows:
```js
/** Normal string */

Expand Down Expand Up @@ -103,14 +103,14 @@ t('I have {p0 apple}, {p1 banana} and {p2 pear}', 5, 4, 3)
Therefore, `Command Line Tool` and `Function API` work better together. It is precisely because of this structural design that `i18n-pro` library can be easily integrated into any `JavaScript` project
# Help Document

* [Quick Start](https://github.com/i18n-pro/core/blob/v2.0.0-alpha.8/docs/dist/USAGE.md)
* [Command Line](https://github.com/i18n-pro/core/blob/v2.0.0-alpha.8/docs/dist/COMMAND_LINE.md)
* [API](https://github.com/i18n-pro/core/blob/v2.0.0-alpha.8/docs/dist/API.md)
* [Matching Rules](https://github.com/i18n-pro/core/blob/v2.0.0-alpha.8/docs/dist/MATCH_RULE.md)
* [Translation log](https://github.com/i18n-pro/core/blob/v2.0.0-alpha.8/docs/dist/OUTPUT_LOG.md)
* [Q&A](https://github.com/i18n-pro/core/blob/v2.0.0-alpha.8/docs/dist/Q&A.md)
* [Quick Start](https://github.com/i18n-pro/core/blob/v2.0.0/docs/dist/USAGE.md)
* [Command Line](https://github.com/i18n-pro/core/blob/v2.0.0/docs/dist/COMMAND_LINE.md)
* [API](https://github.com/i18n-pro/core/blob/v2.0.0/docs/dist/API.md)
* [Matching Rules](https://github.com/i18n-pro/core/blob/v2.0.0/docs/dist/MATCH_RULE.md)
* [Translation log](https://github.com/i18n-pro/core/blob/v2.0.0/docs/dist/OUTPUT_LOG.md)
* [Q&A](https://github.com/i18n-pro/core/blob/v2.0.0/docs/dist/Q&A.md)
* [Contribution Guidelines](https://github.com/i18n-pro/core/blob/dev/docs/dist/CONTRIBUTION_GUIDELINES.md)
* [Changelog](https://github.com/i18n-pro/core/blob/v2.0.0-alpha.8/docs/dist/CHANGELOG.md)
* [Changelog](https://github.com/i18n-pro/core/blob/v2.0.0/docs/dist/CHANGELOG.md)


# License
Expand Down
20 changes: 10 additions & 10 deletions README_zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![logo](https://s3.bmp.ovh/imgs/2022/06/25/3a1c742f283cf28e.png "logo")](https://github.com/i18n-pro/core "github")


[English](https://github.com/i18n-pro/core/tree/v2.0.0-alpha.8#readme) | 简体中文
[English](https://github.com/i18n-pro/core/tree/v2.0.0#readme) | 简体中文


<p style="font-size: 18px;">适用于 JavaScript 的轻量、简单、灵活、自动翻译的国际化工具</p>
Expand Down Expand Up @@ -54,15 +54,15 @@

# 原理

>`翻译文案` 作为key是该库所有功能实现的关键,如果对此有任何疑问,[请查看](https://github.com/i18n-pro/core/blob/v2.0.0-alpha.8/docs/dist/Q&A_zh-CN.md)
>`翻译文案` 作为key是该库所有功能实现的关键,如果对此有任何疑问,[请查看](https://github.com/i18n-pro/core/blob/v2.0.0/docs/dist/Q&A_zh-CN.md)
该库主要由两部分构成
* 命令行工具
* 函数API

**命令行工具**:根据指定规则(正则匹配)解析出需要翻译的文案,并通过翻译平台将文案翻译到指定目标语言,最后生成语言包文件

解析文案的 [匹配规则](https://github.com/i18n-pro/core/blob/v2.0.0-alpha.8/docs/dist/MATCH_RULE_zh-CN.md) 简易示例如下
解析文案的 [匹配规则](https://github.com/i18n-pro/core/blob/v2.0.0/docs/dist/MATCH_RULE_zh-CN.md) 简易示例如下
```js
/** 普通字符串 */

Expand Down Expand Up @@ -103,14 +103,14 @@ t('我有{p0个苹果},{p1个香蕉}和{p2个梨}', 5, 4, 3)
所以 `命令行工具``函数API` 这两者搭配使用效果更佳,也正是由于这样的结构设计,使得 `i18n-pro` 库可以很方便集成到任何的 `JavaScript` 项目中
# 帮助文档

* [快速上手](https://github.com/i18n-pro/core/blob/v2.0.0-alpha.8/docs/dist/USAGE_zh-CN.md)
* [命令行](https://github.com/i18n-pro/core/blob/v2.0.0-alpha.8/docs/dist/COMMAND_LINE_zh-CN.md)
* [API](https://github.com/i18n-pro/core/blob/v2.0.0-alpha.8/docs/dist/API_zh-CN.md)
* [匹配规则](https://github.com/i18n-pro/core/blob/v2.0.0-alpha.8/docs/dist/MATCH_RULE_zh-CN.md)
* [翻译日志](https://github.com/i18n-pro/core/blob/v2.0.0-alpha.8/docs/dist/OUTPUT_LOG_zh-CN.md)
* [Q&A](https://github.com/i18n-pro/core/blob/v2.0.0-alpha.8/docs/dist/Q&A_zh-CN.md)
* [快速上手](https://github.com/i18n-pro/core/blob/v2.0.0/docs/dist/USAGE_zh-CN.md)
* [命令行](https://github.com/i18n-pro/core/blob/v2.0.0/docs/dist/COMMAND_LINE_zh-CN.md)
* [API](https://github.com/i18n-pro/core/blob/v2.0.0/docs/dist/API_zh-CN.md)
* [匹配规则](https://github.com/i18n-pro/core/blob/v2.0.0/docs/dist/MATCH_RULE_zh-CN.md)
* [翻译日志](https://github.com/i18n-pro/core/blob/v2.0.0/docs/dist/OUTPUT_LOG_zh-CN.md)
* [Q&A](https://github.com/i18n-pro/core/blob/v2.0.0/docs/dist/Q&A_zh-CN.md)
* [贡献指南](https://github.com/i18n-pro/core/blob/dev/docs/dist/CONTRIBUTION_GUIDELINES_zh-CN.md)
* [更新日志](https://github.com/i18n-pro/core/blob/v2.0.0-alpha.8/docs/dist/CHANGELOG_zh-CN.md)
* [更新日志](https://github.com/i18n-pro/core/blob/v2.0.0/docs/dist/CHANGELOG_zh-CN.md)


# License
Expand Down
2 changes: 1 addition & 1 deletion docs/dist/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ Get Internationalization Text<br />The internal will obtain `Translation Text`
<tr>
<td>text</td>
<td>
The text to be translated should meet specific <a href="https://github.com/i18n-pro/core/blob/v2.0.0-alpha.8/docs/dist/MATCH_RULE.md">Matching Rules</a> requirements
The text to be translated should meet specific <a href="https://github.com/i18n-pro/core/blob/v2.0.0/docs/dist/MATCH_RULE.md">Matching Rules</a> requirements
</td>
</tr>
<tr>
Expand Down
2 changes: 1 addition & 1 deletion docs/dist/API_zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
<tr>
<td>text</td>
<td>
待翻译的文案,该文案需满足特定 <a href="https://github.com/i18n-pro/core/blob/v2.0.0-alpha.8/docs/dist/MATCH_RULE_zh-CN.md">匹配规则</a>
待翻译的文案,该文案需满足特定 <a href="https://github.com/i18n-pro/core/blob/v2.0.0/docs/dist/MATCH_RULE_zh-CN.md">匹配规则</a>
</td>
</tr>
<tr>
Expand Down
4 changes: 2 additions & 2 deletions docs/dist/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Changelog


English | [简体中文](https://github.com/i18n-pro/core/blob/v2.0.0-alpha.8/docs/dist/CHANGELOG_zh-CN.md)
English | [简体中文](https://github.com/i18n-pro/core/blob/v2.0.0/docs/dist/CHANGELOG_zh-CN.md)


<details >
Expand Down Expand Up @@ -244,7 +244,7 @@ English | [简体中文](https://github.com/i18n-pro/core/blob/v2.0.0-alpha.8/do

<h4 id="120-documentation-added">Added</h4>

* Added documentation for [Translation log](https://github.com/i18n-pro/core/blob/v2.0.0-alpha.8/docs/dist/OUTPUT_LOG.md)
* Added documentation for [Translation log](https://github.com/i18n-pro/core/blob/v2.0.0/docs/dist/OUTPUT_LOG.md)


## [1.1.1] - 2022-06-25
Expand Down
4 changes: 2 additions & 2 deletions docs/dist/CHANGELOG_zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# 更新日志


[English](https://github.com/i18n-pro/core/blob/v2.0.0-alpha.8/docs/dist/CHANGELOG.md) | 简体中文
[English](https://github.com/i18n-pro/core/blob/v2.0.0/docs/dist/CHANGELOG.md) | 简体中文


<details >
Expand Down Expand Up @@ -244,7 +244,7 @@

<h4 id="120-文档-added">Added</h4>

* 新增[翻译日志](https://github.com/i18n-pro/core/blob/v2.0.0-alpha.8/docs/dist/OUTPUT_LOG_zh-CN.md)文档说明
* 新增[翻译日志](https://github.com/i18n-pro/core/blob/v2.0.0/docs/dist/OUTPUT_LOG_zh-CN.md)文档说明


## [1.1.1] - 2022-06-25
Expand Down
6 changes: 3 additions & 3 deletions docs/dist/USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ const text = t('hello world')


## 3. Initialize Command Line Configuration File
Enter the following command at the command line terminal, [more commands](https://github.com/i18n-pro/core/blob/v2.0.0-alpha.8/docs/dist/COMMAND_LINE.md#command-list)
Enter the following command at the command line terminal, [more commands](https://github.com/i18n-pro/core/blob/v2.0.0/docs/dist/COMMAND_LINE.md#command-list)
```bash
npx i18n init
```
Expand Down Expand Up @@ -111,7 +111,7 @@ module.exports = {


## 4. Adjust `i18nrc.js` Configuration
Adjust the configuration items in the configuration file according to the requirements, [Description](https://github.com/i18n-pro/core/blob/v2.0.0-alpha.8/docs/dist/COMMAND_LINE.md#1--i18nrcjs--configuration) of configuration items
Adjust the configuration items in the configuration file according to the requirements, [Description](https://github.com/i18n-pro/core/blob/v2.0.0/docs/dist/COMMAND_LINE.md#1--i18nrcjs--configuration) of configuration items

## 5. Execute Translation Command

Expand Down Expand Up @@ -185,7 +185,7 @@ setI18n({
If this library is used directly in a frontend application, when switching languages on the page, only the entire page can see the translated effect through **refresh directly**. A version of `React``Vue``SolidJS``Svelte` related UI library will be released later, which can achieve switching languages without refreshing the page by combining with the characteristics of the corresponding library. Stay tuned

## 8. Demo
Real code examples can be found in the [Live Demo](https://github.com/i18n-pro/core/tree/v2.0.0-alpha.8#live-demo) section of the `README` documentation, and the console output of the current library `Command Line Tool` has also been internationalized
Real code examples can be found in the [Live Demo](https://github.com/i18n-pro/core/tree/v2.0.0#live-demo) section of the `README` documentation, and the console output of the current library `Command Line Tool` has also been internationalized

You can see the Chinese version by executing the command `npx i18n h -L zh`
![demo](https://s3.bmp.ovh/imgs/2023/05/02/cc60f507a8f76a81.gif "demo")
6 changes: 3 additions & 3 deletions docs/dist/USAGE_zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ const text = t('hello world')


## 3. 初始化命令行配置文件
在命令行终端输入如下命令,[更多命令](https://github.com/i18n-pro/core/blob/v2.0.0-alpha.8/docs/dist/COMMAND_LINE_zh-CN.md#命令列表)
在命令行终端输入如下命令,[更多命令](https://github.com/i18n-pro/core/blob/v2.0.0/docs/dist/COMMAND_LINE_zh-CN.md#命令列表)
```bash
npx i18n init
```
Expand Down Expand Up @@ -111,7 +111,7 @@ module.exports = {


## 4. 调整 `i18nrc.js` 配置
根据需求自行调整配置文件中的配置项,配置项的[说明](https://github.com/i18n-pro/core/blob/v2.0.0-alpha.8/docs/dist/COMMAND_LINE_zh-CN.md#1--i18nrcjs-配置)
根据需求自行调整配置文件中的配置项,配置项的[说明](https://github.com/i18n-pro/core/blob/v2.0.0/docs/dist/COMMAND_LINE_zh-CN.md#1--i18nrcjs-配置)

## 5. 执行翻译命令

Expand Down Expand Up @@ -185,7 +185,7 @@ setI18n({
如果是直接在前端应用中使用该库,在页面上切换语言时,只能通过**直接刷新**整个页面才能看到翻译后的效果,后续会推出 `React``Vue``SolidJS``Svelte` 相关UI库的版本,结合对应库的特性可以做到不刷新页面切换语言,敬请期待

## 8. Demo
真实代码示例可参考 `README` 文档中的 [Live Demo](https://github.com/i18n-pro/core/blob/v2.0.0-alpha.8/README_zh-CN.md#live-demo) ,当前库 `命令行工具` 的控制台输出也接入了国际化
真实代码示例可参考 `README` 文档中的 [Live Demo](https://github.com/i18n-pro/core/blob/v2.0.0/README_zh-CN.md#live-demo) ,当前库 `命令行工具` 的控制台输出也接入了国际化

通过命令 `npx i18n h -L zh` 就能看中文版了
![demo](https://s3.bmp.ovh/imgs/2023/05/02/cc60f507a8f76a81.gif "demo")
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "i18n-pro",
"version": "2.0.0-alpha.8",
"version": "2.0.0",
"description": "Lightweight, simple, flexible, automatic translation internationalization tool for JavaScript(适用于 JavaScript 的轻量、简单、灵活、自动翻译的国际化工具)",
"files": [
"dist/src",
Expand Down

0 comments on commit b13123d

Please sign in to comment.