From 1a6b90d0577873d541837ad2dfac3a687a6e2be6 Mon Sep 17 00:00:00 2001 From: charras Date: Mon, 23 Nov 2009 21:03:26 +0000 Subject: [PATCH] fix last French to English translations problems --- common/pcbcommon.cpp | 2 +- cvpcb/listlib.cpp | 4 +-- pcbnew/class_text_mod.cpp | 73 +++++++++++++++++++-------------------- pcbnew/muonde.cpp | 10 +++--- pcbnew/netlist.cpp | 8 ++--- pcbnew/solve.cpp | 4 ++- 6 files changed, 51 insertions(+), 50 deletions(-) diff --git a/common/pcbcommon.cpp b/common/pcbcommon.cpp index c451d21238..ac59dbc7d9 100644 --- a/common/pcbcommon.cpp +++ b/common/pcbcommon.cpp @@ -58,7 +58,7 @@ int g_TabAllCopperLayerMask[NB_COPPER_LAYERS] = { }; wxString g_ViaType_Name[4] = { - _( "??? Via" ), // Not used yet + _( "??? Via" ), // Not used yet, do not exists _( "Micro Via" ), // from external layer (TOP or BOTTOM) from // the near neighbor inner layer only _( "Blind/Buried Via" ), // from inner or external to inner or external diff --git a/cvpcb/listlib.cpp b/cvpcb/listlib.cpp index ded36aba82..09428a62c4 100644 --- a/cvpcb/listlib.cpp +++ b/cvpcb/listlib.cpp @@ -4,8 +4,8 @@ /* - * Searches for all ref *.??? if offering their file name, - * or reviews [MODULE.LIB] + * Functions to read footprint libraries and create the list of availlable footprints + * and their documentation (comments and keywords) */ #include "fctsys.h" #include "wxstruct.h" diff --git a/pcbnew/class_text_mod.cpp b/pcbnew/class_text_mod.cpp index 4b787450a9..c42a4e9733 100644 --- a/pcbnew/class_text_mod.cpp +++ b/pcbnew/class_text_mod.cpp @@ -19,11 +19,11 @@ /*******************************************************************/ TEXTE_MODULE::TEXTE_MODULE( MODULE* parent, int text_type ) : - BOARD_ITEM( parent, TYPE_TEXTE_MODULE ), EDA_TextStruct () + BOARD_ITEM( parent, TYPE_TEXTE_MODULE ), EDA_TextStruct() { MODULE* Module = (MODULE*) m_Parent; - m_Type = text_type; /* Reference */ + m_Type = text_type; /* Reference */ if( (m_Type != TEXT_is_REFERENCE) && (m_Type != TEXT_is_VALUE) ) m_Type = TEXT_is_DIVERS; @@ -77,15 +77,15 @@ bool TEXTE_MODULE::Save( FILE* aFile ) const orient += parent->m_Orient; int ret = fprintf( aFile, "T%d %d %d %d %d %d %d %c %c %d %c\"%s\"\n", - m_Type, - m_Pos0.x, m_Pos0.y, - m_Size.y, m_Size.x, - orient, - m_Width, - m_Mirror ? 'M' : 'N', m_NoShow ? 'I' : 'V', - GetLayer(), - m_Italic ? 'I' : 'N', - CONV_TO_UTF8( m_Text ) ); + m_Type, + m_Pos0.x, m_Pos0.y, + m_Size.y, m_Size.x, + orient, + m_Width, + m_Mirror ? 'M' : 'N', m_NoShow ? 'I' : 'V', + GetLayer(), + m_Italic ? 'I' : 'N', + CONV_TO_UTF8( m_Text ) ); return ret > 20; } @@ -101,21 +101,21 @@ bool TEXTE_MODULE::Save( FILE* aFile ) const */ int TEXTE_MODULE::ReadDescr( char* aLine, FILE* aFile, int* aLineNum ) { - int success = true; + int success = true; int type; int layer; char BufCar1[128], BufCar2[128], BufCar3[128], BufLine[256]; - layer = SILKSCREEN_N_CMP; + layer = SILKSCREEN_N_CMP; BufCar1[0] = 0; BufCar2[0] = 0; BufCar3[0] = 0; - if ( sscanf( aLine + 1, "%d %d %d %d %d %d %d %s %s %d %s", - &type, - &m_Pos0.x, &m_Pos0.y, - &m_Size.y, &m_Size.x, - &m_Orient, &m_Width, - BufCar1, BufCar2, &layer, BufCar3 ) >= 10 ) + if( sscanf( aLine + 1, "%d %d %d %d %d %d %d %s %s %d %s", + &type, + &m_Pos0.x, &m_Pos0.y, + &m_Size.y, &m_Size.x, + &m_Orient, &m_Width, + BufCar1, BufCar2, &layer, BufCar3 ) >= 10 ) success = true; if( (type != TEXT_is_REFERENCE) && (type != TEXT_is_VALUE) ) @@ -124,7 +124,7 @@ int TEXTE_MODULE::ReadDescr( char* aLine, FILE* aFile, int* aLineNum ) // Due to the pcbnew history, .m_Orient is saved in screen value // but it is handled as relative to its parent footprint - m_Orient -= ((MODULE * )m_Parent)->m_Orient; + m_Orient -= ( (MODULE*) m_Parent )->m_Orient; if( BufCar1[0] == 'M' ) m_Mirror = true; else @@ -163,12 +163,12 @@ int TEXTE_MODULE::ReadDescr( char* aLine, FILE* aFile, int* aLineNum ) if( m_Size.y < TEXTS_MIN_SIZE ) m_Size.y = TEXTS_MIN_SIZE; - // Set a reasonable width: + // Set a reasonable width: if( m_Width < 1 ) m_Width = 1; m_Width = Clamp_Text_PenSize( m_Width, m_Size ); - return success; + return success; } @@ -336,7 +336,9 @@ void TEXTE_MODULE::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, wxPoint pos; // Center of text PCB_SCREEN* screen; WinEDA_BasePcbFrame* frame; - MODULE* Module = (MODULE*) m_Parent; + MODULE* Module = (MODULE*) m_Parent; /* parent must *not* be null + * (a module text without a footprint parent has no sense) + */ if( panel == NULL ) @@ -353,7 +355,7 @@ void TEXTE_MODULE::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, width = m_Width; if( ( frame->m_DisplayModText == FILAIRE ) - || ( screen->Scale( width ) < L_MIN_DESSIN ) ) + || ( screen->Scale( width ) < L_MIN_DESSIN ) ) width = 0; else if( frame->m_DisplayModText == SKETCH ) width = -width; @@ -371,18 +373,16 @@ void TEXTE_MODULE::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, pos.x, pos.y + anchor_size, 0, g_AnchorColor ); } - //@@@@IMB: BIG BIG BUG Here???? May Module be NULL? color = g_DesignSettings.m_LayerColor[Module->GetLayer()]; - //@@IMB: Why the next ifs are testing for Module? - if( Module && Module->GetLayer() == COPPER_LAYER_N ) + if( Module->GetLayer() == COPPER_LAYER_N ) { if( g_DesignSettings.IsElementVisible( MODULE_TEXT_CU_VISIBLE ) == false ) return; color = g_ModuleTextCUColor; } - else if( Module && Module->GetLayer() == CMP_N ) + else if( Module->GetLayer() == CMP_N ) { if( g_DesignSettings.IsElementVisible( MODULE_TEXT_CMP_VISIBLE ) == false ) return; @@ -419,12 +419,9 @@ int TEXTE_MODULE::GetDrawRotation() NORMALIZE_ANGLE_POS( rotation ); // For angle = 0 .. 180 deg -// if( (rotation > 900 ) && (rotation < 2700 ) ) rotation -= 1800; while( rotation > 900 ) rotation -= 1800; - // For angle = -90 .. 90 deg - return rotation; } @@ -432,14 +429,16 @@ int TEXTE_MODULE::GetDrawRotation() // see class_text_mod.h void TEXTE_MODULE::DisplayInfo( WinEDA_DrawFrame* frame ) { - MODULE* module = (MODULE*) m_Parent; + MODULE* module = (MODULE*) m_Parent; + if( module == NULL ) // Happens in modedit, and for new texts return; wxString msg, Line; int ii; - static const wxString text_type_msg[3] = { + static const wxString text_type_msg[3] = + { _( "Ref." ), _( "Value" ), _( "Text" ) }; @@ -516,14 +515,14 @@ bool TEXTE_MODULE::IsOnLayer( int aLayer ) const /* see class_text_mod.h - * bool TEXTE_MODULE::IsOnOneOfTheseLayers( int aLayerMask ) const - * { + * bool TEXTE_MODULE::IsOnOneOfTheseLayers( int aLayerMask ) const + * { * - * } + * } */ -#if defined (DEBUG) +#if defined(DEBUG) /** * Function Show diff --git a/pcbnew/muonde.cpp b/pcbnew/muonde.cpp index 789200479d..0d7bcda7f1 100644 --- a/pcbnew/muonde.cpp +++ b/pcbnew/muonde.cpp @@ -29,7 +29,7 @@ static EDGE_MODULE* gen_arc( MODULE* aModule, int cX, int cY, int angle ); -static void ShowCadreSelf( WinEDA_DrawPanel* panel, +static void ShowBoundingBoxMicroWaveInductor( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ); @@ -57,8 +57,10 @@ static int Self_On; static int Bl_X0, Bl_Y0, Bl_Xf, Bl_Yf; -/* ??? Routine d'affichage a l'ecran du cadre de la self */ -static void ShowCadreSelf( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ) +/* This function shows on screen the bounding box of the inductor that will be + * created at the end of the build inductor process + */ +static void ShowBoundingBoxMicroWaveInductor( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ) { int deltaX, deltaY; @@ -132,7 +134,7 @@ void WinEDA_PcbFrame::Begin_Self( wxDC* DC ) Bl_Xf = Bl_X0; Bl_Yf = Bl_Y0; - DrawPanel->ManageCurseur = ShowCadreSelf; + DrawPanel->ManageCurseur = ShowBoundingBoxMicroWaveInductor; DrawPanel->ForceCloseManageCurseur = Exit_Self; DrawPanel->ManageCurseur( DrawPanel, DC, 0 ); } diff --git a/pcbnew/netlist.cpp b/pcbnew/netlist.cpp index febcc44c80..43095673c3 100644 --- a/pcbnew/netlist.cpp +++ b/pcbnew/netlist.cpp @@ -959,12 +959,10 @@ int ReadListeModules( const wxString& CmpFullFileName, const wxString* RefCmp, } -/* ??? Fontion copiant en memoire de travail les caracteristiques - * des nouveaux modules +/* This function add to the current list of footprints found in netlist + * a new MODULEtoLOAD item (a descriptor of footprints) */ -void AddToList( const wxString& NameLibCmp, - const wxString& CmpName, - const wxString& path ) +void AddToList( const wxString& NameLibCmp, const wxString& CmpName, const wxString& path ) { MODULEtoLOAD* NewMod; diff --git a/pcbnew/solve.cpp b/pcbnew/solve.cpp index 5403b6da3e..ea5b27b201 100644 --- a/pcbnew/solve.cpp +++ b/pcbnew/solve.cpp @@ -1100,7 +1100,9 @@ static int Retrace( WinEDA_PcbFrame* pcbframe, wxDC* DC, } -/* ??? appelle la routine OrCell et place la piste reelle sur le pcb */ +/* This function is used by Retrace and read the autorouting matrix data cells to create + * the real track on the physical board + */ static void OrCell_Trace( BOARD* pcb, int col, int row, int side, int orient, int current_net_code ) {