7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-07 18:25:31 +00:00

IPC-2581 has a hyphen in it.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19770
This commit is contained in:
Jeff Young 2025-02-03 20:15:42 +00:00
parent 3fff89820d
commit 40daacbeeb
4 changed files with 18 additions and 16 deletions

View File

@ -69,13 +69,13 @@ JOB_EXPORT_PCB_IPC2581::JOB_EXPORT_PCB_IPC2581() :
wxString JOB_EXPORT_PCB_IPC2581::GetDefaultDescription() const
{
return _( "Export IPC2581" );
return _( "Export IPC-2581" );
}
wxString JOB_EXPORT_PCB_IPC2581::GetSettingsDialogTitle() const
{
return _( "Export IPC2581 Job Settings" );
return _( "Export IPC-2581 Job Settings" );
}
@ -88,5 +88,5 @@ void JOB_EXPORT_PCB_IPC2581::SetDefaultOutputPath( const wxString& aReferenceNam
SetConfiguredOutputPath( fn.GetFullName() );
}
REGISTER_JOB( pcb_export_ipc2581, _HKI( "PCB: Export IPC2581" ), KIWAY::FACE_PCB,
REGISTER_JOB( pcb_export_ipc2581, _HKI( "PCB: Export IPC-2581" ), KIWAY::FACE_PCB,
JOB_EXPORT_PCB_IPC2581 );

View File

@ -45,7 +45,7 @@ CLI::PCB_EXPORT_IPC2581_COMMAND::PCB_EXPORT_IPC2581_COMMAND() :
addDrawingSheetArg();
addDefineArg();
m_argParser.add_description( std::string( "Export the PCB in IPC2581 format" ) );
m_argParser.add_description( std::string( "Export the PCB in IPC-2581 format" ) );
m_argParser.add_argument( ARG_PRECISION )
.help( std::string( "Precision" ) )
@ -59,7 +59,7 @@ CLI::PCB_EXPORT_IPC2581_COMMAND::PCB_EXPORT_IPC2581_COMMAND() :
m_argParser.add_argument( ARG_VERSION )
.default_value( std::string( "C" ) )
.help( std::string( "IPC2581 standard version" ) )
.help( std::string( "IPC-2581 standard version" ) )
.choices( "B", "C" );
m_argParser.add_argument( ARG_UNITS )

View File

@ -1299,7 +1299,7 @@ void PCB_EDIT_FRAME::GenIPC2581File( wxCommandEvent& event )
if( pcbFileName.GetName().empty() )
{
DisplayError( this, _( "The board must be saved before generating IPC2581 file." ) );
DisplayError( this, _( "The board must be saved before generating IPC-2581 file." ) );
return;
}
@ -1315,7 +1315,7 @@ void PCB_EDIT_FRAME::GenIPC2581File( wxCommandEvent& event )
wxString tempFile = wxFileName::CreateTempFileName( wxS( "pcbnew_ipc" ) );
wxString upperTxt;
wxString lowerTxt;
WX_PROGRESS_REPORTER reporter( this, _( "Generating IPC2581 file" ), 5 );
WX_PROGRESS_REPORTER reporter( this, _( "Generating IPC-2581 file" ), 5 );
std::map<std::string, UTF8> props;
props["units"] = dlg.GetUnitsString();
@ -1339,8 +1339,10 @@ void PCB_EDIT_FRAME::GenIPC2581File( wxCommandEvent& event )
}
catch( const IO_ERROR& ioe )
{
DisplayError( this, wxString::Format( _( "Error generating IPC2581 file '%s'.\n%s" ),
pcbFileName.GetFullPath(), ioe.What() ) );
DisplayError( this,
wxString::Format( _( "Error generating IPC-2581 file '%s'.\n%s" ),
pcbFileName.GetFullPath(),
ioe.What() ) );
lowerTxt.Printf( _( "Failed to create temporary file '%s'." ), tempFile );
@ -1372,7 +1374,7 @@ void PCB_EDIT_FRAME::GenIPC2581File( wxCommandEvent& event )
}
catch( const std::exception& e )
{
wxLogError( "Exception in IPC2581 generation: %s", e.what() );
wxLogError( "Exception in IPC-2581 generation: %s", e.what() );
GetScreen()->SetContentModified( false );
return;
}
@ -1403,7 +1405,7 @@ void PCB_EDIT_FRAME::GenIPC2581File( wxCommandEvent& event )
// If save succeeded, replace the original with what we just wrote
if( !wxRenameFile( tempFile, pcbFileName.GetFullPath() ) )
{
DisplayError( this, wxString::Format( _( "Error generating IPC2581 file '%s'.\n"
DisplayError( this, wxString::Format( _( "Error generating IPC-2581 file '%s'.\n"
"Failed to rename temporary file '%s." ),
pcbFileName.GetFullPath(),
tempFile ) );

View File

@ -2009,7 +2009,7 @@ int PCBNEW_JOBS_HANDLER::JobExportIpc2581( JOB* aJob )
}
catch( const IO_ERROR& ioe )
{
m_reporter->Report( wxString::Format( _( "Error generating IPC2581 file '%s'.\n%s" ),
m_reporter->Report( wxString::Format( _( "Error generating IPC-2581 file '%s'.\n%s" ),
job->m_filename,
ioe.What() ),
RPT_SEVERITY_ERROR );
@ -2042,10 +2042,10 @@ int PCBNEW_JOBS_HANDLER::JobExportIpc2581( JOB* aJob )
// If save succeeded, replace the original with what we just wrote
if( !wxRenameFile( tempFile, outPath ) )
{
m_reporter->Report( wxString::Format( _( "Error generating IPC2581 file '%s'.\n"
"Failed to rename temporary file '%s." )
+ wxS( "\n" ),
outPath, tempFile ),
m_reporter->Report( wxString::Format( _( "Error generating IPC-2581 file '%s'.\n"
"Failed to rename temporary file '%s." ),
outPath,
tempFile ),
RPT_SEVERITY_ERROR );
}