Commit f0ffeb17 authored by Clément Stenac's avatar Clément Stenac

Strings review in misc/ except dummy and win32text (Refs:#438)

parent 04cfc6a3
......@@ -81,28 +81,35 @@ static int SetFontSize( filter_t *, int );
* Module descriptor
*****************************************************************************/
#define FONT_TEXT N_("Font")
#define FONT_LONGTEXT N_("Font filename")
#define FONT_LONGTEXT N_("Filename for the font you want to use")
#define FONTSIZE_TEXT N_("Font size in pixels")
#define FONTSIZE_LONGTEXT N_("The size of the fonts used by the osd module. " \
#define FONTSIZE_LONGTEXT N_("This is the default size of the fonts " \
"that will be rendered on the video. " \
"If set to something different than 0 this option will override the " \
"relative font size " )
#define OPACITY_TEXT N_("Opacity, 0..255")
#define OPACITY_LONGTEXT N_("The opacity (inverse of transparency) of " \
"overlay text. 0 = transparent, 255 = totally opaque. " )
#define COLOR_TEXT N_("Text Default Color")
#define COLOR_LONGTEXT N_("The color of overlay text. 1 byte for each color, "\
"hexadecimal. #000000 = all colors off, 0xFF0000 = just Red, " \
"0xFFFFFF = all color on [White]" )
#define FONTSIZER_TEXT N_("Font size")
#define FONTSIZER_LONGTEXT N_("The size of the fonts used by the osd module" )
"relative font size. " )
#define OPACITY_TEXT N_("Opacity")
#define OPACITY_LONGTEXT N_("The opacity (inverse of transparency) of the " \
"text that will be rendered on the video. 0 = transparent, " \
"255 = totally opaque. " )
#define COLOR_TEXT N_("Text default color")
#define COLOR_LONGTEXT N_("The color of the text that will be rendered on "\
"the video. This must be an hexadecimal (like HTML colors). The first two "\
"chars are for red, then green, then blue. #000000 = black, #FF0000 = red,"\
" #00FF00 = green, #FFFF00 = yellow (red + green), #FFFFFF = white" )
#define FONTSIZER_TEXT N_("Relative font size")
#define FONTSIZER_LONGTEXT N_("This is the relative default size of the " \
"fonts that will be rendered on the video. If absolute font size is set, "\
"relative size will be overriden." )
static int pi_sizes[] = { 20, 18, 16, 12, 6 };
static char *ppsz_sizes_text[] = { N_("Smaller"), N_("Small"), N_("Normal"),
N_("Large"), N_("Larger") };
#define YUVP_TEXT N_("Use yuvp renderer")
#define YUVP_LONGTEXT N_("Render into paletized YUV. Needed to encode into dvbsubs")
#define YUVP_TEXT N_("Use YUVP renderer")
#define YUVP_LONGTEXT N_("This renders the font using \"paletized YUV\". " \
"This option is only needed if you want to encode into DVB subtitles" )
#define EFFECT_TEXT N_("Font Effect")
#define EFFECT_LONGTEXT N_("Select effects to apply to rendered text")
#define EFFECT_LONGTEXT N_("It is possible to apply effects to the rendered" \
"text to improve rendering." )
#define EFFECT_BACKGROUND 1
#define EFFECT_OUTLINE 2
......@@ -279,7 +286,7 @@ static int Create( vlc_object_t *p_this )
i_error = FT_Select_Charmap( p_sys->p_face, ft_encoding_unicode );
if( i_error )
{
msg_Err( p_filter, "Font has no unicode translation table" );
msg_Err( p_filter, "font has no unicode translation table" );
goto error;
}
......@@ -873,13 +880,15 @@ static int RenderText( filter_t *p_filter, subpicture_region_t *p_region_out,
i_error = FT_Load_Glyph( face, i_glyph_index, FT_LOAD_DEFAULT );
if( i_error )
{
msg_Err( p_filter, "FT_Load_Glyph returned %d", i_error );
msg_Err( p_filter, "Unable to render text (FT_Load_Glyph returned"
" %d", i_error );
goto error;
}
i_error = FT_Get_Glyph( glyph, &tmp_glyph );
if( i_error )
{
msg_Err( p_filter, "FT_Get_Glyph returned %d", i_error );
msg_Err( p_filter, "Unable to render text (FT_Get_Glyph returned "
%d", i_error );
goto error;
}
FT_Glyph_Get_CBox( tmp_glyph, ft_glyph_bbox_pixels, &glyph_size );
......
......@@ -66,27 +66,29 @@ static void Close( vlc_object_t * );
#define DH_BITS_TEXT N_("Diffie-Hellman prime bits")
#define DH_BITS_LONGTEXT N_( \
"Allows you to modify the Diffie-Hellman prime's number of bits " \
"(used for TLS or SSL-based server-side encryption)." )
"This allows you to modify the Diffie-Hellman prime's number of bits, " \
"used for TLS or SSL-based server-side encryption. This is generally " \
"not needed." )
#define CACHE_EXPIRATION_TEXT N_("Expiration time for resumed TLS sessions")
#define CACHE_EXPIRATION_LONGTEXT N_( \
"Defines the delay before resumed TLS sessions will be expired " \
"(in seconds)." )
"It is possible to cache the resumed TLS sessions. This is the expiration "\
"time of the sessions stored in this cache, in seconds." )
#define CACHE_SIZE_TEXT N_("Number of resumed TLS sessions")
#define CACHE_SIZE_LONGTEXT N_( \
"Allows you to modify the maximum number of resumed TLS sessions that " \
"This is the maximum number of resumed TLS sessions that " \
"the cache will hold." )
#define CHECK_CERT_TEXT N_("Check TLS/SSL server certificate validity")
#define CHECK_CERT_LONGTEXT N_( \
"Ensures that server certificate is valid " \
"(i.e. signed by an approved Certificate Authority)." )
"This ensures that the server certificate is valid " \
"(i.e. signed by an approved Certification Authority)." )
#define CHECK_HOSTNAME_TEXT N_("Check TLS/SSL server hostname in certificate")
#define CHECK_HOSTNAME_LONGTEXT N_( \
"Ensures that server hostname in certificate match requested host name." )
"This ensures that the server hostname in certificate matches the " \
"requested host name." )
vlc_module_begin();
set_shortname( "GnuTLS" );
......
......@@ -58,14 +58,13 @@ static int CheckAndSend( vlc_object_t *p_this, uint8_t* p_data, int i_offset );
*****************************************************************************/
#define SERVER_DEFAULT "127.0.0.1"
#define SERVER_TEXT N_("Growl server")
#define SERVER_LONGTEXT N_("Growl server receiving notifications.")
#define SERVER_LONGTEXT N_("This is the host to which Growl notifications " \
"will be sent. By default, notifications are sent locally." )
#define PASS_DEFAULT ""
#define PASS_TEXT N_("Growl password")
#define PASS_LONGTEXT N_("Growl password on the server.")
#define PORT_TEXT N_("Growl UDP port")
#define PORT_LONGTEXT N_("Growl UPD port on the server.")
#define TTL_TEXT N_("Growl TTL")
#define TTL_LONGTEXT N_("Growl TTL.")
#define PORT_LONGTEXT N_("Growl UDP port on the server.")
vlc_module_begin();
set_category( CAT_INTERFACE );
......@@ -79,8 +78,6 @@ vlc_module_begin();
PASS_TEXT, PASS_LONGTEXT, VLC_FALSE );
add_integer( "growl-port", 9887, NULL,
PORT_TEXT, PORT_LONGTEXT, VLC_TRUE );
add_integer( "growl-ttl", 12, NULL,
TTL_TEXT, TTL_LONGTEXT, VLC_TRUE );
set_capability( "interface", 0 );
set_callbacks( Open, Close );
......@@ -281,7 +278,6 @@ static int CheckAndSend( vlc_object_t *p_this, uint8_t* p_data, int i_offset )
char *psz_password = config_GetPsz( p_intf, "growl-password" );
char *psz_server = config_GetPsz( p_intf, "growl-server" );
int i_port = config_GetInt( p_intf, "growl-port" );
int i_ttl = config_GetInt( p_intf, "growl-ttl" );
strcpy( (char*)(p_data+i_offset), psz_password );
i = i_offset + strlen(psz_password);
......@@ -298,7 +294,7 @@ static int CheckAndSend( vlc_object_t *p_this, uint8_t* p_data, int i_offset )
p_data[i_offset++] = (md5.p_digest[i]>>24)&0xFF;
}
i_handle = net_ConnectUDP( p_this, psz_server, i_port, i_ttl );
i_handle = net_ConnectUDP( p_this, psz_server, i_port, 0 );
if( i_handle == -1 )
{
msg_Err( p_this, "failed to open a connection (udp)" );
......
......@@ -117,9 +117,12 @@ static char *mode_list_text[] = { N_("Text"), "HTML"
#define LOGMODE_TEXT N_("Log format")
#ifdef HAVE_SYSLOG_H
#define LOGMODE_LONGTEXT N_("Specify the log format. Available choices are \"text\" (default), \"html\", and \"syslog\".")
#define LOGMODE_LONGTEXT N_("Specify the log format. Available choices are " \
"\"text\" (default), \"html\", and \"syslog\" (special mode to send to " \
"syslog instead of file.")
#else
#define LOGMODE_LONGTEXT N_("Specify the log format. Available choices are \"text\" (default) and \"html\".")
#define LOGMODE_LONGTEXT N_("Specify the log format. Available choices are " \
\"text\" (default) and \"html\".")
#endif
vlc_module_begin();
......@@ -180,7 +183,7 @@ static int Open( vlc_object_t *p_this )
#endif
else
{
msg_Err( p_intf, "invalid log mode `%s', using `text'", psz_mode );
msg_Warn( p_intf, "invalid log mode `%s', using `text'", psz_mode );
p_intf->p_sys->i_mode = MODE_TEXT;
}
......@@ -202,7 +205,7 @@ static int Open( vlc_object_t *p_this )
if( !psz_homedir )
{
msg_Err( p_this, "psz_homedir is null" );
msg_Err( p_this, "Unable to find home directory" );
return -1;
}
psz_file = (char *)malloc( sizeof("/" LOG_DIR "/" LOG_FILE_HTML) +
......
......@@ -61,14 +61,14 @@ static int SendToMSN( char * psz_msg );
*****************************************************************************/
#define FORMAT_DEFAULT "{0} - {1}"
#define FORMAT_TEXT N_("MSN Title format string")
#define FORMAT_LONGTEXT N_("MSN Title format string. " \
"{0} artist, {1} title, {2} album")
#define FORMAT_LONGTEXT N_("Format of the string to send to MSN " \
"{0} Artist, {1} Title, {2} Album. Defaults to \"Artist - Title\" ({0} - {1}).")
vlc_module_begin();
set_category( CAT_INTERFACE );
set_subcategory( SUBCAT_INTERFACE_CONTROL );
set_shortname( N_( "MSN" ) );
set_description( _("MSN Title Plugin") );
set_description( _("MSN Now-Playing") );
add_string( "msn-format", FORMAT_DEFAULT, NULL,
FORMAT_TEXT, FORMAT_LONGTEXT, VLC_FALSE );
......
......@@ -45,15 +45,16 @@
static int Open ( vlc_object_t * );
static void Close( vlc_object_t * );
#define HOST_TEXT N_( "Host address" )
#define HOST_TEXT N_( "RTSP host address" )
#define HOST_LONGTEXT N_( \
"You can set the address, port and path the rtsp interface will bind to." \
"\nSyntax is address:port/path. Default is to bind to any address "\
"on port 554, with no path." )
"This defines the address, port and path the RTSP VOD server will listen " \
"on.\nSyntax is address:port/path. The default is to listen on all "\
"interfaces (address 0.0.0.0), on port 554, with no path.\n To listen " \
"only on the local interface, use \"localhost\" as address." )
#define THROTLE_TEXT N_( "Maximum number of connections" )
#define THROTLE_LONGTEXT N_( "Limit the number of connections " \
"to a maximum. (0 = unlimited, N = maximum clients)" )
#define THROTLE_LONGTEXT N_( "This limits the maximum number of clients " \
"that can connect to the RTSP VOD. 0 means no limit." )
vlc_module_begin();
set_shortname( _("RTSP VoD" ) );
......@@ -64,7 +65,8 @@ vlc_module_begin();
set_callbacks( Open, Close );
add_shortcut( "rtsp" );
add_string ( "rtsp-host", NULL, NULL, HOST_TEXT, HOST_LONGTEXT, VLC_TRUE );
add_integer( "rtsp-throtle-users", 0, NULL, THROTLE_TEXT, THROTLE_LONGTEXT, VLC_TRUE );
add_integer( "rtsp-throttle-users", 0, NULL, THROTLE_TEXT,
THROTLE_LONGTEXT, VLC_TRUE );
vlc_module_end();
/*****************************************************************************
......@@ -160,7 +162,7 @@ struct vod_sys_t
httpd_host_t *p_rtsp_host;
char *psz_path;
int i_port;
int i_throtle_users;
int i_throttle_users;
int i_connections;
/* List of media */
......@@ -217,16 +219,16 @@ static int Open( vlc_object_t *p_this )
if( !p_sys ) goto error;
p_sys->p_rtsp_host = 0;
var_Create( p_this, "rtsp-throtle-users", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
p_sys->i_throtle_users = var_GetInteger( p_this, "rtsp-throtle-users" );
msg_Dbg( p_this, "Allowing up to %d connections", p_sys->i_throtle_users );
var_Create( p_this, "rtsp-throttle-users", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
p_sys->i_throttle_users = var_GetInteger( p_this, "rtsp-throtle-users" );
msg_Dbg( p_this, "allowing up to %d connections", p_sys->i_throttle_users );
p_sys->i_connections = 0;
p_sys->p_rtsp_host =
httpd_HostNew( VLC_OBJECT(p_vod), url.psz_host, url.i_port );
if( !p_sys->p_rtsp_host )
{
msg_Err( p_vod, "cannot create http server (%s:%i)",
msg_Err( p_vod, "cannot create RTSP server (%s:%i)",
url.psz_host, url.i_port );
goto error;
}
......@@ -262,7 +264,7 @@ static void Close( vlc_object_t * p_this )
vod_sys_t *p_sys = p_vod->p_sys;
httpd_HostDelete( p_sys->p_rtsp_host );
var_Destroy( p_this, "rtsp-throtle-users" );
var_Destroy( p_this, "rtsp-throttle-users" );
/* TODO delete medias */
free( p_sys->psz_path );
......@@ -298,13 +300,13 @@ static vod_media_t *MediaNew( vod_t *p_vod, const char *psz_name,
if( !p_media->p_rtsp_url )
{
msg_Err( p_vod, "cannot create http url (%s)", p_media->psz_rtsp_path);
msg_Err( p_vod, "cannot create RTSP url (%s)", p_media->psz_rtsp_path);
free( p_media->psz_rtsp_path );
free( p_media );
return NULL;
}
msg_Dbg( p_vod, "created rtsp url: %s", p_media->psz_rtsp_path );
msg_Dbg( p_vod, "created RTSP url: %s", p_media->psz_rtsp_path );
asprintf( &p_media->psz_rtsp_control_v4,
"a=control:rtsp://%%s:%d%s/trackID=%%d\r\n",
......@@ -497,7 +499,7 @@ static int MediaAddES( vod_t *p_vod, vod_media_t *p_media, es_format_t *p_fmt )
if( !p_es->p_rtsp_url )
{
msg_Err( p_vod, "cannot create http url (%s)", psz_urlc );
msg_Err( p_vod, "cannot create RTSP url (%s)", psz_urlc );
free( psz_urlc );
free( p_es );
return VLC_EGENERIC;
......@@ -601,7 +603,7 @@ static rtsp_client_t *RtspClientNew( vod_media_t *p_media, char *psz_session )
p_media->p_vod->p_sys->i_connections++;
msg_Dbg( p_media->p_vod, "new session: %s, connections: %d",
psz_session, p_media->p_vod->p_sys->i_throtle_users );
psz_session, p_media->p_vod->p_sys->i_throttle_users );
return p_rtsp;
}
......@@ -625,7 +627,7 @@ static void RtspClientDel( vod_media_t *p_media, rtsp_client_t *p_rtsp )
{
p_media->p_vod->p_sys->i_connections--;
msg_Dbg( p_media->p_vod, "closing session: %s, connections: %d",
p_rtsp->psz_session, p_media->p_vod->p_sys->i_throtle_users );
p_rtsp->psz_session, p_media->p_vod->p_sys->i_throttle_users );
while( p_rtsp->i_es-- )
{
......@@ -699,8 +701,8 @@ static int RtspCallback( httpd_callback_sys_t *p_args, httpd_client_t *cl,
psz_session = httpd_MsgGet( query, "Session" );
if( !psz_session || !*psz_session )
{
if( ( p_vod->p_sys->i_throtle_users > 0 ) &&
( p_vod->p_sys->i_connections >= p_vod->p_sys->i_throtle_users ) )
if( ( p_vod->p_sys->i_throttle_users > 0 ) &&
( p_vod->p_sys->i_connections >= p_vod->p_sys->i_throttle_users ) )
{
answer->i_status = 503;
answer->psz_status = strdup( "Too many connections" );
......@@ -956,8 +958,8 @@ static int RtspCallbackES( httpd_callback_sys_t *p_args, httpd_client_t *cl,
psz_session = httpd_MsgGet( query, "Session" );
if( !psz_session || !*psz_session )
{
if( ( p_vod->p_sys->i_throtle_users > 0 ) &&
( p_vod->p_sys->i_connections >= p_vod->p_sys->i_throtle_users ) )
if( ( p_vod->p_sys->i_throttle_users > 0 ) &&
( p_vod->p_sys->i_connections >= p_vod->p_sys->i_throttle_users ) )
{
answer->i_status = 503;
answer->psz_status = strdup( "Too many connections" );
......
......@@ -62,7 +62,8 @@ static int RenderText( filter_t *p_filter, subpicture_region_t *p_region_out,
*****************************************************************************/
#define TEMPLATE_TEXT N_( "SVG template file" )
#define TEMPLATE_LONGTEXT N_( "Location of a file holding a SVG template for automatic string conversion" )
#define TEMPLATE_LONGTEXT N_( "Location of a file holding a SVG template "\
"for automatic string conversion" )
vlc_module_begin();
set_category( CAT_INPUT);
......@@ -125,7 +126,7 @@ static int Create( vlc_object_t *p_this )
p_sys = malloc( sizeof( filter_sys_t ) );
if( !p_sys )
{
msg_Err( p_filter, "Out of memory" );
msg_Err( p_filter, "out of memory" );
return VLC_ENOMEM;
}
......@@ -133,7 +134,7 @@ static int Create( vlc_object_t *p_this )
p_sys->psz_template = svg_GetTemplate( p_this );
if( !p_sys->psz_template )
{
msg_Err( p_filter, "Out of memory" );
msg_Err( p_filter, "out of memory" );
return VLC_ENOMEM;
}
......@@ -168,7 +169,8 @@ static char *svg_GetTemplate( vlc_object_t *p_this )
file = utf8_fopen( psz_filename, "rt" );
if( !file )
{
msg_Warn( p_this, "SVG template file %s does not exist.", psz_filename );
msg_Warn( p_this, "SVG template file %s does not exist.",
psz_filename );
psz_template = NULL;
}
else
......@@ -197,7 +199,7 @@ static char *svg_GetTemplate( vlc_object_t *p_this )
psz_template = malloc( s.st_size + 42 );
if( !psz_template )
{
msg_Err( p_filter, "Out of memory" );
msg_Err( p_filter, "out of memory" );
return NULL;
}
memset( psz_template, 0, s.st_size + 1 );
......@@ -400,7 +402,7 @@ static void svg_RenderPicture( filter_t *p_filter,
&error );
if( error != NULL )
{
msg_Err( p_filter, "Error in handle_write: %s\n", error->message );
msg_Err( p_filter, "error while rendering SVG: %s\n", error->message );
return;
}
rsvg_handle_close( p_handle, &error );
......@@ -425,7 +427,7 @@ static int RenderText( filter_t *p_filter, subpicture_region_t *p_region_out,
p_svg = ( svg_rendition_t * )malloc( sizeof( svg_rendition_t ) );
if( !p_svg )
{
msg_Err( p_filter, "Out of memory" );
msg_Err( p_filter, "out of memory" );
return VLC_ENOMEM;
}
......@@ -440,7 +442,7 @@ static int RenderText( filter_t *p_filter, subpicture_region_t *p_region_out,
p_svg->psz_text = strdup( psz_string );
if( !p_svg->psz_text )
{
msg_Err( p_filter, "Out of memory" );
msg_Err( p_filter, "out of memory" );
free( p_svg );
return VLC_ENOMEM;
}
......@@ -454,7 +456,7 @@ static int RenderText( filter_t *p_filter, subpicture_region_t *p_region_out,
p_svg->psz_text = malloc( length + 1 );
if( !p_svg->psz_text )
{
msg_Err( p_filter, "Out of memory" );
msg_Err( p_filter, "out of memory" );
free( p_svg );
return VLC_ENOMEM;
}
......
......@@ -38,8 +38,6 @@ static int Open ( vlc_object_t * );
static void Close( vlc_object_t * );
vlc_module_begin();
set_category( CAT_ADVANCED );
set_subcategory( SUBCAT_ADVANCED_XML );
set_description( _("XML Parser (using libxml2)") );
set_capability( "xml", 10 );
set_callbacks( Open, Close );
......
......@@ -85,8 +85,6 @@ static int Open ( vlc_object_t * );
static void Close( vlc_object_t * );
vlc_module_begin();
set_category( CAT_ADVANCED );
set_subcategory( SUBCAT_ADVANCED_XML );
set_description( _("Simple XML Parser") );
set_capability( "xml", 5 );
set_callbacks( Open, Close );
......@@ -172,7 +170,7 @@ static xml_reader_t *ReaderCreate( xml_t *p_xml, stream_t *s )
/* Open and read file */
p_buffer = malloc( i_buffer );
if( p_buffer == NULL ) {
msg_Err( p_xml, "ENOMEM: alloc buffer" );
msg_Err( p_xml, "out of memory" );
return NULL;
}
......@@ -182,7 +180,7 @@ static xml_reader_t *ReaderCreate( xml_t *p_xml, stream_t *s )
i_buffer += i_size;
p_new = realloc( p_buffer, i_buffer );
if (!p_new) {
msg_Err( p_xml, "ENOMEM: realloc buffer" );
msg_Err( p_xml, "out of memory" );
free( p_buffer );
return NULL;
}
......@@ -192,7 +190,7 @@ static xml_reader_t *ReaderCreate( xml_t *p_xml, stream_t *s )
if( i_pos + i_size == 0 )
{
msg_Dbg( p_xml, "empty xml" );
msg_Dbg( p_xml, "empty XML" );
free( p_buffer );
return 0;
}
......@@ -200,7 +198,7 @@ static xml_reader_t *ReaderCreate( xml_t *p_xml, stream_t *s )
p_root = xtag_new_parse( p_buffer, i_buffer );
if( !p_root )
{
msg_Warn( p_xml, "couldn't parse xml" );
msg_Warn( p_xml, "couldn't parse XML" );
free( p_buffer );
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment