# HG changeset patch # User diego # Date 1129633885 0 # Node ID 8d4fb5469efbf0ffebc956a4782f1fbc441c5b3a # Parent e8a77a6beb2ef56724424087d8a9f1bfc743e12b Make a few more messages translatable by moving them into help_mp-en.h. patch by Paul TT < paultt == at == hackerjournal == dot == it > diff -r e8a77a6beb2e -r 8d4fb5469efb help/help_mp-en.h --- a/help/help_mp-en.h Tue Oct 18 08:22:27 2005 +0000 +++ b/help/help_mp-en.h Tue Oct 18 11:11:25 2005 +0000 @@ -471,15 +471,23 @@ #define MSGTR_SMBNotCompiled "MPlayer was not compiled with SMB reading support.\n" #define MSGTR_CantOpenDVD "Couldn't open DVD device: %s\n" +#define MSGTR_NoDVDSupport "MPlayer was compiled without DVD support, exit\n" #define MSGTR_DVDwait "Reading disc structure, please wait...\n" #define MSGTR_DVDnumTitles "There are %d titles on this DVD.\n" #define MSGTR_DVDinvalidTitle "Invalid DVD title number: %d\n" #define MSGTR_DVDnumChapters "There are %d chapters in this DVD title.\n" #define MSGTR_DVDinvalidChapter "Invalid DVD chapter number: %d\n" +#define MSGTR_DVDinvalidChapterRange "Invalid chapter range specification %s\n" +#define MSGTR_DVDinvalidLastChapter "Invalid DVD last chapter number: %d\n" #define MSGTR_DVDnumAngles "There are %d angles in this DVD title.\n" #define MSGTR_DVDinvalidAngle "Invalid DVD angle number: %d\n" #define MSGTR_DVDnoIFO "Cannot open the IFO file for DVD title %d.\n" +#define MSGTR_DVDnoVMG "Can't open VMG info!\n" #define MSGTR_DVDnoVOBs "Cannot open title VOBS (VTS_%02d_1.VOB).\n" +#define MSGTR_DVDnoMatchingAudio "No matching DVD audio language found!\n" +#define MSGTR_DVDaudioChannel "Selected DVD audio channel: %d language: %c%c\n" +#define MSGTR_DVDnoMatchingSubtitle "No matching DVD subtitle language found!\n" +#define MSGTR_DVDsubtitleChannel "Selected DVD subtitle channel: %d language: %c%c\n" #define MSGTR_DVDopenOk "DVD successfully opened.\n" // muxer_*.c: @@ -539,6 +547,10 @@ #define MSGTR_LeaveTelecineMode "\ndemux_mpg: 30000/1001fps NTSC content detected, switching framerate.\n" #define MSGTR_EnterTelecineMode "\ndemux_mpg: 24000/1001fps progressive NTSC content detected, switching framerate.\n" +#define MSGTR_CacheFill "\rCache fill: %5.2f%% (%d bytes) " +#define MSGTR_NoBindFound "No bind found for key '%s'" +#define MSGTR_FailedToOpen "Failed to open %s\n" + // dec_video.c & dec_audio.c: #define MSGTR_CantOpenCodec "Could not open codec.\n" #define MSGTR_CantCloseCodec "Could not close codec.\n" @@ -564,7 +576,10 @@ #define MSGTR_VideoCodecFamilyNotAvailableStr "Requested video codec family [%s] (vfm=%s) not available.\nEnable it at compilation.\n" #define MSGTR_AudioCodecFamilyNotAvailableStr "Requested audio codec family [%s] (afm=%s) not available.\nEnable it at compilation.\n" #define MSGTR_OpeningVideoDecoder "Opening video decoder: [%s] %s\n" +#define MSGTR_SelectedVideoCodec "Selected video codec: [%s] vfm: %s (%s)\n" #define MSGTR_OpeningAudioDecoder "Opening audio decoder: [%s] %s\n" +#define MSGTR_SelectedAudioCodec "Selected audio codec: [%s] afm: %s (%s)\n" +#define MSGTR_BuildingAudioFilterChain "Building audio filter chain for %dHz/%dch/%s -> %dHz/%dch/%s...\n" #define MSGTR_UninitVideoStr "uninit video: %s\n" #define MSGTR_UninitAudioStr "uninit audio: %s\n" #define MSGTR_VDecoderInitFailed "VDecoder init failed :(\n" @@ -599,6 +614,8 @@ // x11_common.c #define MSGTR_EwmhFullscreenStateFailed "\nX11: Couldn't send EWMH fullscreen Event!\n" +#define MSGTR_CouldNotFindXScreenSaver "xscreensaver_disable: Could not find xscreensaver window.\n" +#define MSGTR_SelectedVideoMode "XF86VM: Selected video mode %dx%d for image size %dx%d.\n" #define MSGTR_InsertingAfVolume "[Mixer] No hardware mixing, inserting volume filter.\n" #define MSGTR_NoVolume "[Mixer] No volume control available.\n" diff -r e8a77a6beb2e -r 8d4fb5469efb input/input.c --- a/input/input.c Tue Oct 18 08:22:27 2005 +0000 +++ b/input/input.c Tue Oct 18 11:11:25 2005 +0000 @@ -21,6 +21,7 @@ #include "../osdep/keycodes.h" #include "../osdep/timer.h" #include "../mp_msg.h" +#include "../help_mp.h" #include "../m_config.h" #include "../m_option.h" @@ -833,7 +834,7 @@ cmd = mp_input_find_bind_for_key(def_cmd_binds,n,keys); if(cmd == NULL) { - mp_msg(MSGT_INPUT,MSGL_WARN,"No bind found for key %s",mp_input_get_key_name(keys[0])); + mp_msg(MSGT_INPUT,MSGL_WARN,MSGTR_NoBindFound,mp_input_get_key_name(keys[0])); if(n > 1) { int s; for(s=1; s < n; s++) diff -r e8a77a6beb2e -r 8d4fb5469efb libmpcodecs/dec_audio.c --- a/libmpcodecs/dec_audio.c Tue Oct 18 08:22:27 2005 +0000 +++ b/libmpcodecs/dec_audio.c Tue Oct 18 11:11:25 2005 +0000 @@ -241,7 +241,7 @@ return 0; // failed } -mp_msg(MSGT_DECAUDIO,MSGL_INFO,"Selected audio codec: [%s] afm:%s (%s)\n", +mp_msg(MSGT_DECAUDIO,MSGL_INFO,MSGTR_SelectedAudioCodec, sh_audio->codec->name,sh_audio->codec->drv,sh_audio->codec->info); return 1; // success } @@ -306,7 +306,7 @@ // filter config: memcpy(&afs->cfg,&af_cfg,sizeof(af_cfg_t)); - mp_msg(MSGT_DECAUDIO, MSGL_INFO, "Building audio filter chain for %dHz/%dch/%s -> %dHz/%dch/%s...\n", + mp_msg(MSGT_DECAUDIO, MSGL_INFO, MSGTR_BuildingAudioFilterChain, afs->input.rate,afs->input.nch,af_fmt2str_short(afs->input.format), afs->output.rate,afs->output.nch,af_fmt2str_short(afs->output.format)); diff -r e8a77a6beb2e -r 8d4fb5469efb libmpcodecs/dec_video.c --- a/libmpcodecs/dec_video.c Tue Oct 18 08:22:27 2005 +0000 +++ b/libmpcodecs/dec_video.c Tue Oct 18 11:11:25 2005 +0000 @@ -297,7 +297,7 @@ return 0; // failed } -mp_msg(MSGT_DECVIDEO,MSGL_INFO,"Selected video codec: [%s] vfm:%s (%s)\n", +mp_msg(MSGT_DECVIDEO,MSGL_INFO,MSGTR_SelectedVideoCodec, sh_video->codec->name,sh_video->codec->drv,sh_video->codec->info); return 1; // success } diff -r e8a77a6beb2e -r 8d4fb5469efb libmpdemux/cache2.c --- a/libmpdemux/cache2.c Tue Oct 18 08:22:27 2005 +0000 +++ b/libmpdemux/cache2.c Tue Oct 18 11:11:25 2005 +0000 @@ -27,6 +27,7 @@ #endif #include "mp_msg.h" +#include "help_mp.h" #include "stream.h" @@ -290,7 +291,7 @@ mp_msg(MSGT_CACHE,MSGL_V,"CACHE_PRE_INIT: %d [%d] %d pre:%d eof:%d \n", s->min_filepos,s->read_filepos,s->max_filepos,min,s->eof); while(s->read_fileposmin_filepos || s->max_filepos-s->read_fileposmax_filepos-s->read_filepos)/(float)(s->buffer_size), s->max_filepos-s->read_filepos ); diff -r e8a77a6beb2e -r 8d4fb5469efb libmpdemux/stream.c --- a/libmpdemux/stream.c Tue Oct 18 08:22:27 2005 +0000 +++ b/libmpdemux/stream.c Tue Oct 18 11:11:25 2005 +0000 @@ -195,7 +195,7 @@ s = open_stream_plugin(sinfo,filename,mode,options,file_format,&r); if(s) return s; if(r != STREAM_UNSUPORTED) { - mp_msg(MSGT_OPEN,MSGL_ERR, "Failed to open %s\n",filename); + mp_msg(MSGT_OPEN,MSGL_ERR, MSGTR_FailedToOpen,filename); return NULL; } break; diff -r e8a77a6beb2e -r 8d4fb5469efb libmpdemux/stream_dvd.c --- a/libmpdemux/stream_dvd.c Tue Oct 18 08:22:27 2005 +0000 +++ b/libmpdemux/stream_dvd.c Tue Oct 18 11:11:25 2005 +0000 @@ -81,26 +81,26 @@ if(*range && isdigit(*range)) { dvd_chapter = strtol(range, &s, 10); if(range == s) { - mp_msg(MSGT_OPEN, MSGL_ERR, "Invalid chapter range specification %s\n", range); + mp_msg(MSGT_OPEN, MSGL_ERR, MSGTR_DVDinvalidChapterRange, range); return M_OPT_INVALID; } } if(*s == 0) return 0; else if(*s != '-') { - mp_msg(MSGT_OPEN, MSGL_ERR, "Invalid chapter range specification %s\n", range); + mp_msg(MSGT_OPEN, MSGL_ERR, MSGTR_DVDinvalidChapterRange, range); return M_OPT_INVALID; } ++s; if(*s == 0) return 0; if(! isdigit(*s)) { - mp_msg(MSGT_OPEN, MSGL_ERR, "Invalid chapter range specification %s\n", range); + mp_msg(MSGT_OPEN, MSGL_ERR, MSGTR_DVDinvalidChapterRange, range); return M_OPT_INVALID; } dvd_last_chapter = strtol(s, &t, 10); if (s == t || *t) { - mp_msg(MSGT_OPEN, MSGL_ERR, "Invalid chapter range specification %s\n", range); + mp_msg(MSGT_OPEN, MSGL_ERR, MSGTR_DVDinvalidChapterRange, range); return M_OPT_INVALID; } return 0; @@ -144,7 +144,7 @@ code=lang[1]|(lang[0]<<8); for(i=0;inr_of_channels;i++) { if(d->audio_streams[i].language==code) { - mp_msg(MSGT_OPEN,MSGL_INFO,"Selected DVD audio channel: %d language: %c%c\n", + mp_msg(MSGT_OPEN,MSGL_INFO,MSGTR_DVDaudioChannel, d->audio_streams[i].id, lang[0],lang[1]); return d->audio_streams[i].id; } @@ -152,7 +152,7 @@ } lang+=2; while (lang[0]==',' || lang[0]==' ') ++lang; } - mp_msg(MSGT_OPEN,MSGL_WARN,"No matching DVD audio language found!\n"); + mp_msg(MSGT_OPEN,MSGL_WARN,MSGTR_DVDnoMatchingAudio); } return -1; } @@ -181,14 +181,14 @@ code=lang[1]|(lang[0]<<8); for(i=0;inr_of_subtitles;i++) { if(d->subtitles[i].language==code) { - mp_msg(MSGT_OPEN,MSGL_INFO,"Selected DVD subtitle channel: %d language: %c%c\n", i, lang[0],lang[1]); + mp_msg(MSGT_OPEN,MSGL_INFO,MSGTR_DVDsubtitleChannel, i, lang[0],lang[1]); return i; } } lang+=2; while (lang[0]==',' || lang[0]==' ') ++lang; } - mp_msg(MSGT_OPEN,MSGL_WARN,"No matching DVD subtitle language found!\n"); + mp_msg(MSGT_OPEN,MSGL_WARN,MSGTR_DVDnoMatchingSubtitle); return -1; } @@ -490,7 +490,7 @@ */ vmg_file = ifoOpen(dvd, 0); if(!vmg_file) { - mp_msg(MSGT_OPEN,MSGL_ERR, "Can't open VMG info!\n"); + mp_msg(MSGT_OPEN,MSGL_ERR, MSGTR_DVDnoVMG); DVDClose( dvd ); m_struct_free(&stream_opts,opts); return STREAM_UNSUPORTED; @@ -561,7 +561,7 @@ } if(dvd_last_chapter>0) { if(dvd_last_chaptertt_srpt->title[dvd_title].nr_of_ptts) { - mp_msg(MSGT_OPEN,MSGL_ERR, "Invalid DVD last chapter number: %d\n", dvd_last_chapter); + mp_msg(MSGT_OPEN,MSGL_ERR, MSGTR_DVDinvalidLastChapter, dvd_last_chapter); ifoClose( vmg_file ); DVDClose( dvd ); m_struct_free(&stream_opts,opts); @@ -776,7 +776,7 @@ return STREAM_OK; } #endif - mp_msg(MSGT_DVD,MSGL_ERR,"MPlayer was compiled without dvd support, exit\n"); + mp_msg(MSGT_DVD,MSGL_ERR,MSGTR_NoDVDSupport); m_struct_free(&stream_opts,opts); return STREAM_UNSUPORTED; } diff -r e8a77a6beb2e -r 8d4fb5469efb libvo/x11_common.c --- a/libvo/x11_common.c Tue Oct 18 08:22:27 2005 +0000 +++ b/libvo/x11_common.c Tue Oct 18 11:11:25 2005 +0000 @@ -1612,8 +1612,7 @@ xs_windowid = find_xscreensaver_window(dpy); if (!xs_windowid) { - mp_msg(MSGT_VO, MSGL_INFO, - "xscreensaver_disable: Could not find xscreensaver window.\n"); + mp_msg(MSGT_VO, MSGL_INFO, MSGTR_CouldNotFindXScreenSaver); return; } mp_msg(MSGT_VO, MSGL_INFO, @@ -1842,8 +1841,7 @@ j = i; } - mp_msg(MSGT_VO, MSGL_INFO, - "XF86VM: Selected video mode %dx%d for image size %dx%d.\n", + mp_msg(MSGT_VO, MSGL_INFO, MSGTR_SelectedVideoMode, *modeline_width, *modeline_height, X, Y); XF86VidModeLockModeSwitch(mDisplay, mScreen, 0); XF86VidModeSwitchToMode(mDisplay, mScreen, vidmodes[j]);