Allow setting message language separately from documentation language.

patch by Steve Dibb, steve.dibb gmail com


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29361 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
diego 2009-06-14 12:42:06 +00:00
parent d2a3ba44e8
commit 4a034d1f80
1 changed files with 9 additions and 4 deletions

13
configure vendored
View File

@ -439,9 +439,9 @@ Miscellaneous options:
--target=PLATFORM target platform (i386-linux, arm-linux, etc) --target=PLATFORM target platform (i386-linux, arm-linux, etc)
--enable-static build a statically linked binary --enable-static build a statically linked binary
--charset=charset convert the console messages to this character set --charset=charset convert the console messages to this character set
--language-msg=LINGUA language used for messages and the GUI [en]
--language=list a white space or comma separated list of languages for --language=list a white space or comma separated list of languages for
translated man pages, the first language is used for translated man pages (the environment variable
messages and the GUI (the environment variable
\$LINGUAS is also honored) [en] \$LINGUAS is also honored) [en]
(Available: all $msg_lang_all) (Available: all $msg_lang_all)
--with-install=PATH path to a custom install program --with-install=PATH path to a custom install program
@ -849,6 +849,9 @@ for ac_option do
--charset=*) --charset=*)
_charset=$(echo $ac_option | cut -d '=' -f 2) _charset=$(echo $ac_option | cut -d '=' -f 2)
;; ;;
--language-msg=*)
_language_msg=$(echo $ac_option | cut -d '=' -f 2)
;;
--language=*) --language=*)
_language=$(echo $ac_option | cut -d '=' -f 2) _language=$(echo $ac_option | cut -d '=' -f 2)
;; ;;
@ -2791,7 +2794,9 @@ echores "$_langinfo"
echocheck "language" echocheck "language"
test -z "$_language" && _language=$LINGUAS test -z "$_language" && _language=$LINGUAS
test -z "$_language_msg" && _language_msg=$LINGUAS
_language=$(echo $_language | tr , " ") _language=$(echo $_language | tr , " ")
_language_msg=$(echo $_language_msg | tr , " ")
if $(echo $_language | grep -q all) ; then if $(echo $_language | grep -q all) ; then
doc_lang=en ; doc_langs=$doc_lang_all doc_lang=en ; doc_langs=$doc_lang_all
man_lang=en ; man_langs=$man_lang_all man_lang=en ; man_langs=$man_lang_all
@ -2806,13 +2811,13 @@ else
done done
man_langs=$tmp_man_langs man_langs=$tmp_man_langs
doc_langs=$tmp_man_langs doc_langs=$tmp_man_langs
for lang in $_language ; do for lang in $_language_msg ; do
if test -f "help/help_mp-${lang}.h" ; then if test -f "help/help_mp-${lang}.h" ; then
msg_lang=$lang msg_lang=$lang
break break
else else
echo ${_echo_n} "$lang not found, ${_echo_c}" echo ${_echo_n} "$lang not found, ${_echo_c}"
_language=$(echo $_language | sed "s/$lang *//") _language_msg=$(echo $_language_msg | sed "s/$lang *//")
fi fi
done done
fi fi