2 # Create the messages header file from the master source file or a translation.
3 # Missing messages are filled in from the master message file and, if
4 # requested, character set conversion is performed.
6 MASTER
=help
/help_mp-en.h
15 while read -r line
; do
16 if echo "$line" |
grep -q '^#define' ; then
17 curr
=`printf "%s\n" "$line" | cut -d ' ' -f 2`
18 if grep -q "^#define $curr[ ]" "$TRANSLATION" ; then
22 if [ -z "$line" ]; then
27 if [ -n "$curr" ]; then
34 /* WARNING! This is a generated file, do NOT edit.
35 * See the help/ subdirectory for the editable files. */
37 #ifndef MPLAYER_HELP_MP_H
38 #define MPLAYER_HELP_MP_H
42 cat "$TRANSLATION" >> "$TARGET"
44 cat <<EOF >> "$TARGET"
46 /* untranslated messages from the English master file */
50 if test "$MASTER" != "$TRANSLATION" ; then
51 missing_messages
< "$MASTER" >> "$TARGET"
54 cat <<EOF >> "$TARGET"
56 #endif /* MPLAYER_HELP_MP_H */
59 if test $CHARSET != UTF-8
; then
60 iconv -f UTF-8
-t "$CHARSET" "$TARGET" > "${TARGET}.tmp"
61 mv "${TARGET}.tmp" "$TARGET"