From ff17a22e317bf212fcbe1fb0c1c58305d26378ec Mon Sep 17 00:00:00 2001 From: Alex Shvartzkop <dudesuchamazing@gmail.com> Date: Sat, 10 Feb 2024 08:34:02 +0300 Subject: [PATCH] Internationalize Image Properties dialogs. --- eeschema/dialogs/dialog_image_properties_base.cpp | 14 +++++++------- eeschema/dialogs/dialog_image_properties_base.fbp | 11 +---------- eeschema/dialogs/dialog_image_properties_base.h | 5 +++-- .../dialog_reference_image_properties_base.cpp | 14 +++++++------- .../dialog_reference_image_properties_base.fbp | 2 +- .../dialog_reference_image_properties_base.h | 3 ++- 6 files changed, 21 insertions(+), 28 deletions(-) diff --git a/eeschema/dialogs/dialog_image_properties_base.cpp b/eeschema/dialogs/dialog_image_properties_base.cpp index 163c1760e5..fa03dd754b 100644 --- a/eeschema/dialogs/dialog_image_properties_base.cpp +++ b/eeschema/dialogs/dialog_image_properties_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.10.1-282-g1fa54006) +// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -22,7 +22,7 @@ DIALOG_IMAGE_PROPERTIES_BASE::DIALOG_IMAGE_PROPERTIES_BASE( wxWindow* parent, wx bSizerProperties = new wxBoxSizer( wxVERTICAL ); wxStaticBoxSizer* sbSizerProperties; - sbSizerProperties = new wxStaticBoxSizer( new wxStaticBox( m_PanelGeneral, wxID_ANY, wxT("Position") ), wxVERTICAL ); + sbSizerProperties = new wxStaticBoxSizer( new wxStaticBox( m_PanelGeneral, wxID_ANY, _("Position") ), wxVERTICAL ); wxFlexGridSizer* fgSizerPos; fgSizerPos = new wxFlexGridSizer( 2, 3, 1, 0 ); @@ -31,25 +31,25 @@ DIALOG_IMAGE_PROPERTIES_BASE::DIALOG_IMAGE_PROPERTIES_BASE( wxWindow* parent, wx fgSizerPos->SetFlexibleDirection( wxBOTH ); fgSizerPos->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - m_XPosLabel = new wxStaticText( sbSizerProperties->GetStaticBox(), wxID_ANY, wxT("X:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_XPosLabel = new wxStaticText( sbSizerProperties->GetStaticBox(), wxID_ANY, _("X:"), wxDefaultPosition, wxDefaultSize, 0 ); m_XPosLabel->Wrap( -1 ); fgSizerPos->Add( m_XPosLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); m_ModPositionX = new wxTextCtrl( sbSizerProperties->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); fgSizerPos->Add( m_ModPositionX, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - m_XPosUnit = new wxStaticText( sbSizerProperties->GetStaticBox(), wxID_ANY, wxT("unit"), wxDefaultPosition, wxDefaultSize, 0 ); + m_XPosUnit = new wxStaticText( sbSizerProperties->GetStaticBox(), wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); m_XPosUnit->Wrap( -1 ); fgSizerPos->Add( m_XPosUnit, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 ); - m_YPosLabel = new wxStaticText( sbSizerProperties->GetStaticBox(), wxID_ANY, wxT("Y:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_YPosLabel = new wxStaticText( sbSizerProperties->GetStaticBox(), wxID_ANY, _("Y:"), wxDefaultPosition, wxDefaultSize, 0 ); m_YPosLabel->Wrap( -1 ); fgSizerPos->Add( m_YPosLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); m_ModPositionY = new wxTextCtrl( sbSizerProperties->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); fgSizerPos->Add( m_ModPositionY, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP, 1 ); - m_YPosUnit = new wxStaticText( sbSizerProperties->GetStaticBox(), wxID_ANY, wxT("unit"), wxDefaultPosition, wxDefaultSize, 0 ); + m_YPosUnit = new wxStaticText( sbSizerProperties->GetStaticBox(), wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); m_YPosUnit->Wrap( -1 ); fgSizerPos->Add( m_YPosUnit, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); @@ -63,7 +63,7 @@ DIALOG_IMAGE_PROPERTIES_BASE::DIALOG_IMAGE_PROPERTIES_BASE( wxWindow* parent, wx m_PanelGeneral->SetSizer( bSizerProperties ); m_PanelGeneral->Layout(); bSizerProperties->Fit( m_PanelGeneral ); - m_Notebook->AddPage( m_PanelGeneral, wxT("General"), false ); + m_Notebook->AddPage( m_PanelGeneral, _("General"), false ); m_GeneralBoxSizer->Add( m_Notebook, 1, wxEXPAND | wxALL, 5 ); diff --git a/eeschema/dialogs/dialog_image_properties_base.fbp b/eeschema/dialogs/dialog_image_properties_base.fbp index e8fb8c0c1c..d82b659297 100644 --- a/eeschema/dialogs/dialog_image_properties_base.fbp +++ b/eeschema/dialogs/dialog_image_properties_base.fbp @@ -16,7 +16,7 @@ <property name="help_provider">none</property> <property name="image_path_wrapper_function_name"></property> <property name="indent_with_spaces"></property> - <property name="internationalize">0</property> + <property name="internationalize">1</property> <property name="name">DIALOG_IMAGE_PROPERTIES_BASE</property> <property name="namespace"></property> <property name="path">.</property> @@ -36,7 +36,6 @@ <property name="center">wxBOTH</property> <property name="context_help"></property> <property name="context_menu">1</property> - <property name="drag_accept_files">0</property> <property name="enabled">1</property> <property name="event_handler">impl_virtual</property> <property name="extra_style"></property> @@ -88,7 +87,6 @@ <property name="dock">Dock</property> <property name="dock_fixed">0</property> <property name="docking">Left</property> - <property name="drag_accept_files">0</property> <property name="enabled">1</property> <property name="fg"></property> <property name="floatable">1</property> @@ -145,7 +143,6 @@ <property name="dock">Dock</property> <property name="dock_fixed">0</property> <property name="docking">Left</property> - <property name="drag_accept_files">0</property> <property name="enabled">1</property> <property name="fg"></property> <property name="floatable">1</property> @@ -234,7 +231,6 @@ <property name="dock">Dock</property> <property name="dock_fixed">0</property> <property name="docking">Left</property> - <property name="drag_accept_files">0</property> <property name="enabled">1</property> <property name="fg"></property> <property name="floatable">1</property> @@ -296,7 +292,6 @@ <property name="dock">Dock</property> <property name="dock_fixed">0</property> <property name="docking">Left</property> - <property name="drag_accept_files">0</property> <property name="enabled">1</property> <property name="fg"></property> <property name="floatable">1</property> @@ -361,7 +356,6 @@ <property name="dock">Dock</property> <property name="dock_fixed">0</property> <property name="docking">Left</property> - <property name="drag_accept_files">0</property> <property name="enabled">1</property> <property name="fg"></property> <property name="floatable">1</property> @@ -423,7 +417,6 @@ <property name="dock">Dock</property> <property name="dock_fixed">0</property> <property name="docking">Left</property> - <property name="drag_accept_files">0</property> <property name="enabled">1</property> <property name="fg"></property> <property name="floatable">1</property> @@ -485,7 +478,6 @@ <property name="dock">Dock</property> <property name="dock_fixed">0</property> <property name="docking">Left</property> - <property name="drag_accept_files">0</property> <property name="enabled">1</property> <property name="fg"></property> <property name="floatable">1</property> @@ -550,7 +542,6 @@ <property name="dock">Dock</property> <property name="dock_fixed">0</property> <property name="docking">Left</property> - <property name="drag_accept_files">0</property> <property name="enabled">1</property> <property name="fg"></property> <property name="floatable">1</property> diff --git a/eeschema/dialogs/dialog_image_properties_base.h b/eeschema/dialogs/dialog_image_properties_base.h index b57229c398..df4909f6fb 100644 --- a/eeschema/dialogs/dialog_image_properties_base.h +++ b/eeschema/dialogs/dialog_image_properties_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.10.1-282-g1fa54006) +// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -9,6 +9,7 @@ #include <wx/artprov.h> #include <wx/xrc/xmlres.h> +#include <wx/intl.h> #include "dialog_shim.h" #include <wx/string.h> #include <wx/stattext.h> @@ -52,7 +53,7 @@ class DIALOG_IMAGE_PROPERTIES_BASE : public DIALOG_SHIM public: - DIALOG_IMAGE_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Image Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 363,281 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + DIALOG_IMAGE_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Image Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 363,281 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); ~DIALOG_IMAGE_PROPERTIES_BASE(); diff --git a/pcbnew/dialogs/dialog_reference_image_properties_base.cpp b/pcbnew/dialogs/dialog_reference_image_properties_base.cpp index 8c7934856f..263a9f720a 100644 --- a/pcbnew/dialogs/dialog_reference_image_properties_base.cpp +++ b/pcbnew/dialogs/dialog_reference_image_properties_base.cpp @@ -29,36 +29,36 @@ DIALOG_REFERENCE_IMAGE_PROPERTIES_BASE::DIALOG_REFERENCE_IMAGE_PROPERTIES_BASE( gbSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_ALL ); gbSizer1->SetEmptyCellSize( wxSize( -1,5 ) ); - m_XPosLabel = new wxStaticText( m_PanelGeneral, wxID_ANY, wxT("Position X:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_XPosLabel = new wxStaticText( m_PanelGeneral, wxID_ANY, _("Position X:"), wxDefaultPosition, wxDefaultSize, 0 ); m_XPosLabel->Wrap( -1 ); gbSizer1->Add( m_XPosLabel, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 ); m_ModPositionX = new wxTextCtrl( m_PanelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); gbSizer1->Add( m_ModPositionX, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - m_XPosUnit = new wxStaticText( m_PanelGeneral, wxID_ANY, wxT("unit"), wxDefaultPosition, wxDefaultSize, 0 ); + m_XPosUnit = new wxStaticText( m_PanelGeneral, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); m_XPosUnit->Wrap( -1 ); gbSizer1->Add( m_XPosUnit, wxGBPosition( 0, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 ); - m_YPosLabel = new wxStaticText( m_PanelGeneral, wxID_ANY, wxT("Position Y:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_YPosLabel = new wxStaticText( m_PanelGeneral, wxID_ANY, _("Position Y:"), wxDefaultPosition, wxDefaultSize, 0 ); m_YPosLabel->Wrap( -1 ); gbSizer1->Add( m_YPosLabel, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 ); m_ModPositionY = new wxTextCtrl( m_PanelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); gbSizer1->Add( m_ModPositionY, wxGBPosition( 1, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - m_YPosUnit = new wxStaticText( m_PanelGeneral, wxID_ANY, wxT("unit"), wxDefaultPosition, wxDefaultSize, 0 ); + m_YPosUnit = new wxStaticText( m_PanelGeneral, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); m_YPosUnit->Wrap( -1 ); gbSizer1->Add( m_YPosUnit, wxGBPosition( 1, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 ); - m_LayerLabel = new wxStaticText( m_PanelGeneral, wxID_ANY, wxT("Associated layer:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_LayerLabel = new wxStaticText( m_PanelGeneral, wxID_ANY, _("Associated layer:"), wxDefaultPosition, wxDefaultSize, 0 ); m_LayerLabel->Wrap( -1 ); gbSizer1->Add( m_LayerLabel, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 ); m_LayerSelectionCtrl = new PCB_LAYER_BOX_SELECTOR( m_PanelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); gbSizer1->Add( m_LayerSelectionCtrl, wxGBPosition( 2, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - m_cbLocked = new wxCheckBox( m_PanelGeneral, wxID_ANY, wxT("Locked"), wxDefaultPosition, wxDefaultSize, 0 ); + m_cbLocked = new wxCheckBox( m_PanelGeneral, wxID_ANY, _("Locked"), wxDefaultPosition, wxDefaultSize, 0 ); gbSizer1->Add( m_cbLocked, wxGBPosition( 4, 0 ), wxGBSpan( 1, 3 ), wxALIGN_CENTER_VERTICAL, 5 ); @@ -71,7 +71,7 @@ DIALOG_REFERENCE_IMAGE_PROPERTIES_BASE::DIALOG_REFERENCE_IMAGE_PROPERTIES_BASE( m_PanelGeneral->SetSizer( bSizerProperties ); m_PanelGeneral->Layout(); bSizerProperties->Fit( m_PanelGeneral ); - m_Notebook->AddPage( m_PanelGeneral, wxT("General"), false ); + m_Notebook->AddPage( m_PanelGeneral, _("General"), false ); m_GeneralBoxSizer->Add( m_Notebook, 1, wxEXPAND|wxALL, 10 ); diff --git a/pcbnew/dialogs/dialog_reference_image_properties_base.fbp b/pcbnew/dialogs/dialog_reference_image_properties_base.fbp index 8d387bafdd..57229afc45 100644 --- a/pcbnew/dialogs/dialog_reference_image_properties_base.fbp +++ b/pcbnew/dialogs/dialog_reference_image_properties_base.fbp @@ -16,7 +16,7 @@ <property name="help_provider">none</property> <property name="image_path_wrapper_function_name"></property> <property name="indent_with_spaces"></property> - <property name="internationalize">0</property> + <property name="internationalize">1</property> <property name="name">DIALOG_REFERENCE_IMAGE_PROPERTIES_BASE</property> <property name="namespace"></property> <property name="path">.</property> diff --git a/pcbnew/dialogs/dialog_reference_image_properties_base.h b/pcbnew/dialogs/dialog_reference_image_properties_base.h index cde6f8579d..284d31a249 100644 --- a/pcbnew/dialogs/dialog_reference_image_properties_base.h +++ b/pcbnew/dialogs/dialog_reference_image_properties_base.h @@ -9,6 +9,7 @@ #include <wx/artprov.h> #include <wx/xrc/xmlres.h> +#include <wx/intl.h> class PCB_LAYER_BOX_SELECTOR; #include "dialog_shim.h" @@ -59,7 +60,7 @@ class DIALOG_REFERENCE_IMAGE_PROPERTIES_BASE : public DIALOG_SHIM public: - DIALOG_REFERENCE_IMAGE_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Reference Image Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + DIALOG_REFERENCE_IMAGE_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Reference Image Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); ~DIALOG_REFERENCE_IMAGE_PROPERTIES_BASE();