Commit b3fd915f authored by Dick Hollenbeck's avatar Dick Hollenbeck

add translation to static file filters, comments

parent b68fa7cd
...@@ -55,7 +55,7 @@ const wxString SchematicFileWildcard( _( "KiCad schematic files (*.sch)|*.sch" ) ...@@ -55,7 +55,7 @@ const wxString SchematicFileWildcard( _( "KiCad schematic files (*.sch)|*.sch" )
const wxString NetlistFileWildcard( _( "KiCad netlist files (*.net)|*.net" ) ); const wxString NetlistFileWildcard( _( "KiCad netlist files (*.net)|*.net" ) );
const wxString GerberFileWildcard( _( "Gerber files (*.pho)|*.pho" ) ); const wxString GerberFileWildcard( _( "Gerber files (*.pho)|*.pho" ) );
const wxString LegacyPcbFileWildcard( _( "KiCad printed circuit board files (*.brd)|*.brd" ) ); const wxString LegacyPcbFileWildcard( _( "KiCad printed circuit board files (*.brd)|*.brd" ) );
const wxString EaglePcbFileWildcard( _( "Eagle printed circuit board files (*.brd)|*.brd" ) ); const wxString EaglePcbFileWildcard( _( "Eagle ver. 6.x XML PCB files (*.brd)|*.brd" ) );
const wxString PcbFileWildcard( _( "KiCad s-expr printed circuit board files (*.kicad_pcb)|*.kicad_pcb" ) ); const wxString PcbFileWildcard( _( "KiCad s-expr printed circuit board files (*.kicad_pcb)|*.kicad_pcb" ) );
const wxString FootprintLibFileWildcard( _( "KiCad footprint library file (*.mod)|*.mod" ) ); const wxString FootprintLibFileWildcard( _( "KiCad footprint library file (*.mod)|*.mod" ) );
const wxString PdfFileWildcard( _( "Portable document format files (*.pdf)|*.pdf" ) ); const wxString PdfFileWildcard( _( "Portable document format files (*.pdf)|*.pdf" ) );
......
...@@ -172,6 +172,10 @@ the changes?" ) ) ) ...@@ -172,6 +172,10 @@ the changes?" ) ) )
IO_MGR::PCB_FILE_T pluginType = IO_MGR::LEGACY; IO_MGR::PCB_FILE_T pluginType = IO_MGR::LEGACY;
// This is a subset of all PLUGINs which are trusted to be able to
// load a BOARD. Order is subject to change as KICAD plugin matures.
// User may occasionally use the wrong pluging to load a *.brd file,
// but eventually *.kicad_pcb will be more common than legacy *.brd files.
static const struct { static const struct {
const wxString& filter; const wxString& filter;
IO_MGR::PCB_FILE_T pluginType; IO_MGR::PCB_FILE_T pluginType;
...@@ -187,12 +191,12 @@ the changes?" ) ) ) ...@@ -187,12 +191,12 @@ the changes?" ) ) )
wxString path = wxGetCwd(); wxString path = wxGetCwd();
wxString fileFilters; wxString fileFilters;
for( unsigned i = 0; i<DIM( loaders ); ++i ) for( unsigned i=0; i<DIM( loaders ); ++i )
{ {
if( i > 0 ) if( i > 0 )
fileFilters += wxChar( '|' ); fileFilters += wxChar( '|' );
fileFilters += loaders[i].filter; fileFilters += wxGetTranslation( loaders[i].filter );
} }
if( aForceFileDialog && fileName.FileExists() ) if( aForceFileDialog && fileName.FileExists() )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment