0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 03:52:22 +02:00

Remove the _ macro

This was a gettext-style macro to mark strings that should be
translated.
This commit is contained in:
wm4 2013-12-18 17:12:07 +01:00
parent 761a013736
commit 4ed83fe2e5
7 changed files with 48 additions and 47 deletions

View File

@ -42,6 +42,8 @@
#include "af.h"
#define _(x) (x)
/* ------------------------------------------------------------------------- */
/* Filter specific data */

View File

@ -609,7 +609,7 @@ int encode_lavc_open_codec(struct encode_lavc_context *ctx, AVStream *stream)
if (ctx->vc->capabilities & CODEC_CAP_EXPERIMENTAL) {
stream->codec->strict_std_compliance = FF_COMPLIANCE_EXPERIMENTAL;
mp_msg(MSGT_ENCODE, MSGL_WARN, _(
mp_msg(MSGT_ENCODE, MSGL_WARN,
"\n\n"
" ********************************************\n"
" **** Experimental VIDEO codec selected! ****\n"
@ -625,7 +625,7 @@ int encode_lavc_open_codec(struct encode_lavc_context *ctx, AVStream *stream)
" Bear with it.\n"
"- Crashes.\n"
" Happens. Try varying options to work around.\n"
"If none of this helps you, try another codec in place of %s.\n\n"),
"If none of this helps you, try another codec in place of %s.\n\n",
ctx->vc->name);
}
@ -645,7 +645,7 @@ int encode_lavc_open_codec(struct encode_lavc_context *ctx, AVStream *stream)
if (ctx->ac->capabilities & CODEC_CAP_EXPERIMENTAL) {
stream->codec->strict_std_compliance = FF_COMPLIANCE_EXPERIMENTAL;
mp_msg(MSGT_ENCODE, MSGL_WARN, _(
mp_msg(MSGT_ENCODE, MSGL_WARN,
"\n\n"
" ********************************************\n"
" **** Experimental AUDIO codec selected! ****\n"
@ -661,7 +661,7 @@ int encode_lavc_open_codec(struct encode_lavc_context *ctx, AVStream *stream)
" Bear with it.\n"
"- Crashes.\n"
" Happens. Try varying options to work around.\n"
"If none of this helps you, try another codec in place of %s.\n\n"),
"If none of this helps you, try another codec in place of %s.\n\n",
ctx->ac->name);
}
ret = avcodec_open2(stream->codec, ctx->ac, &ctx->aoptions);

View File

@ -27,9 +27,6 @@ struct mp_log;
// defined in mplayer.c
extern int verbose;
/* No-op macro to mark translated strings in the sources */
#define _(x) x
// verbosity elevel:
/* Only messages level MSGL_FATAL-MSGL_STATUS should be translated,

View File

@ -2080,52 +2080,52 @@ static struct property_osd_display {
const char *extra_msg;
} property_osd_display[] = {
// general
{ "loop", _("Loop") },
{ "loop", "Loop" },
{ "chapter", .seek_msg = OSD_SEEK_INFO_CHAPTER_TEXT,
.seek_bar = OSD_SEEK_INFO_BAR },
{ "edition", .seek_msg = OSD_SEEK_INFO_EDITION },
{ "pts-association-mode", "PTS association mode" },
{ "hr-seek", "hr-seek" },
{ "speed", _("Speed") },
{ "clock", _("Clock") },
{ "speed", "Speed" },
{ "clock", "Clock" },
// audio
{ "volume", _("Volume"),
{ "volume", "Volume",
.extra_msg = "${?mute==yes:(Muted)}", .osd_progbar = OSD_VOLUME },
{ "mute", _("Mute") },
{ "audio-delay", _("A-V delay") },
{ "audio", _("Audio") },
{ "balance", _("Balance"), .osd_progbar = OSD_BALANCE },
{ "mute", "Mute" },
{ "audio-delay", "A-V delay" },
{ "audio", "Audio" },
{ "balance", "Balance", .osd_progbar = OSD_BALANCE },
// video
{ "panscan", _("Panscan"), .osd_progbar = OSD_PANSCAN },
{ "ontop", _("Stay on top") },
{ "border", _("Border") },
{ "framedrop", _("Framedrop") },
{ "deinterlace", _("Deinterlace") },
{ "colormatrix", _("YUV colormatrix") },
{ "colormatrix-input-range", _("YUV input range") },
{ "colormatrix-output-range", _("RGB output range") },
{ "gamma", _("Gamma"), .osd_progbar = OSD_BRIGHTNESS },
{ "brightness", _("Brightness"), .osd_progbar = OSD_BRIGHTNESS },
{ "contrast", _("Contrast"), .osd_progbar = OSD_CONTRAST },
{ "saturation", _("Saturation"), .osd_progbar = OSD_SATURATION },
{ "hue", _("Hue"), .osd_progbar = OSD_HUE },
{ "angle", _("Angle") },
{ "panscan", "Panscan", .osd_progbar = OSD_PANSCAN },
{ "ontop", "Stay on top" },
{ "border", "Border" },
{ "framedrop", "Framedrop" },
{ "deinterlace", "Deinterlace" },
{ "colormatrix", "YUV colormatrix" },
{ "colormatrix-input-range", "YUV input range" },
{ "colormatrix-output-range", "RGB output range" },
{ "gamma", "Gamma", .osd_progbar = OSD_BRIGHTNESS },
{ "brightness", "Brightness", .osd_progbar = OSD_BRIGHTNESS },
{ "contrast", "Contrast", .osd_progbar = OSD_CONTRAST },
{ "saturation", "Saturation", .osd_progbar = OSD_SATURATION },
{ "hue", "Hue", .osd_progbar = OSD_HUE },
{ "angle", "Angle" },
// subs
{ "sub", _("Subtitles") },
{ "sub-pos", _("Sub position") },
{ "sub-delay", _("Sub delay"), .osd_id = OSD_MSG_SUB_DELAY },
{ "sub-visibility", _("Subtitles") },
{ "sub-forced-only", _("Forced sub only") },
{ "sub-scale", _("Sub Scale")},
{ "ass-vsfilter-aspect-compat", _("Subtitle VSFilter aspect compat")},
{ "ass-style-override", _("ASS subtitle style override")},
{ "vf*", _("Video filters"), .msg = "Video filters:\n${vf}"},
{ "af*", _("Audio filters"), .msg = "Audio filters:\n${af}"},
{ "sub", "Subtitles" },
{ "sub-pos", "Sub position" },
{ "sub-delay", "Sub delay", .osd_id = OSD_MSG_SUB_DELAY },
{ "sub-visibility", "Subtitles" },
{ "sub-forced-only", "Forced sub only" },
{ "sub-scale", "Sub Scale"},
{ "ass-vsfilter-aspect-compat", "Subtitle VSFilter aspect compat"},
{ "ass-style-override", "ASS subtitle style override"},
{ "vf*", "Video filters", .msg = "Video filters:\n${vf}"},
{ "af*", "Audio filters", .msg = "Audio filters:\n${af}"},
#if HAVE_TV
{ "tv-brightness", _("Brightness"), .osd_progbar = OSD_BRIGHTNESS },
{ "tv-hue", _("Hue"), .osd_progbar = OSD_HUE},
{ "tv-saturation", _("Saturation"), .osd_progbar = OSD_SATURATION },
{ "tv-contrast", _("Contrast"), .osd_progbar = OSD_CONTRAST },
{ "tv-brightness", "Brightness", .osd_progbar = OSD_BRIGHTNESS },
{ "tv-hue", "Hue", .osd_progbar = OSD_HUE},
{ "tv-saturation", "Saturation", .osd_progbar = OSD_SATURATION },
{ "tv-contrast", "Contrast", .osd_progbar = OSD_CONTRAST },
#endif
{0}
};

View File

@ -80,7 +80,7 @@
#include <windows.h>
#endif
const char mp_help_text[] = _(
const char mp_help_text[] =
"Usage: mpv [options] [url|path/]filename\n"
"\n"
"Basic options:\n"
@ -92,7 +92,7 @@ const char mp_help_text[] = _(
" --playlist=<file> specify playlist file\n"
"\n"
" --list-options list all mpv options\n"
"\n");
"\n";
void mp_print_version(int always)
{

View File

@ -52,7 +52,7 @@
#define WAKEUP_PERIOD 0.5
static const char av_desync_help_text[] = _(
static const char av_desync_help_text[] =
"\n\n"
" *************************************************\n"
" **** Audio/Video desynchronisation detected! ****\n"
@ -73,7 +73,7 @@ static const char av_desync_help_text[] = _(
"- Try to find out whether audio or video is causing this by experimenting\n"
" with --no-video and --no-audio.\n"
"- If you swiched audio or video tracks, try seeking to force synchronization.\n"
"If none of this helps you, file a bug report.\n\n");
"If none of this helps you, file a bug report.\n\n";
void pause_player(struct MPContext *mpctx)

View File

@ -63,6 +63,8 @@
#endif
#define _(x) (x)
typedef struct radio_channels_s {
int index; ///< channel index in channels list
float freq; ///< frequency in MHz