Commit 9e7d8f91 authored by Christophe Mutricy's avatar Christophe Mutricy

Translate the channels layout

And not just make it to be translated.
So that it's coherent with the other audio variable fed by the core to the GUI.
parent 7acb1e06
......@@ -187,26 +187,26 @@ static void Probe( aout_instance_t * p_aout,
{
case 1:
val.i_int = AOUT_VAR_MONO;
text.psz_string = (char*)N_("Mono");
text.psz_string = _("Mono");
var_Change( p_aout, "audio-device",
VLC_VAR_ADDCHOICE, &val, &text );
break;
case 2:
val.i_int = AOUT_VAR_STEREO;
text.psz_string = (char*)N_("Stereo");
text.psz_string = _("Stereo");
var_Change( p_aout, "audio-device",
VLC_VAR_ADDCHOICE, &val, &text );
var_Set( p_aout, "audio-device", val );
break;
case 4:
val.i_int = AOUT_VAR_2F2R;
text.psz_string = (char*)N_("2 Front 2 Rear");
text.psz_string = _("2 Front 2 Rear");
var_Change( p_aout, "audio-device",
VLC_VAR_ADDCHOICE, &val, &text );
break;
case 6:
val.i_int = AOUT_VAR_5_1;
text.psz_string = (char*)"5.1";
text.psz_string = "5.1";
var_Change( p_aout, "audio-device",
VLC_VAR_ADDCHOICE, &val, &text );
break;
......
......@@ -433,7 +433,7 @@ static void Probe( aout_instance_t * p_aout )
== VLC_SUCCESS )
{
val.i_int = AOUT_VAR_5_1;
text.psz_string = "5.1";
text.psz_string = (char*) "5.1";
var_Change( p_aout, "audio-device",
VLC_VAR_ADDCHOICE, &val, &text );
var_Change( p_aout, "audio-device", VLC_VAR_SETDEFAULT, &val, NULL );
......@@ -454,7 +454,7 @@ static void Probe( aout_instance_t * p_aout )
== VLC_SUCCESS )
{
val.i_int = AOUT_VAR_7_1;
text.psz_string = "7.1";
text.psz_string = (char*) "7.1";
var_Change( p_aout, "audio-device",
VLC_VAR_ADDCHOICE, &val, &text );
var_Change( p_aout, "audio-device", VLC_VAR_SETDEFAULT, &val, NULL );
......@@ -474,7 +474,7 @@ static void Probe( aout_instance_t * p_aout )
== VLC_SUCCESS )
{
val.i_int = AOUT_VAR_3F2R;
text.psz_string = N_("3 Front 2 Rear");
text.psz_string = _("3 Front 2 Rear");
var_Change( p_aout, "audio-device",
VLC_VAR_ADDCHOICE, &val, &text );
if(!is_default_output_set)
......@@ -497,7 +497,7 @@ static void Probe( aout_instance_t * p_aout )
== VLC_SUCCESS )
{
val.i_int = AOUT_VAR_2F2R;
text.psz_string = N_("2 Front 2 Rear");
text.psz_string = _("2 Front 2 Rear");
var_Change( p_aout, "audio-device",
VLC_VAR_ADDCHOICE, &val, &text );
if(!is_default_output_set)
......@@ -516,7 +516,7 @@ static void Probe( aout_instance_t * p_aout )
== VLC_SUCCESS )
{
val.i_int = AOUT_VAR_STEREO;
text.psz_string = N_("Stereo");
text.psz_string = _("Stereo");
var_Change( p_aout, "audio-device", VLC_VAR_ADDCHOICE, &val, &text );
if(!is_default_output_set)
{
......@@ -534,7 +534,7 @@ static void Probe( aout_instance_t * p_aout )
== VLC_SUCCESS )
{
val.i_int = AOUT_VAR_MONO;
text.psz_string = N_("Mono");
text.psz_string = _("Mono");
var_Change( p_aout, "audio-device", VLC_VAR_ADDCHOICE, &val, &text );
msg_Dbg( p_aout, "device supports 1 channel" );
}
......@@ -590,7 +590,7 @@ static void Probe( aout_instance_t * p_aout )
{
msg_Dbg( p_aout, "device supports A/52 over S/PDIF" );
val.i_int = AOUT_VAR_SPDIF;
text.psz_string = N_("A/52 over S/PDIF");
text.psz_string = _("A/52 over S/PDIF");
var_Change( p_aout, "audio-device",
VLC_VAR_ADDCHOICE, &val, &text );
if( config_GetInt( p_aout, "spdif" ) )
......
......@@ -170,7 +170,7 @@ static void Probe( aout_instance_t * p_aout )
| AOUT_CHAN_LFE)) )
{
val.i_int = AOUT_VAR_5_1;
text.psz_string = "5.1";
text.psz_string = (char*) "5.1";
var_Change( p_aout, "audio-device",
VLC_VAR_ADDCHOICE, &val, &text );
}
......@@ -181,7 +181,7 @@ static void Probe( aout_instance_t * p_aout )
| AOUT_CHAN_REARLEFT | AOUT_CHAN_REARRIGHT)) )
{
val.i_int = AOUT_VAR_2F2R;
text.psz_string = N_("2 Front 2 Rear");
text.psz_string = _("2 Front 2 Rear");
var_Change( p_aout, "audio-device",
VLC_VAR_ADDCHOICE, &val, &text );
}
......@@ -205,7 +205,7 @@ static void Probe( aout_instance_t * p_aout )
&& i_nb_channels == 2 )
{
val.i_int = AOUT_VAR_STEREO;
text.psz_string = N_("Stereo");
text.psz_string = _("Stereo");
var_Change( p_aout, "audio-device", VLC_VAR_ADDCHOICE, &val, &text );
}
......@@ -225,7 +225,7 @@ static void Probe( aout_instance_t * p_aout )
&& i_nb_channels == 1 )
{
val.i_int = AOUT_VAR_MONO;
text.psz_string = N_("Mono");
text.psz_string = _("Mono");
var_Change( p_aout, "audio-device", VLC_VAR_ADDCHOICE, &val, &text );
if ( p_aout->output.output.i_physical_channels == AOUT_CHAN_CENTER )
{
......@@ -249,7 +249,7 @@ static void Probe( aout_instance_t * p_aout )
&& i_format == AFMT_AC3 )
{
val.i_int = AOUT_VAR_SPDIF;
text.psz_string = N_("A/52 over S/PDIF");
text.psz_string = _("A/52 over S/PDIF");
var_Change( p_aout, "audio-device",
VLC_VAR_ADDCHOICE, &val, &text );
if( config_GetInt( p_aout, "spdif" ) )
......
......@@ -392,7 +392,7 @@ static int PAOpenDevice( aout_instance_t *p_aout )
if( p_sys->deviceInfo->maxOutputChannels >= 1 )
{
val.i_int = AOUT_VAR_MONO;
text.psz_string = N_("Mono");
text.psz_string = _("Mono");
var_Change( p_aout, "audio-device", VLC_VAR_ADDCHOICE,
&val, &text );
msg_Dbg( p_aout, "device supports 1 channel" );
......@@ -400,7 +400,7 @@ static int PAOpenDevice( aout_instance_t *p_aout )
if( p_sys->deviceInfo->maxOutputChannels >= 2 )
{
val.i_int = AOUT_VAR_STEREO;
text.psz_string = N_("Stereo");
text.psz_string = _("Stereo");
var_Change( p_aout, "audio-device", VLC_VAR_ADDCHOICE,
&val, &text );
var_Change( p_aout, "audio-device", VLC_VAR_SETDEFAULT,
......@@ -411,7 +411,7 @@ static int PAOpenDevice( aout_instance_t *p_aout )
if( p_sys->deviceInfo->maxOutputChannels >= 4 )
{
val.i_int = AOUT_VAR_2F2R;
text.psz_string = N_("2 Front 2 Rear");
text.psz_string = _("2 Front 2 Rear");
var_Change( p_aout, "audio-device", VLC_VAR_ADDCHOICE,
&val, &text );
msg_Dbg( p_aout, "device supports 4 channels" );
......@@ -419,7 +419,7 @@ static int PAOpenDevice( aout_instance_t *p_aout )
if( p_sys->deviceInfo->maxOutputChannels >= 5 )
{
val.i_int = AOUT_VAR_3F2R;
text.psz_string = N_("3 Front 2 Rear");
text.psz_string = _("3 Front 2 Rear");
var_Change( p_aout, "audio-device",
VLC_VAR_ADDCHOICE, &val, &text );
msg_Dbg( p_aout, "device supports 5 channels" );
......
......@@ -181,8 +181,8 @@ static int Open ( vlc_object_t *p_this )
val.i_int = (obtained.channels == 2) ? AOUT_VAR_STEREO :
AOUT_VAR_MONO;
text.psz_string = (obtained.channels == 2) ? N_("Stereo") :
N_("Mono");
text.psz_string = (obtained.channels == 2) ? _("Stereo") :
_("Mono");
var_Change( p_aout, "audio-device",
VLC_VAR_ADDCHOICE, &val, &text );
var_AddCallback( p_aout, "audio-device", aout_ChannelsRestart,
......@@ -198,10 +198,10 @@ static int Open ( vlc_object_t *p_this )
var_Change( p_aout, "audio-device", VLC_VAR_SETTEXT, &text, NULL );
val.i_int = AOUT_VAR_STEREO;
text.psz_string = N_("Stereo");
text.psz_string = _("Stereo");
var_Change( p_aout, "audio-device", VLC_VAR_ADDCHOICE, &val, &text );
val.i_int = AOUT_VAR_MONO;
text.psz_string = N_("Mono");
text.psz_string = _("Mono");
var_Change( p_aout, "audio-device", VLC_VAR_ADDCHOICE, &val, &text );
if ( i_nb_channels == 2 )
{
......
......@@ -478,7 +478,7 @@ static void Probe( aout_instance_t * p_aout )
== VLC_SUCCESS )
{
val.i_int = AOUT_VAR_5_1;
text.psz_string = (char *)N_("5.1");
text.psz_string = (char *)_("5.1");
var_Change( p_aout, "audio-device",
VLC_VAR_ADDCHOICE, &val, &text );
msg_Dbg( p_aout, "device supports 5.1 channels" );
......@@ -499,7 +499,7 @@ static void Probe( aout_instance_t * p_aout )
== VLC_SUCCESS )
{
val.i_int = AOUT_VAR_2F2R;
text.psz_string = (char *)N_("2 Front 2 Rear");
text.psz_string = (char *)_("2 Front 2 Rear");
var_Change( p_aout, "audio-device",
VLC_VAR_ADDCHOICE, &val, &text );
msg_Dbg( p_aout, "device supports 4 channels" );
......@@ -516,7 +516,7 @@ static void Probe( aout_instance_t * p_aout )
== VLC_SUCCESS )
{
val.i_int = AOUT_VAR_STEREO;
text.psz_string = (char *)N_("Stereo");
text.psz_string = (char *)_("Stereo");
var_Change( p_aout, "audio-device", VLC_VAR_ADDCHOICE, &val, &text );
msg_Dbg( p_aout, "device supports 2 channels" );
}
......@@ -531,7 +531,7 @@ static void Probe( aout_instance_t * p_aout )
== VLC_SUCCESS )
{
val.i_int = AOUT_VAR_MONO;
text.psz_string = (char *)N_("Mono");
text.psz_string = (char *)_("Mono");
var_Change( p_aout, "audio-device", VLC_VAR_ADDCHOICE, &val, &text );
msg_Dbg( p_aout, "device supports 1 channel" );
}
......@@ -549,7 +549,7 @@ static void Probe( aout_instance_t * p_aout )
{
msg_Dbg( p_aout, "device supports A/52 over S/PDIF" );
val.i_int = AOUT_VAR_SPDIF;
text.psz_string = (char *)N_("A/52 over S/PDIF");
text.psz_string = (char *)_("A/52 over S/PDIF");
var_Change( p_aout, "audio-device",
VLC_VAR_ADDCHOICE, &val, &text );
if( config_GetInt( p_aout, "spdif" ) )
......
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