2
[Makefile] Convert Traditional Chinese PO file to Simplified Chinese via OpenCC
source link: http://siongui.github.io/2016/03/12/makefile-convert-zhtw-po-file-to-zhcn/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
[Makefile] Convert Traditional Chinese PO file to Simplified Chinese via OpenCC
March 12, 2016
Convert Traditional Chinese PO file to Simplified Chinese via OpenCC and sed in Makefile.
twpo2cn: @echo "\033[92mCheck if OpenCC exists ...\033[0m" @[ -x $(shell command -v opencc 2> /dev/null) ] || sudo apt-get install opencc @echo "\033[92mCreating zh_CN PO from zh_TW PO ...\033[0m" @[ -d $(LOCALE_DIR)/zh_CN/LC_MESSAGES/ ] || mkdir -p $(LOCALE_DIR)/zh_CN/LC_MESSAGES/ @opencc -c zht2zhs.ini -i $(LOCALE_DIR)/zh_TW/LC_MESSAGES/messages.po -o $(LOCALE_DIR)/zh_CN/LC_MESSAGES/messages.po @sed 's/zh_TW/zh_CN/' -i $(LOCALE_DIR)/zh_CN/LC_MESSAGES/messages.po
Tested on Ubuntu Linux 15.10, opencc 0.4.3-2build1, GNU make 4.0-8.2.
References:
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK