Skip to content

Commit 44b1745

Browse files
committed
Add from_cn.sh script that copies translations from zh_CN and convert it with OpenCC
1 parent 024e238 commit 44b1745

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

from_cn.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/sh
2+
3+
fp=$1
4+
python_docs_zh_cn=../python-docs-zh-cn
5+
6+
opencc -i $python_docs_zh_cn/$fp -c s2twp.json -o /tmp/tmp.po
7+
pofilter --nonotes --excludefilter unchanged --excludefilter untranslated /tmp/tmp.po | msgattrib --set-fuzzy -o /tmp/tmp.po
8+
pomerge -t $python_docs_zh_cn/$fp -i /tmp/tmp.po -o /tmp/tmp.po
9+
10+
pofilter --nonotes --excludefilter untranslated $fp /tmp/tmp2.po
11+
pomerge -t /tmp/tmp.po -i /tmp/tmp2.po -o /tmp/tmp3.po
12+
msgcat --lang zh_TW /tmp/tmp3.po -o $fp
13+
14+
rm /tmp/tmp.po /tmp/tmp2.po /tmp/tmp3.po

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy