String fixes

- Clarify wording in a couple places
- Fix missing 'not' and remove non-standard dashes
- Standardize on single-quote for strings in strings
This commit is contained in:
Seth Hillbrand 2025-07-23 17:13:39 -07:00
parent 740f55fd30
commit 094870e7a4
20 changed files with 40 additions and 100 deletions

View File

@ -729,7 +729,7 @@ L_read:
} // while
// L_unterminated:
wxString errtxt( _( "Un-terminated delimited string" ) );
wxString errtxt( _( "Unterminated delimited string" ) );
THROW_PARSE_ERROR( errtxt, CurSource(), CurLine(), CurLineNumber(),
cur - start + curText.length() );
}

View File

@ -4261,7 +4261,7 @@ int CONNECTION_GRAPH::ercCheckHierSheets()
wxCHECK2( label, continue );
msg.Printf(
_( "Hierarchical label \"%s\" in root sheet cannot be connected to non-existent parent sheet" ),
_( "Hierarchical label '%s' in root sheet cannot be connected to non-existent parent sheet" ),
label->GetShownText( &sheet, true ) );
std::shared_ptr<ERC_ITEM> ercItem = ERC_ITEM::Create( ERCE_PIN_NOT_CONNECTED );
ercItem->SetItems( item );

View File

