From 40daacbeebe18b6b0c22612cd9a6961666700ff9 Mon Sep 17 00:00:00 2001
From: Jeff Young <jeff@rokeby.ie>
Date: Mon, 3 Feb 2025 20:15:42 +0000
Subject: [PATCH] IPC-2581 has a hyphen in it.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19770
---
 common/jobs/job_export_pcb_ipc2581.cpp   |  6 +++---
 kicad/cli/command_pcb_export_ipc2581.cpp |  4 ++--
 pcbnew/files.cpp                         | 14 ++++++++------
 pcbnew/pcbnew_jobs_handler.cpp           | 10 +++++-----
 4 files changed, 18 insertions(+), 16 deletions(-)

diff --git a/common/jobs/job_export_pcb_ipc2581.cpp b/common/jobs/job_export_pcb_ipc2581.cpp
index 684219bd84..cdfe06290f 100644
--- a/common/jobs/job_export_pcb_ipc2581.cpp
+++ b/common/jobs/job_export_pcb_ipc2581.cpp
@@ -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 );
\ No newline at end of file
diff --git a/kicad/cli/command_pcb_export_ipc2581.cpp b/kicad/cli/command_pcb_export_ipc2581.cpp
index b7d9d42065..5639351ef8 100644
--- a/kicad/cli/command_pcb_export_ipc2581.cpp
+++ b/kicad/cli/command_pcb_export_ipc2581.cpp
@@ -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 )
diff --git a/pcbnew/files.cpp b/pcbnew/files.cpp
index 7976eb8466..5c2662970f 100644
--- a/pcbnew/files.cpp
+++ b/pcbnew/files.cpp
@@ -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 ) );
diff --git a/pcbnew/pcbnew_jobs_handler.cpp b/pcbnew/pcbnew_jobs_handler.cpp
index ff80215ade..9b685c83c9 100644
--- a/pcbnew/pcbnew_jobs_handler.cpp
+++ b/pcbnew/pcbnew_jobs_handler.cpp
@@ -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 );
     }