Make the Simulator error strings translatable

This commit is contained in:
Marco Ciampa 2018-05-28 11:24:20 +02:00 committed by Maciej Suminski
parent da66005254
commit 2cb65f9c19
2 changed files with 6 additions and 6 deletions

View File

@ -96,7 +96,7 @@ bool DIALOG_SIM_SETTINGS::TransferDataFromWindow()
// At least one source has to be enabled
if( !m_dcEnable1->IsChecked() && !m_dcEnable2->IsChecked() )
{
DisplayError( this, wxT( "You need to enable at least one source" ) );
DisplayError( this, _( "You need to enable at least one source" ) );
return false;
}
@ -106,7 +106,7 @@ bool DIALOG_SIM_SETTINGS::TransferDataFromWindow()
{
if( empty( m_dcSource1 ) )
{
DisplayError( this, wxT( "You need to select DC source (sweep 1)" ) );
DisplayError( this, _( "You need to select DC source (sweep 1)" ) );
return false;
}
@ -136,7 +136,7 @@ bool DIALOG_SIM_SETTINGS::TransferDataFromWindow()
{
if( empty( m_dcSource2 ) )
{
DisplayError( this, wxT( "You need to select DC source (sweep 2)" ) );
DisplayError( this, _( "You need to select DC source (sweep 2)" ) );
return false;
}

View File

@ -37,12 +37,12 @@ SPICE_VALUE::SPICE_VALUE( const wxString& aString )
char buf[8] = { 0, };
if( aString.IsEmpty() )
throw std::invalid_argument( "Spice value cannot be empty" );
throw std::invalid_argument( _( "Spice value cannot be empty" ) );
LOCALE_IO dummy; // All numeric values should be in "C" locale(decimal separator = .)
if( sscanf( (const char*) aString.c_str(), "%lf%7s", &m_base, buf ) == 0 )
throw std::invalid_argument( "Invalid Spice value string" );
throw std::invalid_argument( _( "Invalid Spice value string" ) );
if( *buf == 0 )
{
@ -75,7 +75,7 @@ SPICE_VALUE::SPICE_VALUE( const wxString& aString )
case 't': m_prefix = PFX_TERA; break;
default:
throw std::invalid_argument( "Invalid unit prefix" );
throw std::invalid_argument( _( "Invalid unit prefix" ) );
}
}