aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar diego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-10-18 11:11:25 +0000
committerGravatar diego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-10-18 11:11:25 +0000
commitf7e307ee4d8600edf82a9a20d28d11453480641f (patch)
tree9babb2e88ef401ede3ac2113f5c35ae8a785cd2b
parentb5d81049e9322963c43852d04edb751ad0ab0d62 (diff)
Make a few more messages translatable by moving them into help_mp-en.h.
patch by Paul TT < paultt == at == hackerjournal == dot == it > git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16794 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--help/help_mp-en.h17
-rw-r--r--input/input.c3
-rw-r--r--libmpcodecs/dec_audio.c4
-rw-r--r--libmpcodecs/dec_video.c2
-rw-r--r--libmpdemux/cache2.c3
-rw-r--r--libmpdemux/stream.c2
-rw-r--r--libmpdemux/stream_dvd.c22
-rw-r--r--libvo/x11_common.c6
8 files changed, 38 insertions, 21 deletions
diff --git a/help/help_mp-en.h b/help/help_mp-en.h
index d9dbc21bb8..d94ea751fb 100644
--- a/help/help_mp-en.h
+++ b/help/help_mp-en.h
@@ -471,15 +471,23 @@ static char help_text[]=
#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 @@ static char help_text[]=
#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 @@ static char help_text[]=
#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 @@ static char help_text[]=
// 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 --git a/input/input.c b/input/input.c
index ba01509b31..372a534134 100644
--- a/input/input.c
+++ b/input/input.c
@@ -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 @@ mp_input_get_cmd_from_keys(int n,int* keys, int paused) {
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 --git a/libmpcodecs/dec_audio.c b/libmpcodecs/dec_audio.c
index 7a1259e4aa..7fb87e1cd4 100644
--- a/libmpcodecs/dec_audio.c
+++ b/libmpcodecs/dec_audio.c
@@ -241,7 +241,7 @@ if(!sh_audio->inited){
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 @@ int init_audio_filters(sh_audio_t *sh_audio,
// 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 --git a/libmpcodecs/dec_video.c b/libmpcodecs/dec_video.c
index be95b8560c..aae96588f1 100644
--- a/libmpcodecs/dec_video.c
+++ b/libmpcodecs/dec_video.c
@@ -297,7 +297,7 @@ if(!sh_video->inited){
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 --git a/libmpdemux/cache2.c b/libmpdemux/cache2.c
index d0822b1205..6449ced6f8 100644
--- a/libmpdemux/cache2.c
+++ b/libmpdemux/cache2.c
@@ -27,6 +27,7 @@ static DWORD WINAPI ThreadProc(void* s);
#endif
#include "mp_msg.h"
+#include "help_mp.h"
#include "stream.h"
@@ -290,7 +291,7 @@ int stream_enable_cache(stream_t *stream,int size,int min,int seek_limit){
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_filepos<s->min_filepos || s->max_filepos-s->read_filepos<min){
- mp_msg(MSGT_CACHE,MSGL_STATUS,"\rCache fill: %5.2f%% (%d bytes) ",
+ mp_msg(MSGT_CACHE,MSGL_STATUS,MSGTR_CacheFill,
100.0*(float)(s->max_filepos-s->read_filepos)/(float)(s->buffer_size),
s->max_filepos-s->read_filepos
);
diff --git a/libmpdemux/stream.c b/libmpdemux/stream.c
index 2f5921302c..05a4607d3b 100644
--- a/libmpdemux/stream.c
+++ b/libmpdemux/stream.c
@@ -195,7 +195,7 @@ stream_t* open_stream_full(char* filename,int mode, char** options, int* file_fo
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 --git a/libmpdemux/stream_dvd.c b/libmpdemux/stream_dvd.c
index 8987f76464..0da08459bc 100644
--- a/libmpdemux/stream_dvd.c
+++ b/libmpdemux/stream_dvd.c
@@ -81,26 +81,26 @@ int dvd_parse_chapter_range(m_option_t *conf, const char *range) {
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 @@ int dvd_aid_from_lang(stream_t *stream, unsigned char* lang) {
code=lang[1]|(lang[0]<<8);
for(i=0;i<d->nr_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 @@ int dvd_aid_from_lang(stream_t *stream, unsigned char* lang) {
}
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 @@ int dvd_sid_from_lang(stream_t *stream, unsigned char* lang) {
code=lang[1]|(lang[0]<<8);
for(i=0;i<d->nr_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 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) {
*/
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 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) {
}
if(dvd_last_chapter>0) {
if(dvd_last_chapter<dvd_chapter || dvd_last_chapter>tt_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 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) {
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 --git a/libvo/x11_common.c b/libvo/x11_common.c
index b251dbc197..3225eff464 100644
--- a/libvo/x11_common.c
+++ b/libvo/x11_common.c
@@ -1612,8 +1612,7 @@ static void xscreensaver_disable(Display * dpy)
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 @@ void vo_vm_switch(uint32_t X, uint32_t Y, int *modeline_width,
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]);