mirror of
https://github.com/mpv-player/mpv
synced 2024-09-28 17:52:52 +02:00
localization of parser-m*cmd.c messages
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21328 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
371f69cf24
commit
c846ef4a98
@ -496,6 +496,15 @@ static char help_text[]=
|
||||
// fifo.c
|
||||
#define MSGTR_CannotMakePipe "Cannot make PIPE!\n"
|
||||
|
||||
// parser-mecmd.c, parser-mpcmd.c
|
||||
#define MSGTR_NoFileGivenOnCommandLine "'--' indicates no more options, but no filename was given on the command line.\n"
|
||||
#define MSGTR_TheLoopOptionMustBeAnInteger "The loop option must be an integer: %s\n"
|
||||
#define MSGTR_UnknownOptionOnCommandLine "Unknown option on the command line: -%s\n"
|
||||
#define MSGTR_ErrorParsingOptionOnCommandLine "Error parsing option on the command line: -%s\n"
|
||||
#define MSGTR_InvalidPlayEntry "Invalid play entry %s\n"
|
||||
#define MSGTR_NotAnMEncoderOption "-%s is not an MEncoder option\n"
|
||||
#define MSGTR_NoFileGiven "No file given\n"
|
||||
|
||||
// m_config.c
|
||||
#define MSGTR_SaveSlotTooOld "Save slot found from lvl %d is too old: %d !!!\n"
|
||||
#define MSGTR_InvalidCfgfileOption "The %s option can't be used in a config file.\n"
|
||||
|
@ -14,6 +14,7 @@
|
||||
#endif
|
||||
|
||||
#include "mp_msg.h"
|
||||
#include "help_mp.h"
|
||||
#include "m_option.h"
|
||||
#include "m_config.h"
|
||||
#include "parser-mecmd.h"
|
||||
@ -77,7 +78,7 @@ m_config_parse_me_command_line(m_config_t *config, int argc, char **argv)
|
||||
no_more_opts = 1;
|
||||
if (i+1 >= argc)
|
||||
{
|
||||
mp_msg(MSGT_CFGPARSER, MSGL_ERR, "'--' indicates no more options, but no filename was given on the command line.\n");
|
||||
mp_msg(MSGT_CFGPARSER, MSGL_ERR, MSGTR_NoFileGivenOnCommandLine);
|
||||
goto err_out;
|
||||
}
|
||||
continue;
|
||||
@ -92,7 +93,7 @@ m_config_parse_me_command_line(m_config_t *config, int argc, char **argv)
|
||||
mp_opt = m_config_get_option(config,opt);
|
||||
if(!mp_opt) {
|
||||
tmp = M_OPT_UNKNOWN;
|
||||
mp_msg(MSGT_CFGPARSER, MSGL_ERR, "-%s is not an MEncoder option\n",opt);
|
||||
mp_msg(MSGT_CFGPARSER, MSGL_ERR, MSGTR_NotAnMEncoderOption, opt);
|
||||
goto err_out;
|
||||
}
|
||||
if(!entry || (mp_opt->flags & M_OPT_GLOBAL)){
|
||||
@ -104,7 +105,7 @@ m_config_parse_me_command_line(m_config_t *config, int argc, char **argv)
|
||||
else
|
||||
if(tmp < 0){
|
||||
// mp_msg(MSGT_CFGPARSER, MSGL_ERR, "m_config_set_option() failed (%d)\n",tmp);
|
||||
mp_msg(MSGT_CFGPARSER, MSGL_FATAL, "Error parsing option on the command line: -%s\n",opt);
|
||||
mp_msg(MSGT_CFGPARSER, MSGL_FATAL, MSGTR_ErrorParsingOptionOnCommandLine, opt);
|
||||
goto err_out;
|
||||
}
|
||||
} else {
|
||||
@ -141,7 +142,7 @@ m_config_parse_me_command_line(m_config_t *config, int argc, char **argv)
|
||||
exit(0);
|
||||
if(nf == 0) {
|
||||
m_entry_list_free(lst);
|
||||
mp_msg(MSGT_CFGPARSER, MSGL_ERR, "No file given\n");
|
||||
mp_msg(MSGT_CFGPARSER, MSGL_ERR, MSGTR_NoFileGiven);
|
||||
return NULL;
|
||||
}
|
||||
return lst;
|
||||
|
@ -14,6 +14,7 @@
|
||||
#endif
|
||||
|
||||
#include "mp_msg.h"
|
||||
#include "help_mp.h"
|
||||
#include "m_option.h"
|
||||
#include "m_config.h"
|
||||
#include "playtree.h"
|
||||
@ -103,7 +104,7 @@ m_config_parse_mp_command_line(m_config_t *config, int argc, char **argv)
|
||||
no_more_opts = 1;
|
||||
if (i+1 >= argc)
|
||||
{
|
||||
mp_msg(MSGT_CFGPARSER, MSGL_ERR, "'--' indicates no more options, but no filename was given on the command line.\n");
|
||||
mp_msg(MSGT_CFGPARSER, MSGL_ERR, MSGTR_NoFileGivenOnCommandLine);
|
||||
goto err_out;
|
||||
}
|
||||
continue;
|
||||
@ -150,7 +151,7 @@ m_config_parse_mp_command_line(m_config_t *config, int argc, char **argv)
|
||||
char* end = NULL;
|
||||
l = (i+1<argc) ? strtol(argv[i+1],&end,0) : 0;
|
||||
if(!end || *end != '\0') {
|
||||
mp_msg(MSGT_CFGPARSER, MSGL_ERR, "The loop option must be an integer: %s\n",argv[i+1]);
|
||||
mp_msg(MSGT_CFGPARSER, MSGL_ERR, MSGTR_TheLoopOptionMustBeAnInteger, argv[i+1]);
|
||||
tmp = ERR_OUT_OF_RANGE;
|
||||
} else {
|
||||
play_tree_t* pt = last_entry ? last_entry : last_parent;
|
||||
@ -196,7 +197,7 @@ m_config_parse_mp_command_line(m_config_t *config, int argc, char **argv)
|
||||
}
|
||||
} else {
|
||||
tmp = M_OPT_UNKNOWN;
|
||||
mp_msg(MSGT_CFGPARSER, MSGL_ERR, "Unknown option on the command line: -%s\n",opt);
|
||||
mp_msg(MSGT_CFGPARSER, MSGL_ERR, MSGTR_UnknownOptionOnCommandLine, opt);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -206,7 +207,7 @@ m_config_parse_mp_command_line(m_config_t *config, int argc, char **argv)
|
||||
tmp = M_OPT_EXIT - tmp;
|
||||
} else
|
||||
if (tmp < 0) {
|
||||
mp_msg(MSGT_CFGPARSER, MSGL_FATAL, "Error parsing option on the command line: -%s\n",opt);
|
||||
mp_msg(MSGT_CFGPARSER, MSGL_FATAL, MSGTR_ErrorParsingOptionOnCommandLine, opt);
|
||||
goto err_out;
|
||||
}
|
||||
i += tmp;
|
||||
@ -241,7 +242,7 @@ m_config_parse_mp_command_line(m_config_t *config, int argc, char **argv)
|
||||
last_entry = entry;
|
||||
}
|
||||
} else {
|
||||
mp_msg(MSGT_CFGPARSER, MSGL_ERR,"Invalid play entry %s\n",argv[i]);
|
||||
mp_msg(MSGT_CFGPARSER, MSGL_ERR, MSGTR_InvalidPlayEntry, argv[i]);
|
||||
}
|
||||
|
||||
} else { // dvd:// or dvd://x entry
|
||||
|
Loading…
Reference in New Issue
Block a user