Commit 6083f3b0 authored by Maciej Suminski's avatar Maciej Suminski

Internationalization of GAL dialogs & menus.

parent be839aca
...@@ -156,8 +156,7 @@ void CONTEXT_MENU::Add( const TOOL_ACTION& aAction ) ...@@ -156,8 +156,7 @@ void CONTEXT_MENU::Add( const TOOL_ACTION& aAction )
int id = m_actionId + aAction.GetId(); int id = m_actionId + aAction.GetId();
wxMenuItem* item = new wxMenuItem( this, id, wxMenuItem* item = new wxMenuItem( this, id,
wxString( aAction.GetMenuItem().c_str(), wxConvUTF8 ), aAction.GetMenuItem(), aAction.GetDescription(), wxITEM_NORMAL );
wxString( aAction.GetDescription().c_str(), wxConvUTF8 ), wxITEM_NORMAL );
if( aAction.HasHotKey() ) if( aAction.HasHotKey() )
{ {
......
...@@ -45,8 +45,8 @@ class TOOL_ACTION ...@@ -45,8 +45,8 @@ class TOOL_ACTION
{ {
public: public:
TOOL_ACTION( const std::string& aName, TOOL_ACTION_SCOPE aScope = AS_CONTEXT, TOOL_ACTION( const std::string& aName, TOOL_ACTION_SCOPE aScope = AS_CONTEXT,
int aDefaultHotKey = 0, const std::string& aMenuItem = std::string( "" ), int aDefaultHotKey = 0, const wxString aMenuItem = wxEmptyString,
const std::string& aMenuDesc = std::string( "" ), TOOL_ACTION_FLAGS aFlags = AF_NONE ) : const wxString& aMenuDesc = wxEmptyString, TOOL_ACTION_FLAGS aFlags = AF_NONE ) :
m_name( aName ), m_scope( aScope ), m_defaultHotKey( aDefaultHotKey ), m_name( aName ), m_scope( aScope ), m_defaultHotKey( aDefaultHotKey ),
m_currentHotKey( aDefaultHotKey ), m_menuItem( aMenuItem ), m_currentHotKey( aDefaultHotKey ), m_menuItem( aMenuItem ),
m_menuDescription( aMenuDesc ), m_id( -1 ), m_flags( aFlags ) m_menuDescription( aMenuDesc ), m_id( -1 ), m_flags( aFlags )
...@@ -154,22 +154,22 @@ public: ...@@ -154,22 +154,22 @@ public:
return TOOL_EVENT( TC_COMMAND, TA_ACTION, m_name, m_scope ); return TOOL_EVENT( TC_COMMAND, TA_ACTION, m_name, m_scope );
} }
const std::string& GetMenuItem() const const wxString& GetMenuItem() const
{ {
return m_menuItem; return m_menuItem;
} }
void SetMenuItem( const std::string& aItem ) void SetMenuItem( const wxString& aItem )
{ {
m_menuItem = aItem; m_menuItem = aItem;
} }
const std::string& GetDescription() const const wxString& GetDescription() const
{ {
return m_menuDescription; return m_menuDescription;
} }
void SetDescription( const std::string& aDescription ) void SetDescription( const wxString& aDescription )
{ {
m_menuDescription = aDescription; m_menuDescription = aDescription;
} }
...@@ -218,10 +218,10 @@ private: ...@@ -218,10 +218,10 @@ private:
int m_currentHotKey; int m_currentHotKey;
/// Menu entry text /// Menu entry text
std::string m_menuItem; wxString m_menuItem;
/// Pop-up help /// Pop-up help
std::string m_menuDescription; wxString m_menuDescription;
// Icon for menu entry // Icon for menu entry
// KiBitmap m_bitmap; // KiBitmap m_bitmap;
......
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Oct 8 2012) // C++ code generated with wxFormBuilder (version Mar 9 2015)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
...@@ -25,33 +25,33 @@ TARGET_PROPERTIES_DIALOG_EDITOR_BASE::TARGET_PROPERTIES_DIALOG_EDITOR_BASE( wxWi ...@@ -25,33 +25,33 @@ TARGET_PROPERTIES_DIALOG_EDITOR_BASE::TARGET_PROPERTIES_DIALOG_EDITOR_BASE( wxWi
fgSizer->SetFlexibleDirection( wxBOTH ); fgSizer->SetFlexibleDirection( wxBOTH );
fgSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); fgSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
m_staticTextSize = new wxStaticText( this, wxID_ANY, wxT("Size"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextSize = new wxStaticText( this, wxID_ANY, _("Size"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextSize->Wrap( -1 ); m_staticTextSize->Wrap( -1 );
fgSizer->Add( m_staticTextSize, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); fgSizer->Add( m_staticTextSize, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
m_TargetSizeCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_TargetSizeCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizer->Add( m_TargetSizeCtrl, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); fgSizer->Add( m_TargetSizeCtrl, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
m_staticTextSizeUnits = new wxStaticText( this, wxID_ANY, wxT("unit"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextSizeUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextSizeUnits->Wrap( -1 ); m_staticTextSizeUnits->Wrap( -1 );
fgSizer->Add( m_staticTextSizeUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); fgSizer->Add( m_staticTextSizeUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
m_staticTextThickness = new wxStaticText( this, wxID_ANY, wxT("Thickness"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextThickness = new wxStaticText( this, wxID_ANY, _("Thickness"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextThickness->Wrap( -1 ); m_staticTextThickness->Wrap( -1 );
fgSizer->Add( m_staticTextThickness, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); fgSizer->Add( m_staticTextThickness, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
m_TargetThicknessCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_TargetThicknessCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizer->Add( m_TargetThicknessCtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); fgSizer->Add( m_TargetThicknessCtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
m_staticTextThicknessUnits = new wxStaticText( this, wxID_ANY, wxT("unit"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextThicknessUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextThicknessUnits->Wrap( -1 ); m_staticTextThicknessUnits->Wrap( -1 );
fgSizer->Add( m_staticTextThicknessUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); fgSizer->Add( m_staticTextThicknessUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
m_staticTextShape = new wxStaticText( this, wxID_ANY, wxT("Shape"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextShape = new wxStaticText( this, wxID_ANY, _("Shape"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextShape->Wrap( -1 ); m_staticTextShape->Wrap( -1 );
fgSizer->Add( m_staticTextShape, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); fgSizer->Add( m_staticTextShape, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
wxString m_TargetShapeChoices[] = { wxT("+"), wxT("X") }; wxString m_TargetShapeChoices[] = { _("+"), _("X") };
int m_TargetShapeNChoices = sizeof( m_TargetShapeChoices ) / sizeof( wxString ); int m_TargetShapeNChoices = sizeof( m_TargetShapeChoices ) / sizeof( wxString );
m_TargetShape = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_TargetShapeNChoices, m_TargetShapeChoices, 0 ); m_TargetShape = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_TargetShapeNChoices, m_TargetShapeChoices, 0 );
m_TargetShape->SetSelection( 0 ); m_TargetShape->SetSelection( 0 );
......
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<wxFormBuilder_Project> <wxFormBuilder_Project>
<FileVersion major="1" minor="11" /> <FileVersion major="1" minor="13" />
<object class="Project" expanded="1"> <object class="Project" expanded="1">
<property name="class_decoration"></property> <property name="class_decoration"></property>
<property name="code_generation">C++</property> <property name="code_generation">C++</property>
...@@ -14,14 +14,16 @@ ...@@ -14,14 +14,16 @@
<property name="file">dialog_target_properties_base</property> <property name="file">dialog_target_properties_base</property>
<property name="first_id">1000</property> <property name="first_id">1000</property>
<property name="help_provider">none</property> <property name="help_provider">none</property>
<property name="internationalize">0</property> <property name="internationalize">1</property>
<property name="name">dialog_target_properties_base</property> <property name="name">dialog_target_properties_base</property>
<property name="namespace"></property> <property name="namespace"></property>
<property name="path">.</property> <property name="path">.</property>
<property name="precompiled_header"></property> <property name="precompiled_header"></property>
<property name="relative_path">1</property> <property name="relative_path">1</property>
<property name="skip_lua_events">1</property>
<property name="skip_php_events">1</property> <property name="skip_php_events">1</property>
<property name="skip_python_events">1</property> <property name="skip_python_events">1</property>
<property name="ui_table">UI</property>
<property name="use_enum">0</property> <property name="use_enum">0</property>
<property name="use_microsoft_bom">0</property> <property name="use_microsoft_bom">0</property>
<object class="Dialog" expanded="1"> <object class="Dialog" expanded="1">
......
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Oct 8 2012) // C++ code generated with wxFormBuilder (version Mar 9 2015)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include <wx/artprov.h> #include <wx/artprov.h>
#include <wx/xrc/xmlres.h> #include <wx/xrc/xmlres.h>
#include <wx/intl.h>
class DIALOG_SHIM; class DIALOG_SHIM;
#include "dialog_shim.h" #include "dialog_shim.h"
...@@ -57,7 +58,7 @@ class TARGET_PROPERTIES_DIALOG_EDITOR_BASE : public DIALOG_SHIM ...@@ -57,7 +58,7 @@ class TARGET_PROPERTIES_DIALOG_EDITOR_BASE : public DIALOG_SHIM
public: public:
TARGET_PROPERTIES_DIALOG_EDITOR_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Target Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); TARGET_PROPERTIES_DIALOG_EDITOR_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Target Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~TARGET_PROPERTIES_DIALOG_EDITOR_BASE(); ~TARGET_PROPERTIES_DIALOG_EDITOR_BASE();
}; };
......
...@@ -46,32 +46,26 @@ ...@@ -46,32 +46,26 @@
using namespace KIGFX; using namespace KIGFX;
using boost::optional; using boost::optional;
static TOOL_ACTION ACT_StartTuning( "pcbnew.LengthTuner.StartTuning", static TOOL_ACTION ACT_StartTuning( "pcbnew.LengthTuner.StartTuning", AS_CONTEXT, 'X',
AS_CONTEXT, 'X', _( "New Track" ), _( "Starts laying a new track." ) );
"New Track", "Starts laying a new track.");
static TOOL_ACTION ACT_EndTuning( "pcbnew.LengthTuner.EndTuning",
AS_CONTEXT, WXK_END,
"End Track", "Stops laying the current meander.");
static TOOL_ACTION ACT_Settings( "pcbnew.LengthTuner.Settings", static TOOL_ACTION ACT_EndTuning( "pcbnew.LengthTuner.EndTuning", AS_CONTEXT, WXK_END,
AS_CONTEXT, 'L', _( "End Track" ), _( "Stops laying the current meander." ) );
"Length Tuning Settings", "Sets the length tuning parameters for currently routed item.");
static TOOL_ACTION ACT_SpacingIncrease( "pcbnew.LengthTuner.SpacingIncrease", static TOOL_ACTION ACT_Settings( "pcbnew.LengthTuner.Settings", AS_CONTEXT, 'L',
AS_CONTEXT, '1', _( "Length Tuning Settings" ), _( "Sets the length tuning parameters for currently routed item." ) );
"Increase spacing", "Increase meander spacing by one step.");
static TOOL_ACTION ACT_SpacingDecrease( "pcbnew.LengthTuner.SpacingDecrease", static TOOL_ACTION ACT_SpacingIncrease( "pcbnew.LengthTuner.SpacingIncrease", AS_CONTEXT, '1',
AS_CONTEXT, '2', _( "Increase spacing" ), _( "Increase meander spacing by one step." ) );
"Decrease spacing ", "Decrease meander spacing by one step.");
static TOOL_ACTION ACT_AmplIncrease( "pcbnew.LengthTuner.AmplIncrease", static TOOL_ACTION ACT_SpacingDecrease( "pcbnew.LengthTuner.SpacingDecrease", AS_CONTEXT, '2',
AS_CONTEXT, '3', _( "Decrease spacing" ), _( "Decrease meander spacing by one step." ) );
"Increase amplitude", "Increase meander amplitude by one step.");
static TOOL_ACTION ACT_AmplDecrease( "pcbnew.LengthTuner.AmplDecrease", static TOOL_ACTION ACT_AmplIncrease( "pcbnew.LengthTuner.AmplIncrease", AS_CONTEXT, '3',
AS_CONTEXT, '4', _( "Increase amplitude" ), _( "Increase meander amplitude by one step." ) );
"Decrease amplitude", "Decrease meander amplitude by one step.");
static TOOL_ACTION ACT_AmplDecrease( "pcbnew.LengthTuner.AmplDecrease", AS_CONTEXT, '4',
_( "Decrease amplitude" ), _( "Decrease meander amplitude by one step." ) );
LENGTH_TUNER_TOOL::LENGTH_TUNER_TOOL() : LENGTH_TUNER_TOOL::LENGTH_TUNER_TOOL() :
...@@ -85,7 +79,7 @@ class TUNER_TOOL_MENU: public CONTEXT_MENU ...@@ -85,7 +79,7 @@ class TUNER_TOOL_MENU: public CONTEXT_MENU
public: public:
TUNER_TOOL_MENU( BOARD* aBoard ) TUNER_TOOL_MENU( BOARD* aBoard )
{ {
SetTitle( wxT( "Length Tuner" ) ); SetTitle( _( "Length Tuner" ) );
//Add( ACT_StartTuning ); //Add( ACT_StartTuning );
//Add( ACT_EndTuning ); //Add( ACT_EndTuning );
......
...@@ -26,7 +26,7 @@ PNS_TUNE_STATUS_POPUP::PNS_TUNE_STATUS_POPUP( PCB_EDIT_FRAME* aParent ) : ...@@ -26,7 +26,7 @@ PNS_TUNE_STATUS_POPUP::PNS_TUNE_STATUS_POPUP( PCB_EDIT_FRAME* aParent ) :
WX_STATUS_POPUP( aParent ) WX_STATUS_POPUP( aParent )
{ {
m_panel->SetBackgroundColour( wxColour( 64, 64, 64 ) ); m_panel->SetBackgroundColour( wxColour( 64, 64, 64 ) );
m_statusLine = new wxStaticText( m_panel, wxID_ANY, wxT( "Status text 1\n" ) ) ; m_statusLine = new wxStaticText( m_panel, wxID_ANY, wxEmptyString ) ;
m_topSizer->Add( m_statusLine, 1, wxALL | wxEXPAND, 5 ); m_topSizer->Add( m_statusLine, 1, wxALL | wxEXPAND, 5 );
} }
......
...@@ -57,58 +57,67 @@ using boost::optional; ...@@ -57,58 +57,67 @@ using boost::optional;
static TOOL_ACTION ACT_NewTrack( "pcbnew.InteractiveRouter.NewTrack", static TOOL_ACTION ACT_NewTrack( "pcbnew.InteractiveRouter.NewTrack",
AS_CONTEXT, 'X', AS_CONTEXT, 'X',
"New Track", "Starts laying a new track."); _( "New Track" ), _( "Starts laying a new track." ) );
static TOOL_ACTION ACT_EndTrack( "pcbnew.InteractiveRouter.EndTrack", static TOOL_ACTION ACT_EndTrack( "pcbnew.InteractiveRouter.EndTrack",
AS_CONTEXT, WXK_END, AS_CONTEXT, WXK_END,
"End Track", "Stops laying the current track."); _( "End Track" ) , _( "Stops laying the current track." ) );
static TOOL_ACTION ACT_AutoEndRoute( "pcbnew.InteractiveRouter.AutoEndRoute", static TOOL_ACTION ACT_AutoEndRoute( "pcbnew.InteractiveRouter.AutoEndRoute",
AS_CONTEXT, 'F', AS_CONTEXT, 'F',
"Auto-end Track", "Automagically finishes currently routed track." ); _( "Auto-end Track" ), _( "Automagically finishes currently routed track." ) );
static TOOL_ACTION ACT_Drag( "pcbnew.InteractiveRouter.Drag", static TOOL_ACTION ACT_Drag( "pcbnew.InteractiveRouter.Drag",
AS_CONTEXT, 'G', AS_CONTEXT, 'G',
"Drag Track/Via", "Drags a track or a via." ); _( "Drag Track/Via" ), _( "Drags a track or a via." ) );
static TOOL_ACTION ACT_PlaceThroughVia( "pcbnew.InteractiveRouter.PlaceVia", static TOOL_ACTION ACT_PlaceThroughVia( "pcbnew.InteractiveRouter.PlaceVia",
AS_CONTEXT, 'V', AS_CONTEXT, 'V',
"Place Through Via", "Adds a through-hole via at the end of currently routed track." ); _( "Place Through Via" ), _( "Adds a through-hole via at the end of currently routed track." ) );
static TOOL_ACTION ACT_PlaceBlindVia( "pcbnew.InteractiveRouter.PlaceBlindVia", static TOOL_ACTION ACT_PlaceBlindVia( "pcbnew.InteractiveRouter.PlaceBlindVia",
AS_CONTEXT, 'Z', AS_CONTEXT, 'Z',
"Place Blind/Buried Via", "Adds a blind or buried via at the end of currently routed track." ); _( "Place Blind/Buried Via" ), _( "Adds a blind or buried via at the end of currently routed track." ) );
static TOOL_ACTION ACT_PlaceMicroVia( "pcbnew.InteractiveRouter.PlaceMicroVia", static TOOL_ACTION ACT_PlaceMicroVia( "pcbnew.InteractiveRouter.PlaceMicroVia",
AS_CONTEXT, 'Q', AS_CONTEXT, 'Q',
"Place Microvia", "Adds a microvia at the end of currently routed track." ); _( "Place Microvia" ), _( "Adds a microvia at the end of currently routed track." ) );
static TOOL_ACTION ACT_CustomTrackWidth( "pcbnew.InteractiveRouter.CustomTrackWidth", static TOOL_ACTION ACT_CustomTrackWidth( "pcbnew.InteractiveRouter.CustomTrackWidth",
AS_CONTEXT, 'W', AS_CONTEXT, 'W',
"Custom Track Width", "Shows a dialog for changing the track width and via size."); _( "Custom Track Width" ), _( "Shows a dialog for changing the track width and via size." ) );
static TOOL_ACTION ACT_RouterOptions( "pcbnew.InteractiveRouter.RouterOptions", static TOOL_ACTION ACT_RouterOptions( "pcbnew.InteractiveRouter.RouterOptions",
AS_CONTEXT, 'E', AS_CONTEXT, 'E',
"Routing Options...", "Shows a dialog containing router options."); _( "Routing Options..." ), _( "Shows a dialog containing router options." ) );
static TOOL_ACTION ACT_SwitchPosture( "pcbnew.InteractiveRouter.SwitchPosture", static TOOL_ACTION ACT_SwitchPosture( "pcbnew.InteractiveRouter.SwitchPosture",
AS_CONTEXT, '/', AS_CONTEXT, '/',
"Switch Track Posture", "Switches posture of the currenly routed track."); _( "Switch Track Posture" ), _( "Switches posture of the currenly routed track." ) );
static TOOL_ACTION ACT_SetDpDimensions( "pcbnew.InteractiveRouter.SetDpDimensions", static TOOL_ACTION ACT_SetDpDimensions( "pcbnew.InteractiveRouter.SetDpDimensions",
AS_CONTEXT, 'D', AS_CONTEXT, 'D',
"Differential Pair Dimensions...", "Sets the width and gap of the currently routed differential pair."); _( "Differential Pair Dimensions..." ), _( "Sets the width and gap of the currently routed differential pair." ) );
static TOOL_ACTION ACT_SetLengthTune( "pcbnew.InteractiveRouter.LengthTunerSettings", static TOOL_ACTION ACT_SetLengthTune( "pcbnew.InteractiveRouter.LengthTunerSettings",
AS_CONTEXT, 'L', AS_CONTEXT, 'L',
"Length Tuning Settings", "Sets the length tuning parameters for currently routed item."); _( "Length Tuning Settings" ), _( "Sets the length tuning parameters for currently routed item." ) );
static TOOL_ACTION ACT_LengthTuneSpacingIncrease( "pcbnew.InteractiveRouter.LengthTunerSpacingIncrease", static TOOL_ACTION ACT_LengthTuneSpacingIncrease( "pcbnew.InteractiveRouter.LengthTunerSpacingIncrease",
AS_CONTEXT, '1', AS_CONTEXT, '1',
"Length Tuning Settings", "Sets the length tuning parameters for currently routed item."); _( "Length Tuning Settings" ), _( "Sets the length tuning parameters for currently routed item." ) );
static TOOL_ACTION ACT_LengthTuneSpacingDecrease( "pcbnew.InteractiveRouter.LengthTunerSpacingDecrease", static TOOL_ACTION ACT_LengthTuneSpacingDecrease( "pcbnew.InteractiveRouter.LengthTunerSpacingDecrease",
AS_CONTEXT, '2', AS_CONTEXT, '2',
"Length Tuning Settings", "Sets the length tuning parameters for currently routed item."); _( "Length Tuning Settings" ), _( "Sets the length tuning parameters for currently routed item." ) );
static TOOL_ACTION ACT_SetLengthTuneAmplIncrease( "pcbnew.InteractiveRouter.LengthTunerAmplIncrease", static TOOL_ACTION ACT_SetLengthTuneAmplIncrease( "pcbnew.InteractiveRouter.LengthTunerAmplIncrease",
AS_CONTEXT, '3', AS_CONTEXT, '3',
"Length Tuning Settings", "Sets the length tuning parameters for currently routed item."); _( "Length Tuning Settings" ), _( "Sets the length tuning parameters for currently routed item." ) );
static TOOL_ACTION ACT_SetLengthTuneAmplDecrease( "pcbnew.InteractiveRouter.LengthTunerAmplDecrease", static TOOL_ACTION ACT_SetLengthTuneAmplDecrease( "pcbnew.InteractiveRouter.LengthTunerAmplDecrease",
AS_CONTEXT, '4', AS_CONTEXT, '4',
"Length Tuning Settings", "Sets the length tuning parameters for currently routed item."); _( "Length Tuning Settings" ), _( "Sets the length tuning parameters for currently routed item." ) );
ROUTER_TOOL::ROUTER_TOOL() : ROUTER_TOOL::ROUTER_TOOL() :
...@@ -239,7 +248,7 @@ class ROUTER_TOOL_MENU: public CONTEXT_MENU ...@@ -239,7 +248,7 @@ class ROUTER_TOOL_MENU: public CONTEXT_MENU
public: public:
ROUTER_TOOL_MENU( BOARD* aBoard, PNS_ROUTER_MODE aMode ) ROUTER_TOOL_MENU( BOARD* aBoard, PNS_ROUTER_MODE aMode )
{ {
SetTitle( wxT( "Interactive Router" ) ); SetTitle( _( "Interactive Router" ) );
Add( ACT_NewTrack ); Add( ACT_NewTrack );
Add( ACT_EndTrack ); Add( ACT_EndTrack );
// Add( ACT_AutoEndRoute ); // fixme: not implemented yet. Sorry. // Add( ACT_AutoEndRoute ); // fixme: not implemented yet. Sorry.
...@@ -253,7 +262,7 @@ public: ...@@ -253,7 +262,7 @@ public:
CONTEXT_TRACK_WIDTH_MENU* trackMenu = new CONTEXT_TRACK_WIDTH_MENU; CONTEXT_TRACK_WIDTH_MENU* trackMenu = new CONTEXT_TRACK_WIDTH_MENU;
trackMenu->SetBoard( aBoard ); trackMenu->SetBoard( aBoard );
AppendSubMenu( trackMenu, wxT( "Select Track Width" ) ); AppendSubMenu( trackMenu, _( "Select Track Width" ) );
Add( ACT_CustomTrackWidth ); Add( ACT_CustomTrackWidth );
......
...@@ -52,37 +52,35 @@ ...@@ -52,37 +52,35 @@
using namespace KIGFX; using namespace KIGFX;
using boost::optional; using boost::optional;
static TOOL_ACTION ACT_NewTrack( "pcbnew.InteractiveRouter.NewTrack", static TOOL_ACTION ACT_NewTrack( "pcbnew.InteractiveRouter.NewTrack", AS_CONTEXT, 'X',
AS_CONTEXT, 'X', _( "New Track" ), _( "Starts laying a new track." ) );
"New Track", "Starts laying a new track.");
static TOOL_ACTION ACT_EndTrack( "pcbnew.InteractiveRouter.EndTrack", static TOOL_ACTION ACT_EndTrack( "pcbnew.InteractiveRouter.EndTrack", AS_CONTEXT, WXK_END,
AS_CONTEXT, WXK_END, _( "End Track" ), _( "Stops laying the current track." ) );
"End Track", "Stops laying the current track.");
static TOOL_ACTION ACT_AutoEndRoute( "pcbnew.InteractiveRouter.AutoEndRoute", static TOOL_ACTION ACT_AutoEndRoute( "pcbnew.InteractiveRouter.AutoEndRoute", AS_CONTEXT, 'F',
AS_CONTEXT, 'F', _( "Auto-end Track" ), _( "Automagically finishes currently routed track." ) );
"Auto-end Track", "Automagically finishes currently routed track." );
static TOOL_ACTION ACT_Drag( "pcbnew.InteractiveRouter.Drag", static TOOL_ACTION ACT_Drag( "pcbnew.InteractiveRouter.Drag", AS_CONTEXT, 'G',
AS_CONTEXT, 'G', _( "Drag Track/Via" ), _( "Drags a track or a via." ) );
"Drag Track/Via", "Drags a track or a via." );
static TOOL_ACTION ACT_PlaceThroughVia( "pcbnew.InteractiveRouter.PlaceVia", static TOOL_ACTION ACT_PlaceThroughVia( "pcbnew.InteractiveRouter.PlaceVia", AS_CONTEXT, 'V',
AS_CONTEXT, 'V', _( "Place Through Via" ), _( "Adds a through-hole via at the end of currently routed track." ) );
"Place Through Via", "Adds a through-hole via at the end of currently routed track." );
static TOOL_ACTION ACT_PlaceBlindVia( "pcbnew.InteractiveRouter.PlaceBlindVia", static TOOL_ACTION ACT_PlaceBlindVia( "pcbnew.InteractiveRouter.PlaceBlindVia", AS_CONTEXT, 'Z',
AS_CONTEXT, 'Z', _( "Place Blind/Buried Via" ), _( "Adds a blind or buried via at the end of currently routed track." ) );
"Place Blind/Buried Via", "Adds a blind or buried via at the end of currently routed track." );
static TOOL_ACTION ACT_PlaceMicroVia( "pcbnew.InteractiveRouter.PlaceMicroVia", static TOOL_ACTION ACT_PlaceMicroVia( "pcbnew.InteractiveRouter.PlaceMicroVia", AS_CONTEXT, 'Q',
AS_CONTEXT, 'Q', _( "Place Microvia" ), _( "Adds a microvia at the end of currently routed track." ) );
"Place Microvia", "Adds a microvia at the end of currently routed track." );
static TOOL_ACTION ACT_CustomTrackWidth( "pcbnew.InteractiveRouter.CustomTrackWidth", static TOOL_ACTION ACT_CustomTrackWidth( "pcbnew.InteractiveRouter.CustomTrackWidth", AS_CONTEXT, 'W',
AS_CONTEXT, 'W', _( "Custom Track Width" ), _( "Shows a dialog for changing the track width and via size." ) );
"Custom Track Width", "Shows a dialog for changing the track width and via size.");
static TOOL_ACTION ACT_SwitchPosture( "pcbnew.InteractiveRouter.SwitchPosture", static TOOL_ACTION ACT_SwitchPosture( "pcbnew.InteractiveRouter.SwitchPosture", AS_CONTEXT, '/',
AS_CONTEXT, '/', _( "Switch Track Posture" ), _( "Switches posture of the currenly routed track." ) );
"Switch Track Posture", "Switches posture of the currenly routed track.");
static TOOL_ACTION ACT_SetDpDimensions( "pcbnew.InteractiveRouter.SetDpDimensions", AS_CONTEXT, 'D',
static TOOL_ACTION ACT_SetDpDimensions( "pcbnew.InteractiveRouter.SetDpDimensions", _( "Differential Pair Dimensions..." ), _( "Sets the width and gap of the currently routed differential pair." ) );
AS_CONTEXT, 'D',
"Differential Pair Dimensions...", "Sets the width and gap of the currently routed differential pair.");
ROUTER_TOOL::ROUTER_TOOL() : ROUTER_TOOL::ROUTER_TOOL() :
...@@ -131,7 +129,7 @@ public: ...@@ -131,7 +129,7 @@ public:
for( unsigned i = 0; i < bds.m_ViasDimensionsList.size(); i++ ) for( unsigned i = 0; i < bds.m_ViasDimensionsList.size(); i++ )
{ {
msg = _("Via "); msg = _( "Via " );
msg << StringFromValue( g_UserUnit, bds.m_ViasDimensionsList[i].m_Diameter, true ); msg << StringFromValue( g_UserUnit, bds.m_ViasDimensionsList[i].m_Diameter, true );
wxString drill = StringFromValue( g_UserUnit, wxString drill = StringFromValue( g_UserUnit,
bds.m_ViasDimensionsList[i].m_Drill, bds.m_ViasDimensionsList[i].m_Drill,
...@@ -139,11 +137,11 @@ public: ...@@ -139,11 +137,11 @@ public:
if( bds.m_ViasDimensionsList[i].m_Drill <= 0 ) if( bds.m_ViasDimensionsList[i].m_Drill <= 0 )
{ {
msg << _ (", drill: default"); msg << _( ", drill: default" );
} }
else else
{ {
msg << _ (", drill: ") << drill; msg << _( ", drill: " ) << drill;
} }
if( i == 0 ) if( i == 0 )
...@@ -212,7 +210,7 @@ class ROUTER_TOOL_MENU: public CONTEXT_MENU ...@@ -212,7 +210,7 @@ class ROUTER_TOOL_MENU: public CONTEXT_MENU
public: public:
ROUTER_TOOL_MENU( BOARD* aBoard, PNS_ROUTER_MODE aMode ) ROUTER_TOOL_MENU( BOARD* aBoard, PNS_ROUTER_MODE aMode )
{ {
SetTitle( wxT( "Interactive Router" ) ); SetTitle( _( "Interactive Router" ) );
Add( ACT_NewTrack ); Add( ACT_NewTrack );
Add( ACT_EndTrack ); Add( ACT_EndTrack );
// Add( ACT_AutoEndRoute ); // fixme: not implemented yet. Sorry. // Add( ACT_AutoEndRoute ); // fixme: not implemented yet. Sorry.
...@@ -226,7 +224,7 @@ public: ...@@ -226,7 +224,7 @@ public:
CONTEXT_TRACK_WIDTH_MENU* trackMenu = new CONTEXT_TRACK_WIDTH_MENU; CONTEXT_TRACK_WIDTH_MENU* trackMenu = new CONTEXT_TRACK_WIDTH_MENU;
trackMenu->SetBoard( aBoard ); trackMenu->SetBoard( aBoard );
AppendSubMenu( trackMenu, wxT( "Select Track Width" ) ); AppendSubMenu( trackMenu, _( "Select Track Width" ) );
Add( ACT_CustomTrackWidth ); Add( ACT_CustomTrackWidth );
...@@ -241,7 +239,6 @@ public: ...@@ -241,7 +239,6 @@ public:
ROUTER_TOOL::~ROUTER_TOOL() ROUTER_TOOL::~ROUTER_TOOL()
{ {
} }
...@@ -452,7 +449,7 @@ bool ROUTER_TOOL::prepareInteractive() ...@@ -452,7 +449,7 @@ bool ROUTER_TOOL::prepareInteractive()
if ( !m_router->StartRouting( m_startSnapPoint, m_startItem, routingLayer ) ) if ( !m_router->StartRouting( m_startSnapPoint, m_startItem, routingLayer ) )
{ {
wxMessageBox ( m_router->FailureReason(), _("Error") ); wxMessageBox ( m_router->FailureReason(), _( "Error" ) );
highlightNet ( false ); highlightNet ( false );
return false; return false;
} }
......
This diff is collapsed.
...@@ -73,7 +73,7 @@ bool PCB_EDITOR_CONTROL::Init() ...@@ -73,7 +73,7 @@ bool PCB_EDITOR_CONTROL::Init()
if( selTool ) if( selTool )
{ {
selTool->AddSubMenu( new ZONE_CONTEXT_MENU, wxT( "Zones" ), selTool->AddSubMenu( new ZONE_CONTEXT_MENU, _( "Zones" ),
SELECTION_CONDITIONS::OnlyType( PCB_ZONE_AREA_T ) ); SELECTION_CONDITIONS::OnlyType( PCB_ZONE_AREA_T ) );
} }
......
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