Overhaul translation handling completely and add options to install specific

documentation and man page translations.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29363 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
diego 2009-06-14 14:55:01 +00:00
parent ee57be5389
commit 2b78779100
1 changed files with 55 additions and 43 deletions

98
configure vendored
View File

@ -425,6 +425,20 @@ Audio output:
--disable-coreaudio disable CoreAudio audio output [autodetect] --disable-coreaudio disable CoreAudio audio output [autodetect]
--disable-select disable using select() on the audio device [enable] --disable-select disable using select() on the audio device [enable]
Language options:
--charset=charset convert the console messages to this character set
--language-doc=lang language to use for the documentation [en]
--language-man=lang language to use for the man pages [en]
--language-msg=lang language to use for the messages and the GUI [en]
--language=lang default language to use [en]
Specific options override --language. You can pass a list of languages separated
by whitespace or commas instead of a single language. Nonexisting translations
will be dropped from each list. All documentation and man page translations
available in the list will be installed, for the messages the first available
translation will be used. The value "all" will activate all translations. The
LINGUAS environment variable is honored. In all cases the fallback is English.
Available values are: all $msg_lang_all
Miscellaneous options: Miscellaneous options:
--enable-runtime-cpudetection enable runtime CPU detection [disable] --enable-runtime-cpudetection enable runtime CPU detection [disable]
--enable-cross-compile enable cross-compilation [autodetect] --enable-cross-compile enable cross-compilation [autodetect]
@ -438,12 +452,6 @@ Miscellaneous options:
--windres=WINDRES windres to build MPlayer [windres] --windres=WINDRES windres to build MPlayer [windres]
--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
--language-msg=LINGUA language used for messages and the GUI [en]
--language=list a white space or comma separated list of languages for
translated man pages (the environment variable
\$LINGUAS is also honored) [en]
(Available: all $msg_lang_all)
--with-install=PATH path to a custom install program --with-install=PATH path to a custom install program
Advanced options: Advanced options:
@ -849,6 +857,12 @@ for ac_option do
--charset=*) --charset=*)
_charset=$(echo $ac_option | cut -d '=' -f 2) _charset=$(echo $ac_option | cut -d '=' -f 2)
;; ;;
--language-doc=*)
language_doc=$(echo $ac_option | cut -d '=' -f 2)
;;
--language-man=*)
language_man=$(echo $ac_option | cut -d '=' -f 2)
;;
--language-msg=*) --language-msg=*)
language_msg=$(echo $ac_option | cut -d '=' -f 2) language_msg=$(echo $ac_option | cut -d '=' -f 2)
;; ;;
@ -2793,41 +2807,40 @@ echores "$_langinfo"
echocheck "language" echocheck "language"
# Set preferred languages, "all" uses English as main language.
test -z "$language" && language=$LINGUAS test -z "$language" && language=$LINGUAS
test -z "$language_msg" && language_msg=$LINGUAS test -z "$language_doc" && language_doc=$language
language=$(echo $language | tr , " ") test -z "$language_man" && language_man=$language
test -z "$language_msg" && language_msg=$language
language_doc=$(echo $language_doc | tr , " ")
language_man=$(echo $language_man | tr , " ")
language_msg=$(echo $language_msg | tr , " ") language_msg=$(echo $language_msg | tr , " ")
if $(echo $language | grep -q all) ; then
doc_lang=en ; doc_langs=$doc_lang_all test "$language_doc" = "all" && language_doc=$doc_lang_all
man_lang=en ; man_langs=$man_lang_all test "$language_man" = "all" && language_man=$man_lang_all
else test "$language_msg" = "all" && language_msg=en
for lang in $language ; do
if test -d DOCS/man/$lang ; then # Prune non-existing translations from language lists.
tmp_man_langs="$tmp_man_langs $lang" # Set message translation to the first available language.
fi # Fall back on English.
if test -d DOCS/xml/$lang ; then for lang in $language_doc ; do
tmp_doc_langs="$tmp_doc_langs $lang" test -d DOCS/xml/$lang && tmp_language_doc="$tmp_language_doc $lang"
fi done
done language_doc=$tmp_language_doc
man_langs=$tmp_man_langs test -z "language_doc" && language_doc=en
doc_langs=$tmp_man_langs
for lang in $language_msg ; do for lang in $language_man ; do
if test -f "help/help_mp-${lang}.h" ; then test -d DOCS/man/$lang && tmp_language_man="$tmp_language_man $lang"
msg_lang=$lang done
break language_man=$tmp_language_man
else test -z "language_man" && language_man=en
echo ${_echo_n} "$lang not found, ${_echo_c}"
language_msg=$(echo $language_msg | sed "s/$lang *//") for lang in $language_msg ; do
fi test -f "help/help_mp-${lang}.h" && language_msg=$lang && break
done done
fi test -z "language_msg" && language_msg=en
test -z "$doc_langs" && doc_langs=en _mp_help="help/help_mp-${language_msg}.h"
test -z "$man_langs" && man_langs=en echores "messages: $language_msg - man pages: $language_man - documentation: $language_doc"
test -z "$doc_lang" && doc_lang=$(echo $doc_langs | cut -f1 -d" ")
test -z "$man_lang" && man_lang=$(echo $man_langs | cut -f1 -d" ")
test -z "$msg_lang" && msg_lang=en
_mp_help="help/help_mp-${msg_lang}.h"
echores "messages: $msg_lang - man pages: $man_langs - documentation: $doc_langs"
echocheck "enable sighandler" echocheck "enable sighandler"
@ -8113,10 +8126,8 @@ export LC_ALL = C
CONFIGURATION = $_configuration CONFIGURATION = $_configuration
CHARSET = $_charset CHARSET = $_charset
DOC_LANG = $doc_lang
DOC_LANGS = $doc_langs DOC_LANGS = $doc_langs
DOC_LANG_ALL = $doc_lang_all DOC_LANG_ALL = $doc_lang_all
MAN_LANG = $man_lang
MAN_LANGS = $man_langs MAN_LANGS = $man_langs
MAN_LANG_ALL = $man_lang_all MAN_LANG_ALL = $man_lang_all
@ -8910,8 +8921,9 @@ Config files successfully generated by ./configure $_configuration !
Optimizing for: $_optimizing Optimizing for: $_optimizing
Languages: Languages:
Messages/GUI: $msg_lang Messages/GUI: $language_msg
Manual pages: $man_langs Manual pages: $language_man
Documentation: $language_doc
Enabled optional drivers: Enabled optional drivers:
Input: $_inputmodules Input: $_inputmodules