mirror of
https://github.com/mpv-player/mpv
synced 2025-03-31 15:59:34 +00:00
Make help text translatable
Translate help_text and also make all CONF_TYPE_PRINT option output translatable (though no translations exist yet for anything other than the main help text).
This commit is contained in:
parent
74ffb51f33
commit
2569c2e2bc
@ -858,7 +858,7 @@ static int parse_print(const m_option_t* opt,const char *name, char *param, void
|
||||
else if(opt->type == CONF_TYPE_PRINT_FUNC)
|
||||
return ((m_opt_func_full_t) opt->p)(opt,name,param);
|
||||
else
|
||||
mp_msg(MSGT_CFGPARSER, MSGL_INFO, "%s", (char *) opt->p);
|
||||
mp_msg(MSGT_CFGPARSER, MSGL_INFO, "%s", mp_gtext(opt->p));
|
||||
|
||||
if(opt->priv == NULL)
|
||||
return M_OPT_EXIT;
|
||||
|
44
mplayer.c
44
mplayer.c
@ -41,7 +41,6 @@
|
||||
#include "mp_msg.h"
|
||||
#include "av_log.h"
|
||||
|
||||
#define HELP_MP_DEFINE_STATIC
|
||||
#include "help_mp.h"
|
||||
|
||||
#include "m_option.h"
|
||||
@ -160,6 +159,47 @@ static int max_framesize=0;
|
||||
#include "options.h"
|
||||
#include "defaultopts.h"
|
||||
|
||||
static const char help_text[]=_(
|
||||
"Usage: mplayer [options] [url|path/]filename\n"
|
||||
"\n"
|
||||
"Basic options: (complete list in the man page)\n"
|
||||
" -vo <drv> select video output driver ('-vo help' for a list)\n"
|
||||
" -ao <drv> select audio output driver ('-ao help' for a list)\n"
|
||||
#ifdef CONFIG_VCD
|
||||
" vcd://<trackno> play (S)VCD (Super Video CD) track (raw device, no mount)\n"
|
||||
#endif
|
||||
#ifdef CONFIG_DVDREAD
|
||||
" dvd://<titleno> play DVD title from device instead of plain file\n"
|
||||
#endif
|
||||
" -alang/-slang select DVD audio/subtitle language (by 2-char country code)\n"
|
||||
" -ss <position> seek to given (seconds or hh:mm:ss) position\n"
|
||||
" -nosound do not play sound\n"
|
||||
" -fs fullscreen playback (or -vm, -zoom, details in the man page)\n"
|
||||
" -x <x> -y <y> set display resolution (for use with -vm or -zoom)\n"
|
||||
" -sub <file> specify subtitle file to use (also see -subfps, -subdelay)\n"
|
||||
" -playlist <file> specify playlist file\n"
|
||||
" -vid x -aid y select video (x) and audio (y) stream to play\n"
|
||||
" -fps x -srate y change video (x fps) and audio (y Hz) rate\n"
|
||||
" -pp <quality> enable postprocessing filter (details in the man page)\n"
|
||||
" -framedrop enable frame dropping (for slow machines)\n"
|
||||
"\n"
|
||||
"Basic keys: (complete list in the man page, also check input.conf)\n"
|
||||
" <- or -> seek backward/forward 10 seconds\n"
|
||||
" down or up seek backward/forward 1 minute\n"
|
||||
" pgdown or pgup seek backward/forward 10 minutes\n"
|
||||
" < or > step backward/forward in playlist\n"
|
||||
" p or SPACE pause movie (press any key to continue)\n"
|
||||
" q or ESC stop playing and quit program\n"
|
||||
" + or - adjust audio delay by +/- 0.1 second\n"
|
||||
" o cycle OSD mode: none / seekbar / seekbar + timer\n"
|
||||
" * or / increase or decrease PCM volume\n"
|
||||
" x or z adjust subtitle delay by +/- 0.1 second\n"
|
||||
" r or t adjust subtitle position up/down, also see -vf expand\n"
|
||||
"\n"
|
||||
" * * * SEE THE MAN PAGE FOR DETAILS, FURTHER (ADVANCED) OPTIONS AND KEYS * * *\n"
|
||||
"\n");
|
||||
|
||||
|
||||
#define Exit_SIGILL_RTCpuSel _(\
|
||||
"- MPlayer crashed by an 'Illegal Instruction'.\n"\
|
||||
" It may be a bug in our new runtime CPU-detection code...\n"\
|
||||
@ -3140,7 +3180,7 @@ if(!codecs_file || !parse_codec_cfg(codecs_file)){
|
||||
|
||||
if(!mpctx->filename && !player_idle_mode){
|
||||
// no file/vcd/dvd -> show HELP:
|
||||
mp_msg(MSGT_CPLAYER, MSGL_INFO, help_text);
|
||||
mp_msg(MSGT_CPLAYER, MSGL_INFO, "%s", mp_gtext(help_text));
|
||||
exit_player_with_rc(mpctx, EXIT_NONE, 0);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user