Simplify string processing and ease translation.
This commit is contained in:
parent
7414a62947
commit
6cbe2131ab
|
@ -28,7 +28,6 @@
|
|||
|
||||
#include <bitmaps.h>
|
||||
#include <class_board.h>
|
||||
#include <confirm.h>
|
||||
#include <dialog_helpers.h>
|
||||
#include <kiface_i.h>
|
||||
#include <pcb_edit_frame.h>
|
||||
|
@ -46,16 +45,12 @@
|
|||
#include <tool/tool_manager.h>
|
||||
#include <tools/pcb_actions.h>
|
||||
#include <tools/selection_tool.h>
|
||||
#include <view/view.h>
|
||||
#include <wx/wupdlock.h>
|
||||
|
||||
#if defined(KICAD_SCRIPTING) || defined(KICAD_SCRIPTING_WXPYTHON)
|
||||
#include <python_scripting.h>
|
||||
#endif
|
||||
|
||||
#define SEL_LAYER_HELP _( \
|
||||
"Show active layer selections\nand select layer pair for route and place via" )
|
||||
|
||||
|
||||
/* Data to build the layer pair indicator button */
|
||||
static std::unique_ptr<wxBitmap> LayerPairBitmap;
|
||||
|
@ -659,15 +654,15 @@ void PCB_EDIT_FRAME::UpdateViaSizeSelectBox( wxChoice* aViaSizeSelectBox, bool a
|
|||
|
||||
if( hole > 0 )
|
||||
{
|
||||
priStr.Printf( _( "%s / %s" ), ComboBoxUnits( primaryUnit, diam, false ),
|
||||
ComboBoxUnits( primaryUnit, hole, true ) );
|
||||
secStr.Printf( _( "%s / %s" ), ComboBoxUnits( secondaryUnit, diam, false ),
|
||||
ComboBoxUnits( secondaryUnit, hole, true ) );
|
||||
priStr = ComboBoxUnits( primaryUnit, diam, false ) + " / "
|
||||
+ ComboBoxUnits( primaryUnit, hole, true );
|
||||
secStr = ComboBoxUnits( secondaryUnit, diam, false ) + " / "
|
||||
+ ComboBoxUnits( secondaryUnit, hole, true );
|
||||
}
|
||||
else
|
||||
{
|
||||
priStr.Printf( _( "%s" ), ComboBoxUnits( primaryUnit, diam, true ) );
|
||||
secStr.Printf( _( "%s" ), ComboBoxUnits( secondaryUnit, diam, true ) );
|
||||
priStr = ComboBoxUnits( primaryUnit, diam, true );
|
||||
secStr = ComboBoxUnits( secondaryUnit, diam, true );
|
||||
}
|
||||
|
||||
msg.Printf( _( "Via: %s (%s)" ), priStr, secStr );
|
||||
|
|
|
@ -205,9 +205,7 @@ void PCB_INSPECTION_TOOL::reportClearance( DRC_CONSTRAINT_TYPE_T aClearanceType,
|
|||
{
|
||||
r->Report( "" );
|
||||
r->Report( _( "Report incomplete: could not compile design rules. " )
|
||||
+ wxT( "<a href='boardsetup'>" )
|
||||
+ _( "Show design rules." )
|
||||
+ wxT( "</a>" ) );
|
||||
+ "<a href='boardsetup'>" + _( "Show design rules." ) + "</a>" );
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -296,7 +294,7 @@ int PCB_INSPECTION_TOOL::InspectClearance( const TOOL_EVENT& aEvent )
|
|||
wxString s = aItem->GetSelectMenuText( r->GetUnits() );
|
||||
|
||||
if( auto* cItem = dynamic_cast<BOARD_CONNECTED_ITEM*>( aItem ) )
|
||||
s += wxString::Format( _( " [netclass %s]" ), cItem->GetNetClassName() );
|
||||
s += " " + wxString::Format( _( "[netclass %s]" ), cItem->GetNetClassName() );
|
||||
|
||||
return s;
|
||||
};
|
||||
|
@ -305,7 +303,7 @@ int PCB_INSPECTION_TOOL::InspectClearance( const TOOL_EVENT& aEvent )
|
|||
{
|
||||
r->Report( _( "<h7>Silkscreen clearance resolution for:</h7>" ) );
|
||||
|
||||
r->Report( wxString::Format( wxT( "<ul><li>%s %s</li><li>%s</li><li>%s</li></ul>" ),
|
||||
r->Report( wxString::Format( "<ul><li>%s %s</li><li>%s</li><li>%s</li></ul>",
|
||||
_( "Layer" ),
|
||||
m_frame->GetBoard()->GetLayerName( layer ),
|
||||
getItemDescription( a ),
|
||||
|
@ -329,7 +327,7 @@ int PCB_INSPECTION_TOOL::InspectClearance( const TOOL_EVENT& aEvent )
|
|||
{
|
||||
r->Report( _( "<h7>Clearance resolution for:</h7>" ) );
|
||||
|
||||
r->Report( wxString::Format( wxT( "<ul><li>%s %s</li><li>%s</li><li>%s</li></ul>" ),
|
||||
r->Report( wxString::Format( "<ul><li>%s %s</li><li>%s</li><li>%s</li></ul>",
|
||||
_( "Layer" ),
|
||||
m_frame->GetBoard()->GetLayerName( layer ),
|
||||
getItemDescription( a ),
|
||||
|
@ -408,17 +406,14 @@ int PCB_INSPECTION_TOOL::InspectConstraints( const TOOL_EVENT& aEvent )
|
|||
WX_HTML_REPORT_BOX* r = m_inspectConstraintsDialog->AddPage( "Track Width" );
|
||||
|
||||
r->Report( _( "<h7>Track width resolution for:</h7>" ) );
|
||||
r->Report( wxString::Format( _( "<ul><li>%s</li></ul>" ),
|
||||
item->GetSelectMenuText( r->GetUnits() ) ) );
|
||||
r->Report( "<ul><li>" + item->GetSelectMenuText( r->GetUnits() ) + "</li></ul>" );
|
||||
r->Report( "" );
|
||||
|
||||
if( compileError )
|
||||
{
|
||||
r->Report( "" );
|
||||
r->Report( _( "Report incomplete: could not compile design rules. " )
|
||||
+ wxT( "<a href='boardsetup'>" )
|
||||
+ _( "Show design rules." )
|
||||
+ wxT( "</a>" ) );
|
||||
+ "<a href='boardsetup'>" + _( "Show design rules." ) + "</a>" );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -448,17 +443,14 @@ int PCB_INSPECTION_TOOL::InspectConstraints( const TOOL_EVENT& aEvent )
|
|||
WX_HTML_REPORT_BOX* r = m_inspectConstraintsDialog->AddPage( "Via Diameter" );
|
||||
|
||||
r->Report( _( "<h7>Via diameter resolution for:</h7>" ) );
|
||||
r->Report( wxString::Format( _( "<ul><li>%s</li></ul>" ),
|
||||
item->GetSelectMenuText( r->GetUnits() ) ) );
|
||||
r->Report( "<ul><li>" + item->GetSelectMenuText( r->GetUnits() ) + "</li></ul>" );
|
||||
r->Report( "" );
|
||||
|
||||
if( compileError )
|
||||
{
|
||||
r->Report( "" );
|
||||
r->Report( _( "Report incomplete: could not compile design rules. " )
|
||||
+ wxT( "<a href='boardsetup'>" )
|
||||
+ _( "Show design rules." )
|
||||
+ wxT( "</a>" ) );
|
||||
+ "<a href='boardsetup'>" + _( "Show design rules." ) + "</a>" );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -485,17 +477,14 @@ int PCB_INSPECTION_TOOL::InspectConstraints( const TOOL_EVENT& aEvent )
|
|||
r = m_inspectConstraintsDialog->AddPage( "Via Annular Width" );
|
||||
|
||||
r->Report( _( "<h7>Via annular width resolution for:</h7>" ) );
|
||||
r->Report( wxString::Format( _( "<ul><li>%s</li></ul>" ),
|
||||
item->GetSelectMenuText( r->GetUnits() ) ) );
|
||||
r->Report( "<ul><li>" + item->GetSelectMenuText( r->GetUnits() ) + "</li></ul>" );
|
||||
r->Report( "" );
|
||||
|
||||
if( compileError )
|
||||
{
|
||||
r->Report( "" );
|
||||
r->Report( _( "Report incomplete: could not compile design rules. " )
|
||||
+ wxT( "<a href='boardsetup'>" )
|
||||
+ _( "Show design rules." )
|
||||
+ wxT( "</a>" ) );
|
||||
+ "<a href='boardsetup'>" + _( "Show design rules." ) + "</a>" );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -526,17 +515,14 @@ int PCB_INSPECTION_TOOL::InspectConstraints( const TOOL_EVENT& aEvent )
|
|||
WX_HTML_REPORT_BOX* r = m_inspectConstraintsDialog->AddPage( "Hole Size" );
|
||||
|
||||
r->Report( _( "<h7>Hole diameter resolution for:</h7>" ) );
|
||||
r->Report( wxString::Format( _( "<ul><li>%s</li></ul>" ),
|
||||
item->GetSelectMenuText( r->GetUnits() ) ) );
|
||||
r->Report( "<ul><li>" + item->GetSelectMenuText( r->GetUnits() ) + "</li></ul>" );
|
||||
r->Report( "" );
|
||||
|
||||
if( compileError )
|
||||
{
|
||||
r->Report( "" );
|
||||
r->Report( _( "Report incomplete: could not compile design rules. " )
|
||||
+ wxT( "<a href='boardsetup'>" )
|
||||
+ _( "Show design rules." )
|
||||
+ wxT( "</a>" ) );
|
||||
+ "<a href='boardsetup'>" + _( "Show design rules." ) + "</a>" );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue