~torstenhtr/kicad/kicad_via_stitching

« back to all changes in this revision

Viewing changes to eeschema/erc.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:
281
281
        if( aMinConn == NOC )    /* Only 1 element in the net. */
282
282
        {
283
283
            msg.Printf( _( "Pin %s (%s) of component %s is unconnected." ),
284
 
                        GetChars( string_pinnum ), MsgPinElectricType[ii], GetChars( cmp_ref ) );
 
284
                        GetChars( string_pinnum ),
 
285
                        GetChars( LIB_PIN::GetElectricalTypeName( ii ) ),
 
286
                        GetChars( cmp_ref ) );
285
287
            marker->SetData( ERCE_PIN_NOT_CONNECTED,
286
288
                             aNetItemRef->m_Start,
287
289
                             msg,
296
298
                    &aNetItemRef->m_SheetPath );
297
299
 
298
300
            msg.Printf( _( "Pin %s (%s) of component %s is not driven (Net %d)." ),
299
 
                        GetChars( string_pinnum ), MsgPinElectricType[ii], GetChars( cmp_ref ),
 
301
                        GetChars( string_pinnum ),
 
302
                        GetChars( LIB_PIN::GetElectricalTypeName( ii ) ),
 
303
                        GetChars( cmp_ref ),
300
304
                        aNetItemRef->GetNet() );
301
305
            marker->SetData( ERCE_PIN_NOT_DRIVEN,
302
306
                             aNetItemRef->m_Start,
336
340
            alt_cmp = aNetItemTst->GetComponentParent()->GetRef( &aNetItemTst->m_SheetPath );
337
341
 
338
342
        msg.Printf( _( "Pin %s (%s) of component %s is connected to " ),
339
 
                    GetChars( string_pinnum ), MsgPinElectricType[ii], GetChars( cmp_ref ) );
 
343
                    GetChars( string_pinnum ),
 
344
                    GetChars( LIB_PIN::GetElectricalTypeName( ii ) ),
 
345
                    GetChars( cmp_ref ) );
340
346
        marker->SetData( errortype, aNetItemRef->m_Start, msg, aNetItemRef->m_Start );
341
347
        msg.Printf( _( "pin %s (%s) of component %s (net %d)." ),
342
 
                    GetChars( alt_string_pinnum ), MsgPinElectricType[jj], GetChars( alt_cmp ),
 
348
                    GetChars( alt_string_pinnum ),
 
349
                    GetChars( LIB_PIN::GetElectricalTypeName( jj ) ),
 
350
                    GetChars( alt_cmp ),
343
351
                    aNetItemRef->GetNet() );
344
352
        marker->SetAuxiliaryData( msg, aNetItemTst->m_Start );
345
353
    }