-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
squash: dictGenerate update, +replacement
--- up custom git fetch -t out xml2json getRepo clean xml2json custom: replace; dict view fix dockerig up generate: update build ENV getRepo; ENV BRANCH/TAG +slim pt with alpine yarn,npm preset; grunt inst -g same imagePack err libpng* grunt inst inDocker; use slim-stretchImg; gruntfile; mv conf up imgs replace, latest dev_clone pt use cache use cache cache dockerig upper pt up up: with dictReplace.txt sort, +说明; replace: view public.tar.gz dictGen: ADD ./generate/dictReplace.txt /generate up ig readme: use dictReplace with @@@: non trans jdus host barge 20089 fix +pt mv dir notes test ins: image-webpack-loader webpack.production automake gcc fix ig dir output npmBuild up readme replacement Dockerfile
- Loading branch information
Sam@host-20089
authored and
sam
committed
Oct 15, 2021
1 parent
765bb7a
commit ea090b0
Showing
22 changed files
with
817 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
output | ||
replacement | ||
demo | ||
*.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
|
||
**dict/public.tar.gz** | ||
|
||
```bash | ||
# dict生成 | ||
# ENV GENERATE_REPO="https://gitee.com/g-devops/fk-portainer" \ | ||
# GENERATE_OUTPUT="portainer_zh.xml" \ | ||
# CMP1="2.9.1" \ | ||
# CMP2="origin/br-lang2" | ||
docker run -it --rm -e CMP1=2.9.1 -e CMP2=origin/br-lang3 -v /mnt/data/$(pwd)/output:/output registry.cn-shenzhen.aliyuncs.com/infrastlabs/lang-replacement:dict | ||
|
||
|
||
# xml2json | ||
# wget https://hub.fastgit.org/covrom/xml2json/releases/download/1.0/xml2json | ||
cat portainer_zh.xml |./xml2json |jq | ||
|
||
``` | ||
|
||
**publicMount** | ||
|
||
```bash | ||
# barge: 生成public.tar.gz | ||
# ENV \ | ||
# REPO="https://gitee.com/g-devops/fk-portainer" \ | ||
# # BRANCH="release/2.9" \ | ||
# TAG="2.9.1" | ||
|
||
# TAG=2.9.0 | ||
docker run -it --rm -e BRANCH=sam-custom -v /mnt/data/$(pwd)/output:/output registry.cn-shenzhen.aliyuncs.com/infrastlabs/lang-replacement:replace | ||
|
||
|
||
|
||
# tar -zxf public.tar.gz | ||
public=/mnt/data/$(pwd)/output/portainer/dist/public | ||
docker run -it --rm --net=host -v /var/run/docker.sock:/var/run/docker.sock -v $public:/public portainer/portainer-ce:2.9.1-alpine | ||
|
||
|
||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,36 @@ | ||
#!/bin/bash | ||
outPath="/output" && mkdir -p $outPath | ||
|
||
# if EXEC_TYPE="GENERATE" | ||
# $AUTH | ||
git clone -b $GENERATE_BRANCH $GENERATE_REPO srcGen | ||
export SOURCE=srcGen/app | ||
export CMP1=055c57 | ||
export CMP2=br-v29-lang | ||
export OUTPUT=$outPath/$GENERATE_OUTPUT | ||
./gitdiff.sh | ||
# $AUTH #-b $GENERATE_BRANCH | ||
# TODO /output/.cache/pt0_dict | ||
mkdir -p /output/.cache; srcGenerate=/output/.cache/pt0_dict | ||
# git clone $GENERATE_REPO $srcGenerate #each newDir, just normal clone. | ||
# repo | ||
function getRepo(){ | ||
errExit(){ | ||
echo "$1" | ||
exit 1 | ||
} | ||
if [ ! -d $srcGenerate ]; then | ||
git clone $GENERATE_REPO $srcGenerate #--depth=1 | ||
else | ||
cd $srcGenerate; | ||
git fetch | ||
# if both tag: | ||
git fetch origin tag $CMP1 | ||
git fetch origin tag $CMP2 | ||
fi | ||
} | ||
getRepo | ||
|
||
|
||
cat $OUTPUT |wc | ||
# SOURCE=srcReplace | ||
outPath="/output" && mkdir -p $outPath | ||
# export CMP1=055c57 | ||
# export CMP2=br-lang2 | ||
export SOURCE=$srcGenerate/app | ||
export OUTPUT=$outPath/$GENERATE_OUTPUT | ||
/generate/gitdiff.sh | ||
|
||
# view | ||
cat $OUTPUT |wc; tail -30 $OUTPUT | ||
# /generate/transfer -f -s $OUTPUT -t /tmp/view.json; cat /tmp/view.json |jq #tranferErr: got "null" | ||
cat $OUTPUT |/generate/xml2json |jq |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<expect><![CDATA[text="Containers"]]></expect>|<expect><![CDATA[text="容器"]]></expect> | ||
<expect><![CDATA[text="Events"]]></expect>|<expect><![CDATA[text="Events事件"]]></expect> | ||
<expect><![CDATA[text="Images"]]></expect>|<expect><![CDATA[text="镜像"]]></expect> | ||
<expect><![CDATA[text="Networks"]]></expect>|<expect><![CDATA[text="网络"]]></expect> | ||
<expect><![CDATA[text="Volumes"]]></expect>|<expect><![CDATA[text="磁盘"]]></expect> | ||
|
||
<expect><![CDATA[text="Registries"]]></expect>|<expect><![CDATA[text="Registries仓库"]]></expect> | ||
<expect><![CDATA[-text="Stacks"]]></expect>|<expect><![CDATA[-text="应用Stacks"]]></expect> | ||
<expect><![CDATA[获取容噟����������������������������明细失败]]></expect>|<expect><![CDATA[获取容器明细失败]]></expect> | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
|
||
```bash | ||
headless @ barge in .../lang-replacement/generate |17:31:51 |dev U:3 ?:3 ✗| | ||
$ cat t1.txt |sed "s^<expect><\!\[CDATA\[^bb/^g" | ||
bb/ | ||
# $ cat t1.txt | ||
<expect><![CDATA[ | ||
``` |
Oops, something went wrong.