[MPlayer-dev-eng] [PATCH] multi language part 2/2

Onur Küçük onur at delipenguen.net
Sat Dec 13 01:32:35 CET 2008


On Tue, 9 Dec 2008 15:10:02 +0100
Ötvös Attila <dc at chello.hu> wrote:

> Hi All!
> 
> This patch support multi language in 1 binary file.
> 
> New parameters: -msglang <lang code>.
> Default: set from LANG enviroment variables.
>
> help/help_create.sh:
> - change MSGTR_* -> to MSGTR_<lang code>_* in help_mp.h:
> MSGTR_Enabled -> MSGTR_en_Enabled from help_mp-en.h
> MSGTR_Enabled -> MSGTR_hu_Enabled from help_mp-hu.h
> ...
> 
> - build array from lang code: lang_code[]
> {"en","hu","de", ... }
> - build big array from messages: help_msg[msgid][langid]
> (cols - language, rows - messages)
> {MSGTR_en_Enabled,MSGTR_hu_Enabled,MSGTR_de_Enabled, ... },
> 
> create new MSGTR_*:
> #define MSGTR_Enabled help_msg[144][langid]
> 
> and create new static defined:
> #define MSGTR_STATIC_Enabled "###mpmsg###144###"
> 
> The mp_lang_translate() function (mp_msg.c) transate from
> "###mpmsg###144###" to help_msg[144][langid] if need (use
> MSGTR_STATIC_*).

 Build fails when enable-radio is selected (same for v4l2)

stream/stream_radio.c:54:2: warning: #warning "V4L is deprecated and will be removed in future"
In file included from stream/stream_radio.c:65:
./help_mp.h:40215:88: warning: backslash and newline separated by space
stream/stream_radio.c:405: error: initializer element is not constant
stream/stream_radio.c:405: error: (near initialization for 'radio_driver_v4l2.info')
stream/stream_radio.c:536: error: initializer element is not constant
stream/stream_radio.c:536: error: (near initialization for 'radio_driver_v4l.info')

 at the MSGTR of here

 /* v4l driver info structure */
static const radio_driver_t radio_driver_v4l={
    "v4l",
    MSGTR_RADIO_DriverV4L,
    init_frac_v4l,
    set_volume_v4l,
    get_volume_v4l,
    set_frequency_v4l,
    get_frequency_v4l
};


-- 
 Onur Küçük                                      Knowledge speaks,
 <onur.--.-.delipenguen.net>                     but wisdom listens




More information about the MPlayer-dev-eng mailing list