1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-27 09:32:40 +00:00

language handling simplification

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12965 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
diego 2004-08-05 00:14:16 +00:00
parent a8e0a6ac90
commit aac305d6f8
2 changed files with 18 additions and 19 deletions

View File

@ -253,7 +253,7 @@ ifeq ($(GUI),yes)
-ln -sf $(PRG) $(BINDIR)/gmplayer
endif
if test ! -d $(MANDIR)/man1 ; then mkdir -p $(MANDIR)/man1; fi
for i in $(LANGUAGES); do \
for i in $(MAN_LANG); do \
if test "$$i" = en ; then \
$(INSTALL) -c -m 644 DOCS/man/en/mplayer.1 $(MANDIR)/man1/mplayer.1 ; \
else \
@ -263,7 +263,7 @@ endif
done
ifeq ($(MENCODER),yes)
$(INSTALL) -m 755 $(INSTALLSTRIP) $(PRG_MENCODER) $(BINDIR)/$(PRG_MENCODER)
for i in $(LANGUAGES); do \
for i in $(MAN_LANG); do \
if test "$$i" = en ; then \
ln -sf mplayer.1 $(MANDIR)/man1/mencoder.1 ; \
else \

33
configure vendored
View File

@ -125,7 +125,7 @@ case `echo -n` in
*) _echo_n='-n ' _echo_c= ;; # BSD echo
esac
LANGUAGES=`echo help/help_mp-??.h help/help_mp-??_??.h | sed "s/help\/help_mp-\(..\).h/\1/g" |sed "s/help\/help_mp-\(.....\).h/\1/g"`
LANGUAGES=`echo help/help_mp-??.h help/help_mp-??_??.h | sed "s:help/help_mp-\(..\).h:\1:g" | sed "s:help/help_mp-\(.....\).h:\1:g"`
for parm in "$@" ; do
if test "$parm" = "--help" || test "$parm" = "-help" || test "$parm" = "-h" ; then
@ -2095,29 +2095,28 @@ echocheck "language"
test -z "$_language" && _language=$LINGUAS
_language=`echo $_language | sed 's/,/ /g'`
echo $_language | grep all > /dev/null || LANGUAGES="$_language en"
for i in $_language ; do
test "$i" = all && i=en
if test -f "help/help_mp-${i}.h" ; then
_language=$i
for lang in $_language ; do
test "$lang" = all && lang=en
if test -f "help/help_mp-${lang}.h" ; then
_language=$lang
break
else
echo -n "$i not found, "
_language=`echo $_language | sed "s/$i *//"`
echo -n "$lang not found, "
_language=`echo $_language | sed "s/$lang *//"`
fi
done
test -z "$_language" && _language=en
for i in $LANGUAGES ; do
if test -f "DOCS/man/$i/mplayer.1" ; then
LANGUAGES=`echo $LANGUAGES | sed "s/$i *//2" | sed 's/ *$//'`
else
LANGUAGES=`echo $LANGUAGES | sed "s/$i *//" | sed 's/ *$//'`
fi
done
echores "using $_language (man pages: $LANGUAGES)"
_mp_help="help/help_mp-${_language}.h"
test -f $_mp_help || die "$_mp_help not found"
for lang in $LANGUAGES ; do
if test -f "DOCS/man/$lang/mplayer.1" ; then
MAN_LANG="$MAN_LANG $lang"
fi
done
_doc_lang=$_language
test -d DOCS/xml/$_doc_lang || _doc_lang=en
echores "using $_language (man pages: $MAN_LANG)"
echocheck "enable sighandler"
if test "$_sighandler" = yes ; then
@ -6067,7 +6066,7 @@ cat > config.mak << EOF
# -------- Generated by configure -----------
LANG = C
LANGUAGES = $LANGUAGES
MAN_LANG = $MAN_LANG
TARGET_OS = $system_name
DESTDIR =
prefix = \$(DESTDIR)$_prefix
@ -6882,7 +6881,7 @@ Config files successfully generated by ./configure !
Messages/GUI: $_language
EOF
echo -n " Manual pages: $LANGUAGES"
echo -n " Manual pages: $MAN_LANG"
test "$LANGUAGES" = en && echo -n " (no localization selected, use --language=all)"
echo