File: pozh

package info (click to toggle)
maint-guide 1.2.53
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 7,264 kB
  • sloc: xml: 5,892; makefile: 225; sh: 221
file content (19 lines) | stat: -rwxr-xr-x 625 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh -e
DPO="po"
DCC="/usr/share/opencc"
# The threshold should be 80 if translation is completed.
MSGCAT="/usr/bin/msgcat"
OPENCC="/usr/bin/opencc"

if ! type ${opencc}; then
    echo "install opencc"
    exit 1
fi

# Generate PO (zh-cn)
${MSGCAT} --no-wrap ${DPO}/zh-tw.po | ${OPENCC} -c ${DCC}/tw2sp.json -o ${DPO}/zh-cn.po-opencc
${MSGCAT} -o ${DPO}/zh-cn.po.new --use-first ${DPO}/zh-cn.po ${DPO}/zh-cn.po-opencc

# Generate PO (zh-tw)
${MSGCAT} --no-wrap ${DPO}/zh-cn.po | ${OPENCC} -c ${DCC}/s2twp.json -o ${DPO}/zh-tw.po-opencc
${MSGCAT} -o ${DPO}/zh-tw.po.new --use-first ${DPO}/zh-tw.po ${DPO}/zh-tw.po-opencc