~torstenhtr/kicad/kicad_via_stitching

« back to all changes in this revision

Viewing changes to eeschema/netlist_exporters/netlist_exporter_generic.cpp

  • Committer: jean-pierre charras
  • Date: 2015-04-02 18:51:47 UTC
  • Revision ID: jp.charras@wanadoo.fr-20150402185147-uyn3rigl0e5mudxe
eeschema: fix Bug #1437604 (double translation of some messages in pin editor dialog) relative to some static strings flagged "to be translated".
This is due to the fact static strings flagged translated ( _("string") notation)  are not translated  when they are static only if they are not inside a dll.
When they are static inside a dll, the dictionary is already loaded, and the constructor translate them.
Therefore they can be translated twice in dialogs are calling wxGetTranslation to show them, if the application is run from kicad.
But if the application is run as stand alone, the translation is made only once (as expected).

Show diffs side-by-side

added added

removed removed

Lines of Context:
214
214
 
215
215
        xdesign->AddChild( xsheet = node( wxT( "sheet" ) ) );
216
216
 
217
 
        // get the string representation of the sheet index number. 
218
 
        // Note that sheet->GetIndex() is zero index base and we need to increment the number by one to make 
 
217
        // get the string representation of the sheet index number.
 
218
        // Note that sheet->GetIndex() is zero index base and we need to increment the number by one to make
219
219
        // human readable
220
220
                sheetTxt.Printf( wxT( "%d" ), ( sheetList.GetIndex() + 1 ) );
221
221
        xsheet->AddAttribute( wxT( "number" ), sheetTxt );
222
222
        xsheet->AddAttribute( wxT( "name" ), sheet->PathHumanReadable() );
223
223
        xsheet->AddAttribute( wxT( "tstamps" ), sheet->Path() );
224
224
 
225
 
    
 
225
 
226
226
        TITLE_BLOCK tb = screen->GetTitleBlock();
227
227
 
228
228
        xsheet->AddChild( xtitleBlock = node( wxT( "title_block" ) ) );
229
 
    
 
229
 
230
230
        xtitleBlock->AddChild( node( wxT( "title" ), tb.GetTitle() ) );
231
231
        xtitleBlock->AddChild( node( wxT( "company" ), tb.GetCompany() ) );
232
232
        xtitleBlock->AddChild( node( wxT( "rev" ), tb.GetRevision() ) );
235
235
        // We are going to remove the fileName directories.
236
236
        sourceFileName = wxFileName( screen->GetFileName() );
237
237
        xtitleBlock->AddChild( node( wxT( "source" ), sourceFileName.GetFullName() ) );
238
 
   
 
238
 
239
239
        xtitleBlock->AddChild( xcomment = node( wxT( "comment" ) ) );
240
240
        xcomment->AddAttribute( wxT("number"), wxT("1") );
241
241
        xcomment->AddAttribute( wxT( "value" ), tb.GetComment1() );
399
399
                pins->AddChild( pin = node( sPin ) );
400
400
                pin->AddAttribute( sPinNum, pinList[i]->GetNumberString() );
401
401
                pin->AddAttribute( sPinName, pinList[i]->GetName() );
402
 
                pin->AddAttribute( sPinType, pinList[i]->GetTypeString() );
 
402
                pin->AddAttribute( sPinType, pinList[i]->GetCanonicalElectricalTypeName() );
403
403
 
404
404
                // caution: construction work site here, drive slowly
405
405
            }