From e046fa584a5fd695e652570725cab5eb6ef5c17d Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 18 Oct 2013 22:09:31 +0200 Subject: mp_msg: remove gettext() support Was disabled by default, was never used, internal support was inconsistent and poor, and there has been virtually no interest in creating translations. And I don't even think that a terminal program should be translated. This is something for (hypothetical) GUIs. --- audio/out/ao.c | 2 +- configure | 24 ----------------- mpvcore/mp_msg.c | 82 -------------------------------------------------------- mpvcore/mp_msg.h | 6 ++--- video/out/vo.c | 2 +- 5 files changed, 4 insertions(+), 112 deletions(-) diff --git a/audio/out/ao.c b/audio/out/ao.c index 566ab0fea9..416bec43f0 100644 --- a/audio/out/ao.c +++ b/audio/out/ao.c @@ -130,7 +130,7 @@ static struct ao *ao_create(bool probing, struct mpv_global *global, struct mp_log *log = mp_log_new(NULL, global->log, "ao"); struct m_obj_desc desc; if (!m_obj_list_find(&desc, &ao_obj_list, bstr0(name))) { - mp_tmsg_log(log, MSGL_ERR, "Audio output %s not found!\n", name); + mp_msg_log(log, MSGL_ERR, "Audio output %s not found!\n", name); talloc_free(log); return NULL; }; diff --git a/configure b/configure index 2c41e05a34..a0c6a84532 100755 --- a/configure +++ b/configure @@ -289,7 +289,6 @@ Installation directories: --docdir=DIR directory for installing docs [PREFIX/share/doc/mpv] --confdir=DIR directory for installing configuration files [PREFIX/etc/mpv] - --localedir=DIR directory for gettext locales [PREFIX/share/locale] Optional features: --disable-encoding disable encoding functionality [enable] @@ -374,9 +373,6 @@ Audio output: --disable-wasapi disable WASAPI (event mode) audio output [autodetect] --disable-select disable using select() on the audio device [enable] -Localization options: - --enable-gettext enable gettext() usage [disable] - Miscellaneous options: --enable-cross-compile enable cross-compilation [disable] --cc=COMPILER C compiler to build mpv [gcc] @@ -480,7 +476,6 @@ _terminfo=auto _termcap=auto _termios=auto _shm=auto -_gettext=no _cdda=auto _coreaudio=auto _corevideo=auto @@ -523,9 +518,6 @@ for ac_option do --confdir=*) _confdir=$(echo $ac_option | cut -d '=' -f 2) ;; - --localedir=*) - _localedir=$(echo $ac_option | cut -d '=' -f 2) - ;; --with-install=*) _install=$(echo $ac_option | cut -d '=' -f 2 ) @@ -581,8 +573,6 @@ for ac_option do --disable-optimization) _opt= ;; - --enable-gettext) _gettext=yes ;; - --disable-gettext) _gettext=no ;; --enable-cross-compile) _cross_compile=yes ;; --disable-cross-compile) _cross_compile=no ;; --enable-encoding) _encoding=yes ;; @@ -753,7 +743,6 @@ test -z "$_bindir" && _bindir="$_prefix/bin" test -z "$_mandir" && _mandir="$_prefix/share/man" test -z "$_docdir" && _docdir="$_prefix/share/doc/mpv" test -z "$_confdir" && _confdir="$_prefix/etc/mpv" -test -z "$_localedir" && _localedir="$_prefix/share/locale" for tmpdir in "$TMPDIR" "$TEMPDIR" "/tmp" ; do test "$tmpdir" && break @@ -1260,15 +1249,6 @@ else fi -echocheck "gettext support" -if test "$_gettext" = yes; then - def_gettext="#define CONFIG_GETTEXT 1" -else - def_gettext="#undef CONFIG_GETTEXT" -fi -echores "$_gettext" - - echocheck "nanosleep" _nanosleep=no statement_check time.h 'nanosleep(0, 0)' && _nanosleep=yes @@ -3228,7 +3208,6 @@ BINDIR = \$(DESTDIR)$_bindir MANDIR = \$(DESTDIR)$_mandir DOCDIR = \$(DESTDIR)$_docdir CONFDIR = \$(DESTDIR)$_confdir -LOCALEDIR = \$(DESTDIR)$_localedir CC = $_cc CXX = $_cc @@ -3358,9 +3337,6 @@ cat > $TMPH << EOF #define CONFIGURATION "$configuration" #define MPLAYER_CONFDIR "$_confdir" -#define MPLAYER_LOCALEDIR "$_localedir" - -$def_gettext /* system headers */ diff --git a/mpvcore/mp_msg.c b/mpvcore/mp_msg.c index 3f073bf919..0284f2a2cb 100644 --- a/mpvcore/mp_msg.c +++ b/mpvcore/mp_msg.c @@ -30,11 +30,6 @@ #include "osdep/getch2.h" #include "osdep/io.h" -#ifdef CONFIG_GETTEXT -#include -#include -#endif - #ifndef __MINGW32__ #include #endif @@ -122,14 +117,6 @@ static void mp_msg_do_init(void){ for(i=0;ilog, "vo"); struct m_obj_desc desc; if (!m_obj_list_find(&desc, &vo_obj_list, bstr0(name))) { - mp_tmsg_log(log, MSGL_ERR, "Video output %s not found!\n", name); + mp_msg_log(log, MSGL_ERR, "Video output %s not found!\n", name); talloc_free(log); return NULL; }; -- cgit v1.2.3