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 )
int id = m_actionId + aAction.GetId();
wxMenuItem* item = new wxMenuItem( this, id,
wxString( aAction.GetMenuItem().c_str(), wxConvUTF8 ),
wxString( aAction.GetDescription().c_str(), wxConvUTF8 ), wxITEM_NORMAL );
aAction.GetMenuItem(), aAction.GetDescription(), wxITEM_NORMAL );
if( aAction.HasHotKey() )
{
......
......@@ -45,8 +45,8 @@ class TOOL_ACTION
{
public:
TOOL_ACTION( const std::string& aName, TOOL_ACTION_SCOPE aScope = AS_CONTEXT,
int aDefaultHotKey = 0, const std::string& aMenuItem = std::string( "" ),
const std::string& aMenuDesc = std::string( "" ), TOOL_ACTION_FLAGS aFlags = AF_NONE ) :
int aDefaultHotKey = 0, const wxString aMenuItem = wxEmptyString,
const wxString& aMenuDesc = wxEmptyString, TOOL_ACTION_FLAGS aFlags = AF_NONE ) :
m_name( aName ), m_scope( aScope ), m_defaultHotKey( aDefaultHotKey ),
m_currentHotKey( aDefaultHotKey ), m_menuItem( aMenuItem ),
m_menuDescription( aMenuDesc ), m_id( -1 ), m_flags( aFlags )
......@@ -154,22 +154,22 @@ public:
return TOOL_EVENT( TC_COMMAND, TA_ACTION, m_name, m_scope );
}
const std::string& GetMenuItem() const
const wxString& GetMenuItem() const
{
return m_menuItem;
}
void SetMenuItem( const std::string& aItem )
void SetMenuItem( const wxString& aItem )
{
m_menuItem = aItem;
}
const std::string& GetDescription() const
const wxString& GetDescription() const
{
return m_menuDescription;
}
void SetDescription( const std::string& aDescription )
void SetDescription( const wxString& aDescription )
{
m_menuDescription = aDescription;
}
......@@ -218,10 +218,10 @@ private:
int m_currentHotKey;
/// Menu entry text
std::string m_menuItem;
wxString m_menuItem;
/// Pop-up help
std::string m_menuDescription;
wxString m_menuDescription;
// Icon for menu entry
// 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/
//
// PLEASE DO "NOT" EDIT THIS FILE!
......@@ -25,33 +25,33 @@ TARGET_PROPERTIES_DIALOG_EDITOR_BASE::TARGET_PROPERTIES_DIALOG_EDITOR_BASE( wxWi
fgSizer->SetFlexibleDirection( wxBOTH );
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 );
fgSizer->Add( m_staticTextSize, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
m_TargetSizeCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
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 );
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 );
fgSizer->Add( m_staticTextThickness, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
m_TargetThicknessCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
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 );
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 );
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 );
m_TargetShape = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_TargetShapeNChoices, m_TargetShapeChoices, 0 );
m_TargetShape->SetSelection( 0 );
......
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<wxFormBuilder_Project>
<FileVersion major="1" minor="11" />
<FileVersion major="1" minor="13" />
<object class="Project" expanded="1">
<property name="class_decoration"></property>
<property name="code_generation">C++</property>
......@@ -14,14 +14,16 @@
<property name="file">dialog_target_properties_base</property>
<property name="first_id">1000</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="namespace"></property>
<property name="path">.</property>
<property name="precompiled_header"></property>
<property name="relative_path">1</property>
<property name="skip_lua_events">1</property>
<property name="skip_php_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_microsoft_bom">0</property>
<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/
//
// PLEASE DO "NOT" EDIT THIS FILE!
......@@ -10,6 +10,7 @@
#include <wx/artprov.h>
#include <wx/xrc/xmlres.h>
#include <wx/intl.h>
class DIALOG_SHIM;
#include "dialog_shim.h"
......@@ -57,7 +58,7 @@ class TARGET_PROPERTIES_DIALOG_EDITOR_BASE : public DIALOG_SHIM
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();
};
......
......@@ -46,32 +46,26 @@
using namespace KIGFX;
using boost::optional;
static TOOL_ACTION ACT_StartTuning( "pcbnew.LengthTuner.StartTuning",
AS_CONTEXT, 'X',
"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_StartTuning( "pcbnew.LengthTuner.StartTuning", AS_CONTEXT, 'X',
_( "New Track" ), _( "Starts laying a new track." ) );
static TOOL_ACTION ACT_Settings( "pcbnew.LengthTuner.Settings",
AS_CONTEXT, 'L',
"Length Tuning Settings", "Sets the length tuning parameters for currently routed item.");
static TOOL_ACTION ACT_EndTuning( "pcbnew.LengthTuner.EndTuning", AS_CONTEXT, WXK_END,
_( "End Track" ), _( "Stops laying the current meander." ) );
static TOOL_ACTION ACT_SpacingIncrease( "pcbnew.LengthTuner.SpacingIncrease",
AS_CONTEXT, '1',
"Increase spacing", "Increase meander spacing by one step.");
static TOOL_ACTION ACT_Settings( "pcbnew.LengthTuner.Settings", AS_CONTEXT, 'L',
_( "Length Tuning Settings" ), _( "Sets the length tuning parameters for currently routed item." ) );
static TOOL_ACTION ACT_SpacingDecrease( "pcbnew.LengthTuner.SpacingDecrease",
AS_CONTEXT, '2',
"Decrease spacing ", "Decrease meander spacing by one step.");
static TOOL_ACTION ACT_SpacingIncrease( "pcbnew.LengthTuner.SpacingIncrease", AS_CONTEXT, '1',
_( "Increase spacing" ), _( "Increase meander spacing by one step." ) );
static TOOL_ACTION ACT_AmplIncrease( "pcbnew.LengthTuner.AmplIncrease",
AS_CONTEXT, '3',
"Increase amplitude", "Increase meander amplitude by one step.");
static TOOL_ACTION ACT_SpacingDecrease( "pcbnew.LengthTuner.SpacingDecrease", AS_CONTEXT, '2',
_( "Decrease spacing" ), _( "Decrease meander spacing by one step." ) );
static TOOL_ACTION ACT_AmplDecrease( "pcbnew.LengthTuner.AmplDecrease",
AS_CONTEXT, '4',
"Decrease amplitude", "Decrease meander amplitude by one step.");
static TOOL_ACTION ACT_AmplIncrease( "pcbnew.LengthTuner.AmplIncrease", AS_CONTEXT, '3',
_( "Increase amplitude" ), _( "Increase 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() :
......@@ -85,7 +79,7 @@ class TUNER_TOOL_MENU: public CONTEXT_MENU
public:
TUNER_TOOL_MENU( BOARD* aBoard )
{
SetTitle( wxT( "Length Tuner" ) );
SetTitle( _( "Length Tuner" ) );
//Add( ACT_StartTuning );
//Add( ACT_EndTuning );
......
......@@ -26,7 +26,7 @@ PNS_TUNE_STATUS_POPUP::PNS_TUNE_STATUS_POPUP( PCB_EDIT_FRAME* aParent ) :
WX_STATUS_POPUP( aParent )
{
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 );
}
......
......@@ -56,59 +56,68 @@ using namespace KIGFX;
using boost::optional;
static TOOL_ACTION ACT_NewTrack( "pcbnew.InteractiveRouter.NewTrack",
AS_CONTEXT, 'X',
"New Track", "Starts laying a new track.");
AS_CONTEXT, 'X',
_( "New Track" ), _( "Starts laying a new track." ) );
static TOOL_ACTION ACT_EndTrack( "pcbnew.InteractiveRouter.EndTrack",
AS_CONTEXT, WXK_END,
"End Track", "Stops laying the current track.");
AS_CONTEXT, WXK_END,
_( "End Track" ) , _( "Stops laying the current track." ) );
static TOOL_ACTION ACT_AutoEndRoute( "pcbnew.InteractiveRouter.AutoEndRoute",
AS_CONTEXT, 'F',
"Auto-end Track", "Automagically finishes currently routed track." );
AS_CONTEXT, 'F',
_( "Auto-end Track" ), _( "Automagically finishes currently routed track." ) );
static TOOL_ACTION ACT_Drag( "pcbnew.InteractiveRouter.Drag",
AS_CONTEXT, 'G',
"Drag Track/Via", "Drags a track or a via." );
AS_CONTEXT, 'G',
_( "Drag Track/Via" ), _( "Drags a track or a via." ) );
static TOOL_ACTION ACT_PlaceThroughVia( "pcbnew.InteractiveRouter.PlaceVia",
AS_CONTEXT, 'V',
"Place Through Via", "Adds a through-hole via at the end of currently routed track." );
AS_CONTEXT, 'V',
_( "Place Through Via" ), _( "Adds a through-hole via at the end of currently routed track." ) );
static TOOL_ACTION ACT_PlaceBlindVia( "pcbnew.InteractiveRouter.PlaceBlindVia",
AS_CONTEXT, 'Z',
"Place Blind/Buried Via", "Adds a blind or buried via at the end of currently routed track." );
AS_CONTEXT, 'Z',
_( "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",
AS_CONTEXT, 'Q',
"Place Microvia", "Adds a microvia at the end of currently routed track." );
AS_CONTEXT, 'Q',
_( "Place Microvia" ), _( "Adds a microvia at the end of currently routed track." ) );
static TOOL_ACTION ACT_CustomTrackWidth( "pcbnew.InteractiveRouter.CustomTrackWidth",
AS_CONTEXT, 'W',
"Custom Track Width", "Shows a dialog for changing the track width and via size.");
AS_CONTEXT, 'W',
_( "Custom Track Width" ), _( "Shows a dialog for changing the track width and via size." ) );
static TOOL_ACTION ACT_RouterOptions( "pcbnew.InteractiveRouter.RouterOptions",
AS_CONTEXT, 'E',
"Routing Options...", "Shows a dialog containing router options.");
AS_CONTEXT, 'E',
_( "Routing Options..." ), _( "Shows a dialog containing router options." ) );
static TOOL_ACTION ACT_SwitchPosture( "pcbnew.InteractiveRouter.SwitchPosture",
AS_CONTEXT, '/',
"Switch Track Posture", "Switches posture of the currenly routed track.");
AS_CONTEXT, '/',
_( "Switch Track Posture" ), _( "Switches posture of the currenly routed track." ) );
static TOOL_ACTION ACT_SetDpDimensions( "pcbnew.InteractiveRouter.SetDpDimensions",
AS_CONTEXT, 'D',
"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." ) );
static TOOL_ACTION ACT_SetLengthTune( "pcbnew.InteractiveRouter.LengthTunerSettings",
AS_CONTEXT, 'L',
"Length Tuning Settings", "Sets the length tuning parameters for currently routed item.");
AS_CONTEXT, 'L',
_( "Length Tuning Settings" ), _( "Sets the length tuning parameters for currently routed item." ) );
static TOOL_ACTION ACT_LengthTuneSpacingIncrease( "pcbnew.InteractiveRouter.LengthTunerSpacingIncrease",
AS_CONTEXT, '1',
"Length Tuning Settings", "Sets the length tuning parameters for currently routed item.");
AS_CONTEXT, '1',
_( "Length Tuning Settings" ), _( "Sets the length tuning parameters for currently routed item." ) );
static TOOL_ACTION ACT_LengthTuneSpacingDecrease( "pcbnew.InteractiveRouter.LengthTunerSpacingDecrease",
AS_CONTEXT, '2',
"Length Tuning Settings", "Sets the length tuning parameters for currently routed item.");
AS_CONTEXT, '2',
_( "Length Tuning Settings" ), _( "Sets the length tuning parameters for currently routed item." ) );
static TOOL_ACTION ACT_SetLengthTuneAmplIncrease( "pcbnew.InteractiveRouter.LengthTunerAmplIncrease",
AS_CONTEXT, '3',
"Length Tuning Settings", "Sets the length tuning parameters for currently routed item.");
AS_CONTEXT, '3',
_( "Length Tuning Settings" ), _( "Sets the length tuning parameters for currently routed item." ) );
static TOOL_ACTION ACT_SetLengthTuneAmplDecrease( "pcbnew.InteractiveRouter.LengthTunerAmplDecrease",
AS_CONTEXT, '4',
"Length Tuning Settings", "Sets the length tuning parameters for currently routed item.");
AS_CONTEXT, '4',
_( "Length Tuning Settings" ), _( "Sets the length tuning parameters for currently routed item." ) );
ROUTER_TOOL::ROUTER_TOOL() :
......@@ -239,7 +248,7 @@ class ROUTER_TOOL_MENU: public CONTEXT_MENU
public:
ROUTER_TOOL_MENU( BOARD* aBoard, PNS_ROUTER_MODE aMode )
{
SetTitle( wxT( "Interactive Router" ) );
SetTitle( _( "Interactive Router" ) );
Add( ACT_NewTrack );
Add( ACT_EndTrack );
// Add( ACT_AutoEndRoute ); // fixme: not implemented yet. Sorry.
......@@ -253,7 +262,7 @@ public:
CONTEXT_TRACK_WIDTH_MENU* trackMenu = new CONTEXT_TRACK_WIDTH_MENU;
trackMenu->SetBoard( aBoard );
AppendSubMenu( trackMenu, wxT( "Select Track Width" ) );
AppendSubMenu( trackMenu, _( "Select Track Width" ) );
Add( ACT_CustomTrackWidth );
......
......@@ -52,37 +52,35 @@
using namespace KIGFX;
using boost::optional;
static TOOL_ACTION ACT_NewTrack( "pcbnew.InteractiveRouter.NewTrack",
AS_CONTEXT, 'X',
"New Track", "Starts laying a new track.");
static TOOL_ACTION ACT_EndTrack( "pcbnew.InteractiveRouter.EndTrack",
AS_CONTEXT, WXK_END,
"End Track", "Stops laying the current track.");
static TOOL_ACTION ACT_AutoEndRoute( "pcbnew.InteractiveRouter.AutoEndRoute",
AS_CONTEXT, 'F',
"Auto-end Track", "Automagically finishes currently routed track." );
static TOOL_ACTION ACT_Drag( "pcbnew.InteractiveRouter.Drag",
AS_CONTEXT, 'G',
"Drag Track/Via", "Drags a track or a via." );
static TOOL_ACTION ACT_PlaceThroughVia( "pcbnew.InteractiveRouter.PlaceVia",
AS_CONTEXT, 'V',
"Place Through Via", "Adds a through-hole via at the end of currently routed track." );
static TOOL_ACTION ACT_PlaceBlindVia( "pcbnew.InteractiveRouter.PlaceBlindVia",
AS_CONTEXT, 'Z',
"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",
AS_CONTEXT, 'Q',
"Place Microvia", "Adds a microvia at the end of currently routed track." );
static TOOL_ACTION ACT_CustomTrackWidth( "pcbnew.InteractiveRouter.CustomTrackWidth",
AS_CONTEXT, 'W',
"Custom Track Width", "Shows a dialog for changing the track width and via size.");
static TOOL_ACTION ACT_SwitchPosture( "pcbnew.InteractiveRouter.SwitchPosture",
AS_CONTEXT, '/',
"Switch Track Posture", "Switches posture of the currenly routed track.");
static TOOL_ACTION ACT_SetDpDimensions( "pcbnew.InteractiveRouter.SetDpDimensions",
AS_CONTEXT, 'D',
"Differential Pair Dimensions...", "Sets the width and gap of the currently routed differential pair.");
static TOOL_ACTION ACT_NewTrack( "pcbnew.InteractiveRouter.NewTrack", AS_CONTEXT, 'X',
_( "New Track" ), _( "Starts laying a new track." ) );
static TOOL_ACTION ACT_EndTrack( "pcbnew.InteractiveRouter.EndTrack", AS_CONTEXT, WXK_END,
_( "End Track" ), _( "Stops laying the current track." ) );
static TOOL_ACTION ACT_AutoEndRoute( "pcbnew.InteractiveRouter.AutoEndRoute", AS_CONTEXT, 'F',
_( "Auto-end Track" ), _( "Automagically finishes currently routed track." ) );
static TOOL_ACTION ACT_Drag( "pcbnew.InteractiveRouter.Drag", AS_CONTEXT, 'G',
_( "Drag Track/Via" ), _( "Drags a track or a via." ) );
static TOOL_ACTION ACT_PlaceThroughVia( "pcbnew.InteractiveRouter.PlaceVia", AS_CONTEXT, 'V',
_( "Place Through Via" ), _( "Adds a through-hole via at the end of currently routed track." ) );
static TOOL_ACTION ACT_PlaceBlindVia( "pcbnew.InteractiveRouter.PlaceBlindVia", AS_CONTEXT, 'Z',
_( "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", AS_CONTEXT, 'Q',
_( "Place Microvia" ), _( "Adds a microvia at the end of currently routed track." ) );
static TOOL_ACTION ACT_CustomTrackWidth( "pcbnew.InteractiveRouter.CustomTrackWidth", AS_CONTEXT, 'W',
_( "Custom Track Width" ), _( "Shows a dialog for changing the track width and via size." ) );
static TOOL_ACTION ACT_SwitchPosture( "pcbnew.InteractiveRouter.SwitchPosture", AS_CONTEXT, '/',
_( "Switch Track Posture" ), _( "Switches posture of the currenly routed track." ) );
static TOOL_ACTION ACT_SetDpDimensions( "pcbnew.InteractiveRouter.SetDpDimensions", AS_CONTEXT, 'D',
_( "Differential Pair Dimensions..." ), _( "Sets the width and gap of the currently routed differential pair." ) );
ROUTER_TOOL::ROUTER_TOOL() :
......@@ -131,7 +129,7 @@ public:
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 );
wxString drill = StringFromValue( g_UserUnit,
bds.m_ViasDimensionsList[i].m_Drill,
......@@ -139,11 +137,11 @@ public:
if( bds.m_ViasDimensionsList[i].m_Drill <= 0 )
{
msg << _ (", drill: default");
msg << _( ", drill: default" );
}
else
{
msg << _ (", drill: ") << drill;
msg << _( ", drill: " ) << drill;
}
if( i == 0 )
......@@ -212,7 +210,7 @@ class ROUTER_TOOL_MENU: public CONTEXT_MENU
public:
ROUTER_TOOL_MENU( BOARD* aBoard, PNS_ROUTER_MODE aMode )
{
SetTitle( wxT( "Interactive Router" ) );
SetTitle( _( "Interactive Router" ) );
Add( ACT_NewTrack );
Add( ACT_EndTrack );
// Add( ACT_AutoEndRoute ); // fixme: not implemented yet. Sorry.
......@@ -226,7 +224,7 @@ public:
CONTEXT_TRACK_WIDTH_MENU* trackMenu = new CONTEXT_TRACK_WIDTH_MENU;
trackMenu->SetBoard( aBoard );
AppendSubMenu( trackMenu, wxT( "Select Track Width" ) );
AppendSubMenu( trackMenu, _( "Select Track Width" ) );
Add( ACT_CustomTrackWidth );
......@@ -241,7 +239,6 @@ public:
ROUTER_TOOL::~ROUTER_TOOL()
{
}
......@@ -452,7 +449,7 @@ bool ROUTER_TOOL::prepareInteractive()
if ( !m_router->StartRouting( m_startSnapPoint, m_startItem, routingLayer ) )
{
wxMessageBox ( m_router->FailureReason(), _("Error") );
wxMessageBox ( m_router->FailureReason(), _( "Error" ) );
highlightNet ( false );
return false;
}
......
......@@ -50,15 +50,15 @@ TOOL_ACTION COMMON_ACTIONS::selectionClear( "pcbnew.InteractiveSelection.Clear",
TOOL_ACTION COMMON_ACTIONS::selectConnection( "pcbnew.InteractiveSelection.SelectConnection",
AS_GLOBAL, 0,
"copper connection", "Selects whole copper connection." );
_( "copper connection" ), _( "Selects whole copper connection." ) );
TOOL_ACTION COMMON_ACTIONS::selectNet( "pcbnew.InteractiveSelection.SelectNet",
AS_GLOBAL, 0,
"whole net", "Selects all tracks & vias belonging to the same net." );
_( "whole net" ), _( "Selects all tracks & vias belonging to the same net." ) );
TOOL_ACTION COMMON_ACTIONS::find( "pcbnew.InteractiveSelection.Find",
AS_GLOBAL, 0, // it is handled by wxWidgets hotkey system
"Find an item", "Searches the document for an item" );
_( "Find an item" ), _( "Searches the document for an item" ) );
TOOL_ACTION COMMON_ACTIONS::findDummy( "pcbnew.Find.Dummy", // only block the hotkey
AS_GLOBAL, MD_CTRL + int( 'F' ) );
......@@ -69,89 +69,89 @@ TOOL_ACTION COMMON_ACTIONS::findMove( "pcbnew.InteractiveSelection.FindMove",
// Edit tool actions
TOOL_ACTION COMMON_ACTIONS::editFootprintInFpEditor( "pcbnew.InteractiveEdit.editFootprintInFpEditor",
AS_CONTEXT, MD_CTRL + 'E',
"Open in Footprint Editor",
"Opens the selected footprint in the Footprint Editor" );
_( "Open in Footprint Editor" ),
_( "Opens the selected footprint in the Footprint Editor" ) );
TOOL_ACTION COMMON_ACTIONS::copyPadToSettings ( "pcbnew.InteractiveEdit.copyPadToSettings",
AS_CONTEXT, 0,
"Copy pad settings to Current Settings",
"Copies the properties of selected pad to the current template pad settings." );
_( "Copy pad settings to Current Settings" ),
_( "Copies the properties of selected pad to the current template pad settings." ) );
TOOL_ACTION COMMON_ACTIONS::copySettingsToPads ( "pcbnew.InteractiveEdit.copySettingsToPads",
AS_CONTEXT, 0,
"Copy Current Settings to pads",
"Copies the current template pad settings to the selected pad(s)." );
_( "Copy Current Settings to pads" ),
_( "Copies the current template pad settings to the selected pad(s)." ) );
TOOL_ACTION COMMON_ACTIONS::globalEditPads ( "pcbnew.InteractiveEdit.globalPadEdit",
AS_CONTEXT, 0,
"Global Pad Edition",
"Changes pad properties globally." );
_( "Global Pad Edition" ),
_( "Changes pad properties globally." ) );
TOOL_ACTION COMMON_ACTIONS::editActivate( "pcbnew.InteractiveEdit",
AS_GLOBAL, 'M',
"Move", "Moves the selected item(s)", AF_ACTIVATE );
_( "Move" ), _( "Moves the selected item(s)" ), AF_ACTIVATE );
TOOL_ACTION COMMON_ACTIONS::duplicate( "pcbnew.InteractiveEdit.duplicate",
AS_GLOBAL, MD_CTRL + int( 'D' ),
"Duplicate", "Duplicates the selected item(s)" );
_( "Duplicate" ), _( "Duplicates the selected item(s)" ) );
TOOL_ACTION COMMON_ACTIONS::duplicateIncrement( "pcbnew.InteractiveEdit.duplicateIncrementPads",
AS_GLOBAL, MD_CTRL + MD_SHIFT + int( 'D' ),
"Duplicate", "Duplicates the selected item(s), incrementing pad numbers" );
_( "Duplicate" ), _( "Duplicates the selected item(s), incrementing pad numbers" ) );
TOOL_ACTION COMMON_ACTIONS::moveExact( "pcbnew.InteractiveEdit.moveExact",
AS_GLOBAL, MD_CTRL + int( 'M' ),
"Move Exactly...", "Moves the selected item(s) by an exact amount" );
_( "Move Exactly..." ), _( "Moves the selected item(s) by an exact amount" ) );
TOOL_ACTION COMMON_ACTIONS::createArray( "pcbnew.InteractiveEdit.createArray",
AS_GLOBAL, MD_CTRL + int( 'N' ),
"Create array", "Create array", AF_ACTIVATE );
_( "Create array" ), _( "Create array" ), AF_ACTIVATE );
TOOL_ACTION COMMON_ACTIONS::rotate( "pcbnew.InteractiveEdit.rotate",
AS_GLOBAL, 'R',
"Rotate", "Rotates selected item(s)" );
_( "Rotate" ), _( "Rotates selected item(s)" ) );
TOOL_ACTION COMMON_ACTIONS::flip( "pcbnew.InteractiveEdit.flip",
AS_GLOBAL, 'F',
"Flip", "Flips selected item(s)" );
_( "Flip" ), _( "Flips selected item(s)" ) );
TOOL_ACTION COMMON_ACTIONS::remove( "pcbnew.InteractiveEdit.remove",
AS_GLOBAL, WXK_DELETE,
"Remove", "Deletes selected item(s)" );
_( "Remove" ), _( "Deletes selected item(s)" ) );
TOOL_ACTION COMMON_ACTIONS::properties( "pcbnew.InteractiveEdit.properties",
AS_GLOBAL, 'E',
"Properties...", "Displays properties window" );
_( "Properties..." ), _( "Displays properties window" ) );
// Drawing tool actions
TOOL_ACTION COMMON_ACTIONS::drawLine( "pcbnew.InteractiveDrawing.line",
AS_GLOBAL, 0,
"Draw a line", "Draw a line", AF_ACTIVATE );
_( "Draw a line" ), _( "Draw a line" ), AF_ACTIVATE );
TOOL_ACTION COMMON_ACTIONS::drawCircle( "pcbnew.InteractiveDrawing.circle",
AS_GLOBAL, 0,
"Draw a circle", "Draw a circle", AF_ACTIVATE );
_( "Draw a circle" ), _( "Draw a circle" ), AF_ACTIVATE );
TOOL_ACTION COMMON_ACTIONS::drawArc( "pcbnew.InteractiveDrawing.arc",
AS_GLOBAL, 0,
"Draw an arc", "Draw an arc", AF_ACTIVATE );
_( "Draw an arc" ), _( "Draw an arc" ), AF_ACTIVATE );
TOOL_ACTION COMMON_ACTIONS::placeText( "pcbnew.InteractiveDrawing.text",
AS_GLOBAL, 0,
"Add a text", "Add a text", AF_ACTIVATE );
_( "Add a text" ), _( "Add a text" ), AF_ACTIVATE );
TOOL_ACTION COMMON_ACTIONS::drawDimension( "pcbnew.InteractiveDrawing.dimension",
AS_GLOBAL, 0,
"Add a dimension", "Add a dimension", AF_ACTIVATE );
_( "Add a dimension" ), _( "Add a dimension" ), AF_ACTIVATE );
TOOL_ACTION COMMON_ACTIONS::drawZone( "pcbnew.InteractiveDrawing.zone",
AS_GLOBAL, 0,
"Add a filled zone", "Add a filled zone", AF_ACTIVATE );
_( "Add a filled zone" ), _( "Add a filled zone" ), AF_ACTIVATE );
TOOL_ACTION COMMON_ACTIONS::drawKeepout( "pcbnew.InteractiveDrawing.keepout",
AS_GLOBAL, 0,
"Add a keepout area", "Add a keepout area", AF_ACTIVATE );
_( "Add a keepout area" ), _( "Add a keepout area" ), AF_ACTIVATE );
TOOL_ACTION COMMON_ACTIONS::placeDXF( "pcbnew.InteractiveDrawing.placeDXF",
AS_GLOBAL, 0,
......@@ -159,20 +159,20 @@ TOOL_ACTION COMMON_ACTIONS::placeDXF( "pcbnew.InteractiveDrawing.placeDXF",
TOOL_ACTION COMMON_ACTIONS::setAnchor( "pcbnew.InteractiveDrawing.setAnchor",
AS_GLOBAL, 0,
"Place the footprint anchor", "Place the footprint anchor",
_( "Place the footprint anchor" ), _( "Place the footprint anchor" ),
AF_ACTIVATE );
TOOL_ACTION COMMON_ACTIONS::incWidth( "pcbnew.InteractiveDrawing.incWidth",
AS_CONTEXT, '+',
"Increase the line width", "Increase the line width" );
_( "Increase the line width" ), _( "Increase the line width" ) );
TOOL_ACTION COMMON_ACTIONS::decWidth( "pcbnew.InteractiveDrawing.decWidth",
AS_CONTEXT, '-',
"Decrease the line width", "Decrease the line width" );
_( "Decrease the line width" ), _( "Decrease the line width" ) );
TOOL_ACTION COMMON_ACTIONS::arcPosture( "pcbnew.InteractiveDrawing.arcPosture",
AS_CONTEXT, '/',
"Switch the arc posture", "Switch the arc posture" );
_( "Switch the arc posture" ), _( "Switch the arc posture" ) );
// View Controls
......@@ -340,46 +340,46 @@ TOOL_ACTION COMMON_ACTIONS::trackViaSizeChanged( "pcbnew.EditorControl.trackViaS
// Zone actions
TOOL_ACTION COMMON_ACTIONS::zoneFill( "pcbnew.EditorControl.zoneFill",
AS_GLOBAL, 0,
"Fill", "Fill zone(s)" );
_( "Fill" ), _( "Fill zone(s)" ) );
TOOL_ACTION COMMON_ACTIONS::zoneFillAll( "pcbnew.EditorControl.zoneFillAll",
AS_GLOBAL, int( 'B' ),
"Fill all", "Fill all zones" );
_( "Fill all" ), _( "Fill all zones" ) );
TOOL_ACTION COMMON_ACTIONS::zoneUnfill( "pcbnew.EditorControl.zoneUnfill",
AS_GLOBAL, 0,
"Unfill", "Unfill zone(s)" );
_( "Unfill" ), _( "Unfill zone(s)" ) );
TOOL_ACTION COMMON_ACTIONS::zoneUnfillAll( "pcbnew.EditorControl.zoneUnfillAll",
AS_GLOBAL, int( 'N' ),
"Unfill all", "Unfill all zones" );
_( "Unfill all" ), _( "Unfill all zones" ) );
TOOL_ACTION COMMON_ACTIONS::placeTarget( "pcbnew.EditorControl.placeTarget",
AS_GLOBAL, 0,
"Add layer alignment target", "Add layer alignment target", AF_ACTIVATE );
_( "Add layer alignment target" ), _( "Add layer alignment target" ), AF_ACTIVATE );
TOOL_ACTION COMMON_ACTIONS::placeModule( "pcbnew.EditorControl.placeModule",
AS_GLOBAL, 'O',
"Add modules", "Add modules", AF_ACTIVATE );
_( "Add modules" ), _( "Add modules" ), AF_ACTIVATE );
// Module editor tools
TOOL_ACTION COMMON_ACTIONS::placePad( "pcbnew.ModuleEditor.placePad",
AS_GLOBAL, 0,
"Add pads", "Add pads", AF_ACTIVATE );
_( "Add pads" ), _( "Add pads" ), AF_ACTIVATE );
TOOL_ACTION COMMON_ACTIONS::enumeratePads( "pcbnew.ModuleEditor.enumeratePads",
AS_GLOBAL, 0,
"Enumerate pads", "Enumerate pads", AF_ACTIVATE );
_( "Enumerate pads" ), _( "Enumerate pads" ), AF_ACTIVATE );
TOOL_ACTION COMMON_ACTIONS::copyItems( "pcbnew.ModuleEditor.copyItems",
AS_GLOBAL, MD_CTRL + int( 'C' ),
"Copy items", "Copy items", AF_ACTIVATE );
_( "Copy items" ), _( "Copy items" ), AF_ACTIVATE );
TOOL_ACTION COMMON_ACTIONS::pasteItems( "pcbnew.ModuleEditor.pasteItems",
AS_GLOBAL, MD_CTRL + int( 'V' ),
"Paste items", "Paste items", AF_ACTIVATE );
_( "Paste items" ), _( "Paste items" ), AF_ACTIVATE );
TOOL_ACTION COMMON_ACTIONS::moduleEdgeOutlines( "pcbnew.ModuleEditor.graphicOutlines",
AS_GLOBAL, 0,
......@@ -415,36 +415,40 @@ TOOL_ACTION COMMON_ACTIONS::toBeDone( "pcbnew.Control.toBeDone",
AS_GLOBAL, 0, // dialog saying it is not implemented yet
"", "" ); // so users are aware of that
TOOL_ACTION COMMON_ACTIONS::routerActivateSingle( "pcbnew.InteractiveRouter.SingleTrack",
AS_GLOBAL, 'X',
"Run push & shove router (single tracks)", "Run push & shove router (single tracks)", AF_ACTIVATE );
_( "Run push & shove router (single tracks)" ),
_( "Run push & shove router (single tracks)" ), AF_ACTIVATE );
TOOL_ACTION COMMON_ACTIONS::routerActivateDiffPair( "pcbnew.InteractiveRouter.DiffPair",
AS_GLOBAL, '6',
"Run push & shove router (differential pairs)", "Run push & shove router (differential pairs)", AF_ACTIVATE );
_( "Run push & shove router (differential pairs)" ),
_( "Run push & shove router (differential pairs)" ), AF_ACTIVATE );
TOOL_ACTION COMMON_ACTIONS::routerActivateSettingsDialog( "pcbnew.InteractiveRouter.SettingsDialog",
AS_GLOBAL, 0,
"Open Interactive Router settings", "Open Interactive Router settings", AF_ACTIVATE );
_( "Open Interactive Router settings" ),
_( "Open Interactive Router settings" ), AF_ACTIVATE );
TOOL_ACTION COMMON_ACTIONS::routerActivateDpDimensionsDialog( "pcbnew.InteractiveRouter.DpDimensionsDialog",
AS_GLOBAL, 0,
"Open Differential Pair Dimension settings", "Open Differential Pair Dimension settings", AF_ACTIVATE );
_( "Open Differential Pair Dimension settings" ),
_( "Open Differential Pair Dimension settings" ), AF_ACTIVATE );
TOOL_ACTION COMMON_ACTIONS::routerActivateTuneSingleTrace( "pcbnew.LengthTuner.TuneSingleTrack",
AS_GLOBAL, '7',
"Tune length of a single track", "", AF_ACTIVATE );
_( "Tune length of a single track" ), "", AF_ACTIVATE );
TOOL_ACTION COMMON_ACTIONS::routerActivateTuneDiffPair( "pcbnew.LengthTuner.TuneDiffPair",
AS_GLOBAL, '8',
"Tune length of a differential pair", "", AF_ACTIVATE );
_( "Tune length of a differential pair" ), "", AF_ACTIVATE );
TOOL_ACTION COMMON_ACTIONS::routerActivateTuneDiffPairSkew( "pcbnew.LengthTuner.TuneDiffPairSkew",
AS_GLOBAL, '9',
"Tune skew of a differential pair", "", AF_ACTIVATE );
_( "Tune skew of a differential pair" ), "", AF_ACTIVATE );
TOOL_ACTION COMMON_ACTIONS::routerInlineDrag( "pcbnew.InteractiveRouter.InlineDrag",
AS_GLOBAL, 0,
......@@ -457,38 +461,38 @@ TOOL_ACTION COMMON_ACTIONS::pointEditorUpdate( "pcbnew.PointEditor.update",
TOOL_ACTION COMMON_ACTIONS::pointEditorBreakOutline( "pcbnew.PointEditor.breakOutline",
AS_GLOBAL, 0,
"Create corner", "Create corner" );
_( "Create corner" ), _( "Create corner" ) );
// Placement tool
TOOL_ACTION COMMON_ACTIONS::alignTop( "pcbnew.Place.alignTop",
AS_GLOBAL, 0,
"Align items to the top",
"Aligns selected items to the top edge" );
_( "Align items to the top" ),
_( "Aligns selected items to the top edge" ) );
TOOL_ACTION COMMON_ACTIONS::alignBottom( "pcbnew.Place.alignBottom",
AS_GLOBAL, 0,
"Align items to the bottom",
"Aligns selected items to the bottom edge" );
_( "Align items to the bottom" ),
_( "Aligns selected items to the bottom edge" ) );
TOOL_ACTION COMMON_ACTIONS::alignLeft( "pcbnew.Place.alignLeft",
AS_GLOBAL, 0,
"Align items to the left",
"Aligns selected items to the top left" );
_( "Align items to the left" ),
_( "Aligns selected items to the top left" ) );
TOOL_ACTION COMMON_ACTIONS::alignRight( "pcbnew.Place.alignRight",
AS_GLOBAL, 0,
"Align items to the right",
"Aligns selected items to the right edge" );
_( "Align items to the right" ),
_( "Aligns selected items to the right edge" ) );
TOOL_ACTION COMMON_ACTIONS::distributeHorizontally( "pcbnew.Place.distributeHorizontally",
AS_GLOBAL, 0,
"Distribute horizontally",
"Distributes selected items along the horizontal axis" );
_( "Distribute horizontally" ),
_( "Distributes selected items along the horizontal axis" ) );
TOOL_ACTION COMMON_ACTIONS::distributeVertically( "pcbnew.Place.distributeVertically",
AS_GLOBAL, 0,
"Distribure vertically",
"Distributes selected items along the vertical axis" );
_( "Distribure vertically" ),
_( "Distributes selected items along the vertical axis" ) );
boost::optional<TOOL_EVENT> COMMON_ACTIONS::TranslateLegacyId( int aId )
......
......@@ -73,7 +73,7 @@ bool PCB_EDITOR_CONTROL::Init()
if( selTool )
{
selTool->AddSubMenu( new ZONE_CONTEXT_MENU, wxT( "Zones" ),
selTool->AddSubMenu( new ZONE_CONTEXT_MENU, _( "Zones" ),
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