[MPlayer-dev-eng] Using gettext in MPlayer

joy joy at pingfm.org
Wed Jul 3 12:09:44 CEST 2002


On Wed, Jul 03, 2002 at 10:13:29AM +0200, Andras Mohari wrote:
> Hi,
> 
> I saw in the -dev-eng archives that there was some discussion about
> using GNU gettext in MPlayer.  I was playing with the 20020620 CVS
> version to add gettext support and now it seems to work.
> 
> Before even trying to update it to current CVS and send a patch,
> I'd like to know what you think about it.  I mean, why it'd be
> rejected if I sent it. ;)
> 
> Below is the list of changes I made.
> 
> Modified configure:
> * Removed the --language option. (help_mp-??.h files are not
>   used anymore.  I should somehow move these messages into .po
>   files...)
> * configure adds the I18N variable to config.mak.
> * config.h will define _() and N_() macros for marking translatable
>   strings.  (mp_gettext() is not used anymore.)
> 
> Modified the main Makefile:
> * 'make install' and 'make uninstall' descends into the new 'po'
>   subdirectory.
> 
> New files:
> * Added a po/ subdirectory for .po files. I wrote a Makefile that can
>   be used to create the .po template and create/install/uninstall .mo
>   files.  There are two scripts to help translators updating and
>   testing their .po files.
> 
>   The messages catalogs are installed under $prefix/share/locale.
>   (Maybe it should be configurable, eg: ./configure --localedir=...)
> 
>   Only the files listed in po/SRCFILES are searched for translatable
>   messages.  It might be an annoyance for developers, but it's still
>   better than looking through hundreds of *.[ch] files in different
>   directories...
> 
> Modified sources:
> * Copied help_mp-en.h as help_mp.h and marked all messages for
>   translation.  I had to remove the #ifdefs from help_text and change
>   it a bit, as xgettext extracts the #ifdef'ed parts too, so -gui,
>   -dvd, -vcd and -[as]lang is included even if not supported.  (It
>   shouldn't be a problem IMHO).
> * Changed some messages: removed some '!' chars, changed
>   wording.  (Some of them are cosmetical changes, so maybe I should
>   revert them...)
> * mp_msg() no longer translates strings (use _() when passing args).
> * Marked MSGTR_* (and some other) messages for translation.  (I saw
>   some MSGTR_MENU_* "       " concatenations -- are those spaces
>   required???)
> 
> Whew, that's all I can remember.  Comments are welcome.
> 
using GNU gettext in mplayer would be great, standardtization, already
available tools for translators etc., bla.... 


-- 
regards

____-
joy

________/\---------%%%___________-----------
webcast every sunday 2000 cest at pingfm.org

pgp key at: x-hkp://wwwkeys.de.pgp.net



More information about the MPlayer-dev-eng mailing list