Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 44b1745

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

File tree

Expand file treeCollapse file tree

1 file changed

+14
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+14
-0
lines changed

‎from_cn.sh

Copy file name to clipboard
+14Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.