From 4ed83fe2e5f16b572b5c6a49a82f264d3f80a5e1 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 18 Dec 2013 17:12:07 +0100 Subject: Remove the _ macro This was a gettext-style macro to mark strings that should be translated. --- audio/filter/af_ladspa.c | 2 ++ common/encode_lavc.c | 8 +++--- common/msg.h | 3 -- player/command.c | 72 ++++++++++++++++++++++++------------------------ player/main.c | 4 +-- player/playloop.c | 4 +-- stream/stream_radio.c | 2 ++ 7 files changed, 48 insertions(+), 47 deletions(-) diff --git a/audio/filter/af_ladspa.c b/audio/filter/af_ladspa.c index 2b8066e9a7..881490a513 100644 --- a/audio/filter/af_ladspa.c +++ b/audio/filter/af_ladspa.c @@ -42,6 +42,8 @@ #include "af.h" +#define _(x) (x) + /* ------------------------------------------------------------------------- */ /* Filter specific data */ diff --git a/common/encode_lavc.c b/common/encode_lavc.c index 97a45ccbbe..c061ecaeaf 100644 --- a/common/encode_lavc.c +++ b/common/encode_lavc.c @@ -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); diff --git a/common/msg.h b/common/msg.h index 889d99ae62..7b93d831d8 100644 --- a/common/msg.h +++ b/common/msg.h @@ -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, diff --git a/player/command.c b/player/command.c index 759e349e90..ad486fa33f 100644 --- a/player/command.c +++ b/player/command.c @@ -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} }; diff --git a/player/main.c b/player/main.c index b421f2791a..037ea12d4d 100644 --- a/player/main.c +++ b/player/main.c @@ -80,7 +80,7 @@ #include #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= specify playlist file\n" "\n" " --list-options list all mpv options\n" -"\n"); +"\n"; void mp_print_version(int always) { diff --git a/player/playloop.c b/player/playloop.c index 777d86e974..d373cf1049 100644 --- a/player/playloop.c +++ b/player/playloop.c @@ -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) diff --git a/stream/stream_radio.c b/stream/stream_radio.c index 754b217720..3a954251f0 100644 --- a/stream/stream_radio.c +++ b/stream/stream_radio.c @@ -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 -- cgit v1.2.3