Skip to content

Commit

Permalink
doc
Browse files Browse the repository at this point in the history
  • Loading branch information
wszgrcy committed Mar 23, 2024
1 parent 8230ba1 commit 3e294dc
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 10 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ on:
push:
branches:
- "master"

env:
REPOSITORY_PATH: https://${{secrets.ACCESS_TOKEN}}@github.com/
jobs:
publish:
runs-on: ${{ matrix.os }}
Expand All @@ -12,6 +13,10 @@ jobs:
matrix:
os: [ubuntu-latest]
steps:
- name: init
run: |
git config --global user.name "${GITHUB_ACTOR}"
git config --global user.email "${GITHUB_ACTOR}@gmail.com"
- uses: actions/checkout@v4
- name: install-node
uses: actions/setup-node@v1
Expand Down
7 changes: 1 addition & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"name": "@cyia/localize",
"version": "0.0.0",
"description": "Angular 本地化独立版本;Angular localize standalone version",
"main": "./lib/index.js",
"scripts": {
"sync:localize": "code-recycle ./script/sync-localize.ts --cwd ./src ",
"test": "rimraf ./test/fixture-output && node --import tsx --inspect ./node_modules/.bin/mocha \"test/**/*.ts\"",
Expand All @@ -11,11 +10,7 @@
"i18n:init": "tsx ./src/bin/index.ts ./src ./i18n-meta --update --name zh-Hans",
"i18n:convert": "tsx ./src/bin/index.ts convert ./i18n-meta ./dist/bin/i18n"
},
"bin": {
"i18n": "./lib/bin/index.js",
"l10n": "./lib/bin/index.js"
},
"author": "",
"author": "wszgrcy",
"private": true,
"devDependencies": {
"@types/chai": "^4.3.14",
Expand Down
5 changes: 4 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,7 @@ loadI18n();
```

## Merge other translations
- If other dependency packages also use `@cyia/localize` and the published package contains translated/metadata text, use `i18n merge ./output ./pkg1 ./pkg2` merge multiple and then import them again
- If other dependency packages also use `@cyia/localize` and the published package contains translated/metadata text, use `i18n merge ./output ./pkg1 ./pkg2` merge multiple and then import them again

## Update existing translations
- `i18n ./src ./i18n-meta --update --name zh-Hans`Extract the content and use `zh-Hans` as the original file (no translation required), while files in other languages will add/remove corresponding text
4 changes: 3 additions & 1 deletion readme.zh-Hans.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,7 @@ loadI18n();
```

## 合并其他翻译

- 如果其他依赖包也使用了`@cyia/localize`并且发布包中含有翻译文本/元数据文本,可以使用`i18n merge ./output ./pkg1 ./pkg2`将多个合并,然后再导入

## 更新已有翻译
- `i18n ./src ./i18n-meta --update --name zh-Hans`提取内容后以`zh-Hans`为原始文件(不需要翻译),其他语言的文件会添加/删除相应文本
2 changes: 1 addition & 1 deletion src/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cyia/localize",
"version": "1.2.1",
"version": "1.2.2",
"description": "Angular 本地化独立版本;Angular localize standalone version",
"bin": {
"i18n": "./bin/index.js",
Expand Down

0 comments on commit 3e294dc

Please sign in to comment.