@ -1456,7 +1456,7 @@ void SCH_IO_ALTIUM::ParseComponent( int aIndex, const std::map<wxString, wxStrin
{
const ASCH_SYMBOL& currentSymbol = m_altiumComponents.at( aIndex );
m_errorMessages.emplace( wxString::Format( _( "Symbol \"%s\" in sheet \"%s\" at index %d "
m_errorMessages.emplace( wxString::Format( _( "Symbol '%s' in sheet '%s' at index %d "
"replaced with symbol \"%s\"." ),
currentSymbol.libreference,
sheetName,

View File

@ -41,8 +41,8 @@
#include <kiway_player.h>
#include <string_utils.h>
#define FMT_UNIMPLEMENTED _( "Plugin \"%s\" does not implement the \"%s\" function." )
#define FMT_NOTFOUND _( "Plugin type \"%s\" is not found." )
#define FMT_UNIMPLEMENTED _( "Plugin '%s' does not implement the '%s' function." )
#define FMT_NOTFOUND _( "Plugin type '%s' is not found." )

View File

@ -679,7 +679,7 @@ void GERBVIEW_FRAME::UpdateTitleAndInfo()
// Display Image Name and Layer Name (from the current gerber data):
wxString status;
status.Printf( _( "Image name: \"%s\" Layer name: \"%s\"" ),
status.Printf( _( "Image name: '%s' Layer name: '%s'" ),
gerber->m_ImageName,
gerber->GetLayerParams().m_LayerName );
SetStatusText( status, 0 );

View File

@ -229,10 +229,10 @@ bool GERBER_FILE_IMAGE::ExecuteRS274XCommand( int aCommand, char* aBuff,
break;
case 'D': // Non-standard option for all zeros (leading + tailing)
msg.Printf( _( "RS274X: Invalid GERBER format command '%c' at line %d: \"%s\"" ),
msg.Printf( _( "RS274X: Invalid GERBER format command '%c' at line %d: '%s'" ),
'D', m_LineNum, aBuff );
AddMessageToList( msg );
msg.Printf( _("GERBER file \"%s\" may not display as intended." ),
msg.Printf( _("GERBER file '%s' may not display as intended." ),
m_FileName.ToAscii() );
AddMessageToList( msg );
KI_FALLTHROUGH;

View File

@ -203,64 +203,4 @@ protected:
#endif
};
// pseudo code for OpenProjectFiles
#if 0
bool OpenProjectFiles( const std::vector<wxString>& aFileList, int aCtl = 0 )
{
if( aFileList.size() != 1 )
{
complain via UI.
return false
}
assert( aFileList[0] is absolute ) // bug in single_top.cpp or project manager.
if( !Pgm().LockFile( fullFileName ) )
{
DisplayError( this, _( "This file is already open." ) );
return false;
}
if current open project files have been modified
{
ask if user wants to save them and if yes save.
}
unload any currently open project files.
Prj().SetProjectFullName( )
if( aFileList[0] does not exist )
{
notify user file does not exist and ask if he wants to create it
if( yes )
{
create empty project file(s)
mark file as modified.
use the default project config file.
}
else
return false
}
else
{
load aFileList[0]
use the project config file for project given by aFileList[0]s full path.
}
UpdateFileHistory( g_RootSheet->GetScreen()->GetFileName() );
/* done in ReDraw typically:
UpdateTitle();
*/
show contents.
}
#endif
#endif // KIWAY_PLAYER_H_

View File

@ -49,18 +49,18 @@ PROJECT_TEMPLATE::PROJECT_TEMPLATE( const wxString& aPath )
if( !wxFileName::DirExists( m_basePath.GetPath() ) )
{
// Error, the path doesn't exist!
m_title = _( "Could open the template path!" ) + wxS( " " ) + aPath;
m_title = _( "Could not open the template path" ) + wxS( " " ) + aPath;
}
else if( !wxFileName::DirExists( m_metaPath.GetPath() ) )
{
// Error, the meta information directory doesn't exist!
m_title = _( "Couldn't open the meta information directory for this template!" ) +
m_title = _( "Could not find the expected 'meta' directory at" ) +
wxS( " " ) + m_metaPath.GetPath();
}
else if( !wxFileName::FileExists( m_metaHtmlFile.GetFullPath() ) )
{
// Error, the meta information directory doesn't contain the informational html file!
m_title = _( "Couldn't find the meta HTML information file for this template!" );
m_title = _( "Could not find the expected meta HTML file at" ) + wxS( " " ) + m_metaHtmlFile.GetFullPath();
}
// Try to load an icon

View File

@ -139,7 +139,7 @@ bool PROJECT_TREE_ITEM::Rename( const wxString& name, bool check )
if( !wxRenameFile( GetFileName(), newFile, false ) )
{
wxMessageDialog( m_parent, _( "Unable to rename file ... " ), _( "Permission error?" ),
wxMessageDialog( m_parent, _( "Unable to rename file ... " ), _( "Permission denied" ),
wxICON_ERROR | wxOK );
return false;
}

View File

@ -78,7 +78,7 @@ void PL_EDITOR_FRAME::OnFileHistory( wxCommandEvent& event )
if( LoadDrawingSheetFile( filename ) )
{
wxString msg;
msg.Printf( _( "File \"%s\" loaded"), filename );
msg.Printf( _( "File '%s' loaded"), filename );
SetStatusText( msg );
}
@ -146,7 +146,7 @@ void PL_EDITOR_FRAME::Files_io( wxCommandEvent& event )
{
GetScreen()->SetContentModified();
HardRedraw();
msg.Printf( _( "File \"%s\" inserted" ), filename );
msg.Printf( _( "File '%s' inserted" ), filename );
SetStatusText( msg );
}
}
@ -170,7 +170,7 @@ void PL_EDITOR_FRAME::Files_io( wxCommandEvent& event )
else
{
OnNewDrawingSheet();
msg.Printf( _( "File \"%s\" saved." ), filename );
msg.Printf( _( "File '%s' saved." ), filename );
SetStatusText( msg );
}
}

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6)
// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6a-dirty)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@ -26,11 +26,11 @@ PANEL_SETUP_MASK_AND_PASTE_BASE::PANEL_SETUP_MASK_AND_PASTE_BASE( wxWindow* pare
wxBoxSizer* bSizer4;
bSizer4 = new wxBoxSizer( wxVERTICAL );
m_staticTextInfoMaskMinWidth = new wxStaticText( this, wxID_ANY, _("Use your board manufacturer's recommendations for solder mask expansion and minimum web width."), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextInfoMaskMinWidth = new wxStaticText( this, wxID_ANY, _("Consult your PCB manufacturer's specifications for solder mask clearance and minimum bridge width recommendations."), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextInfoMaskMinWidth->Wrap( -1 );
bSizer4->Add( m_staticTextInfoMaskMinWidth, 0, wxEXPAND, 5 );
m_staticTextInfoMaskMinWidth1 = new wxStaticText( this, wxID_ANY, _("If none are provided, setting the values to zero is suggested."), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextInfoMaskMinWidth1 = new wxStaticText( this, wxID_ANY, _("If no specifications are provided, setting these values to zero is recommended."), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextInfoMaskMinWidth1->Wrap( -1 );
bSizer4->Add( m_staticTextInfoMaskMinWidth1, 0, wxEXPAND, 5 );

View File

@ -179,7 +179,7 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Use your board manufacturer&apos;s recommendations for solder mask expansion and minimum web width.</property>
<property name="label">Consult your PCB manufacturer&apos;s specifications for solder mask clearance and minimum bridge width recommendations.</property>
<property name="markup">0</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
@ -241,7 +241,7 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">If none are provided, setting the values to zero is suggested.</property>
<property name="label">If no specifications are provided, setting these values to zero is recommended.</property>
<property name="markup">0</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6)
// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6a-dirty)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!

View File

@ -1030,7 +1030,7 @@ DRC_CONSTRAINT DRC_ENGINE::EvalRules( DRC_CONSTRAINT_T aConstraintType, const BO
auto testAssertion =
[&]( const DRC_ENGINE_CONSTRAINT* c )
{
REPORT( wxString::Format( _( "Checking assertion \"%s\"." ),
REPORT( wxString::Format( _( "Checking assertion '%s'." ),
EscapeHTML( c->constraint.m_Test->GetExpression() ) ) )
if( c->constraint.m_Test->EvaluateFor( a, b, c->constraint.m_Type, aLayer,
@ -1427,7 +1427,7 @@ DRC_CONSTRAINT DRC_ENGINE::EvalRules( DRC_CONSTRAINT_T aConstraintType, const BO
}
else
{
REPORT( wxString::Format( _( "Checking rule condition \"%s\"." ),
REPORT( wxString::Format( _( "Checking rule condition '%s'." ),
EscapeHTML( c->condition->GetExpression() ) ) )
}
@ -1710,7 +1710,7 @@ void DRC_ENGINE::ProcessAssertions( const BOARD_ITEM* a,
auto testAssertion =
[&]( const DRC_ENGINE_CONSTRAINT* c )
{
REPORT( wxString::Format( _( "Checking rule assertion \"%s\"." ),
REPORT( wxString::Format( _( "Checking rule assertion '%s'." ),
EscapeHTML( c->constraint.m_Test->GetExpression() ) ) )
if( c->constraint.m_Test->EvaluateFor( a, nullptr, c->constraint.m_Type,
@ -1744,7 +1744,7 @@ void DRC_ENGINE::ProcessAssertions( const BOARD_ITEM* a,
}
else
{
REPORT( wxString::Format( _( "Checking rule condition \"%s\"." ),
REPORT( wxString::Format( _( "Checking rule condition '%s'." ),
EscapeHTML( c->condition->GetExpression() ) ) )
if( c->condition->EvaluateFor( a, nullptr, c->constraint.m_Type,

View File

@ -867,13 +867,13 @@ bool BOARD_NETLIST_UPDATER::updateFootprintGroup( FOOTPRINT* aPcbFootprint,
{
if( m_isDryRun )
{
msg.Printf( _( "Remove %s from group \"%s\"." ),
msg.Printf( _( "Remove %s from group '%s'." ),
aPcbFootprint->GetReference(),
EscapeHTML( existingGroup->GetName() ) );
}
else
{
msg.Printf( _( "Removed %s from group \"%s\"." ),
msg.Printf( _( "Removed %s from group '%s'." ),
aPcbFootprint->GetReference(),
EscapeHTML( existingGroup->GetName() ) );
@ -890,13 +890,13 @@ bool BOARD_NETLIST_UPDATER::updateFootprintGroup( FOOTPRINT* aPcbFootprint,
{
if( m_isDryRun )
{
msg.Printf( _( "Add %s to group \"%s\"." ),
msg.Printf( _( "Add %s to group '%s'." ),
aPcbFootprint->GetReference(),
EscapeHTML( aNetlistComponent->GetGroup()->name ) );
}
else
{
msg.Printf( _( "Added %s group \"%s\"." ),
msg.Printf( _( "Added %s group '%s'." ),
aPcbFootprint->GetReference(),
EscapeHTML( aNetlistComponent->GetGroup()->name ) );

View File

@ -3511,7 +3511,7 @@ void ALTIUM_PCB::ConvertPads6ToFootprintItemOnCopper( FOOTPRINT* aFootprint, con
{
wxString msg;
msg.Printf( _( "Error loading library '%s':\n"
"Footprint %s pad %s uses an unknown pad-shape." ),
"Footprint %s pad %s uses an unknown pad shape." ),
m_library,
m_footprintName,
aElem.name );
@ -3523,7 +3523,7 @@ void ALTIUM_PCB::ConvertPads6ToFootprintItemOnCopper( FOOTPRINT* aFootprint, con
if( m_reporter )
{
wxString msg;
msg.Printf( _( "Footprint %s pad %s uses an unknown pad-shape." ),
msg.Printf( _( "Footprint %s pad %s uses an unknown pad shape." ),
aFootprint->GetReference(),
aElem.name );
m_reporter->Report( msg, RPT_SEVERITY_DEBUG );
@ -3861,7 +3861,7 @@ void ALTIUM_PCB::HelperParsePad6NonCopper( const APAD6& aElem, PCB_LAYER_ID aLay
if( m_reporter )
{
wxString msg;
msg.Printf( _( "Non-copper pad %s uses an unknown pad-shape." ), aElem.name );
msg.Printf( _( "Non-copper pad %s uses an unknown pad shape." ), aElem.name );
m_reporter->Report( msg, RPT_SEVERITY_DEBUG );
}

View File

@ -2485,7 +2485,7 @@ void PCB_IO_KICAD_LEGACY::loadZONE_CONTAINER()
if( !hopt )
{
m_error.Printf( _( "Bad ZAux for CZONE_CONTAINER \"%s\"" ),
m_error.Printf( _( "Bad ZAux for CZONE_CONTAINER '%s'" ),
zc->GetNetname().GetData() );
THROW_IO_ERROR( m_error );
}
@ -2496,7 +2496,7 @@ void PCB_IO_KICAD_LEGACY::loadZONE_CONTAINER()
case 'E': outline_hatch = ZONE_BORDER_DISPLAY_STYLE::DIAGONAL_EDGE; break;
case 'F': outline_hatch = ZONE_BORDER_DISPLAY_STYLE::DIAGONAL_FULL; break;
default:
m_error.Printf( _( "Bad ZAux for CZONE_CONTAINER \"%s\"" ),
m_error.Printf( _( "Bad ZAux for CZONE_CONTAINER '%s'" ),
zc->GetNetname().GetData() );
THROW_IO_ERROR( m_error );
}
@ -2511,7 +2511,7 @@ void PCB_IO_KICAD_LEGACY::loadZONE_CONTAINER()
if( smoothing >= ZONE_SETTINGS::SMOOTHING_LAST || smoothing < 0 )
{
m_error.Printf( _( "Bad ZSmoothing for CZONE_CONTAINER \"%s\"" ),
m_error.Printf( _( "Bad ZSmoothing for CZONE_CONTAINER '%s'" ),
zc->GetNetname().GetData() );
THROW_IO_ERROR( m_error );
}
@ -2589,7 +2589,7 @@ void PCB_IO_KICAD_LEGACY::loadZONE_CONTAINER()
case 'H': popt = ZONE_CONNECTION::THT_THERMAL; break;
case 'X': popt = ZONE_CONNECTION::NONE; break;
default:
m_error.Printf( _( "Bad ZClearance padoption for CZONE_CONTAINER \"%s\"" ),
m_error.Printf( _( "Bad ZClearance padoption for CZONE_CONTAINER '%s'" ),
zc->GetNetname().GetData() );
THROW_IO_ERROR( m_error );
}

View File

@ -49,8 +49,8 @@
#define FMT_UNIMPLEMENTED _( "Plugin \"%s\" does not implement the \"%s\" function." )
#define FMT_NOTFOUND _( "Plugin type \"%s\" is not found." )
#define FMT_UNIMPLEMENTED _( "Plugin '%s' does not implement the '%s' function." )
#define FMT_NOTFOUND _( "Plugin type '%s' is not found." )
// Some day plugins might be in separate DLL/DSOs, simply because of numbers of them

View File

@ -432,7 +432,7 @@ LSEQ PCBNEW_JOBS_HANDLER::convertLayerArg( wxString& aLayerString, BOARD* aBoard
else if( layerGuiMasks.count( token ) )
pushLayers( layerGuiMasks.at( token ) );
else
m_reporter->Report( wxString::Format( _( "Invalid layer name \"%s\"\n" ), token ) );
m_reporter->Report( wxString::Format( _( "Invalid layer name '%s'\n" ), token ) );
}
}

View File

@ -73,7 +73,7 @@ IFSTREAM_LINE_READER::IFSTREAM_LINE_READER( const wxFileName& aFileName ) :
if( !m_fStream.is_open() )
{
wxString msg = wxString::Format(
_( "Unable to open filename \"%s\" for reading" ), aFileName.GetFullPath().GetData() );
_( "Unable to open filename '%s' for reading" ), aFileName.GetFullPath().GetData() );
THROW_IO_ERROR( msg );
}