diff options
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 36 |
1 files changed, 30 insertions, 6 deletions
@@ -197,6 +197,8 @@ case $(echo -n) in *) _echo_n='-n ' _echo_c= ;; # BSD echo esac +msg_lang_all='' +ls po/*.po >/dev/null 2>&1 && msg_lang_all=$(echo po/*.po | sed -e 's:po/\([^[:space:]]*\)\.po:\1:g') man_lang_all=$(echo DOCS/man/??/mplayer.1 DOCS/man/??_??/mplayer.1 | sed -e "s:DOCS/man/\(..\)/mplayer.1:\1:g" -e "s:DOCS/man/\(.._..\)/mplayer.1:\1:g") doc_lang_all=$(echo DOCS/xml/??/ DOCS/xml/??_??/ | sed -e "s:DOCS/xml/\(..\)/:\1:g" -e "s:DOCS/xml/\(.._..\)/:\1:g") @@ -402,14 +404,18 @@ 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 extra languages for program messages [all] --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 $man_lang_all +will be dropped from each list. All translations available in the list will be +installed. The value "all" will activate all translations. The LINGUAS +environment variable is honored. In all cases the fallback is English. +The program always supports English-language output; additional message +languages are only installed if --enable-translation is also specified. +Available values for --language-doc are: all $doc_lang_all +Available values for --language-man are: all $man_lang_all +Available values for --language-msg are: all $msg_lang_all Miscellaneous options: --enable-runtime-cpudetection enable runtime CPU detection [disable] @@ -819,6 +825,9 @@ for ac_option do --language-man=*) language_man=$(echo $ac_option | cut -d '=' -f 2) ;; + --language-msg=*) + language_msg=$(echo $ac_option | cut -d '=' -f 2) + ;; --language=*) language=$(echo $ac_option | cut -d '=' -f 2) ;; @@ -2843,11 +2852,18 @@ echocheck "language" test -z "$language" && language=$LINGUAS test -z "$language_doc" && language_doc=$language test -z "$language_man" && language_man=$language +test -z "$language_msg" && language_msg="all" language_doc=$(echo $language_doc | tr , " ") language_man=$(echo $language_man | tr , " ") +language_msg=$(echo $language_msg | tr , " ") test "$language_doc" = "all" && language_doc=$doc_lang_all test "$language_man" = "all" && language_man=$man_lang_all +test "$language_msg" = "all" && language_msg=$msg_lang_all + +if test "$_translation" != yes ; then + language_msg="" +fi # Prune non-existing translations from language lists. # Set message translation to the first available language. @@ -2864,7 +2880,12 @@ done language_man=$tmp_language_man test -z "$language_man" && language_man=en -echores "man pages: $language_man - documentation: $language_doc" +for lang in $language_msg ; do + test -f po/$lang.po && tmp_language_msg="$tmp_language_msg $lang" +done +language_msg=$tmp_language_msg + +echores "messages (en+): $language_msg - man pages: $language_man - documentation: $language_doc" echocheck "enable sighandler" @@ -7819,6 +7840,8 @@ DOC_LANGS = $language_doc DOC_LANG_ALL = $doc_lang_all MAN_LANGS = $language_man MAN_LANG_ALL = $man_lang_all +MSG_LANGS = $language_msg +MSG_LANG_ALL = $msg_lang_all prefix = \$(DESTDIR)$_prefix BINDIR = \$(DESTDIR)$_bindir @@ -8553,6 +8576,7 @@ Config files successfully generated by ./configure $_configuration ! Optimizing for: $_optimizing Languages: + Messages (in addition to English): $language_msg Manual pages: $language_man Documentation: $language_doc |