File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ usage="Usage: $0 OLD_FILE MERGE_ME_IN [POT_FILE=MERGE_ME_IN]
77Env vars:
88 ZH_MSGMERGE_OPTS \` linear' array of extra flags for \` msgmerge'.
99 Example: '-E -C \" my compendia.po\" -w 79 --previous'
10- Default: '--backup=nil -- previous'
10+ Default: '--previous'
1111
1212 ZH_POST_OCC:function What to do after invoking OpenCC. To use,
1313 define a function with this name in bash,
@@ -34,7 +34,7 @@ $usage"
3434type opencc sed msgmerge > /dev/null || die " required command(s) not found"
3535
3636# Accept environment 'linear array' input.
37- declare -a ZH_MSGMERGE_OPTS=" (${ZH_MSGMERGE_OPTS:- --backup=nil -- previous} )"
37+ declare -a ZH_MSGMERGE_OPTS=" (${ZH_MSGMERGE_OPTS:- --previous} )"
3838
3939type ZH_POST_OCC & > /dev/null || ZH_POST_OCC (){ : ; }
4040
@@ -155,7 +155,10 @@ occ_conv "$newtype" "$oldtype" "$new"{,".$oldtype"} ||
155155
156156ZH_POST_OCC
157157
158+ cp " $old " {,' ~' }
159+ msgattrib --translated -o " $old " {,}
158160msgcat -o " $old .all" --use-first " $old " " $new .$oldtype "
161+
159162msgmerge --lang=" zh_$oldtype " " ${ZH_MSGMERGE_OPTS[@]} " -o " $old " {,.all} " $pot " ||
160163 die " msgmerge returned $? ."
161164
You can’t perform that action at this time.
0 commit comments