Do not translate name in version info
Leave the application name in version info untranslated when viewed, copied, or used in a bug report. Fixes https://gitlab.com/kicad/code/kicad/-/issues/13298
This commit is contained in:
parent
62f0843579
commit
8e8a3c7bdc
|
@ -98,7 +98,7 @@ EDA_3D_VIEWER_FRAME::EDA_3D_VIEWER_FRAME( KIWAY* aKiway, PCB_BASE_FRAME* aParent
|
||||||
wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER_FRAME::EDA_3D_VIEWER_FRAME %s" ), aTitle );
|
wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER_FRAME::EDA_3D_VIEWER_FRAME %s" ), aTitle );
|
||||||
|
|
||||||
m_disable_ray_tracing = false;
|
m_disable_ray_tracing = false;
|
||||||
m_aboutTitle = _( "KiCad 3D Viewer" );
|
m_aboutTitle = _HKI( "KiCad 3D Viewer" );
|
||||||
|
|
||||||
// Give it an icon
|
// Give it an icon
|
||||||
wxIcon icon;
|
wxIcon icon;
|
||||||
|
|
|
@ -89,6 +89,7 @@ DIALOG_ABOUT::DIALOG_ABOUT( EDA_BASE_FRAME *aParent, ABOUT_APP_INFO& aAppInfo )
|
||||||
}
|
}
|
||||||
|
|
||||||
m_titleName = aParent->GetAboutTitle();
|
m_titleName = aParent->GetAboutTitle();
|
||||||
|
m_untranslatedTitleName = aParent->GetUntranslatedAboutTitle();
|
||||||
m_staticTextAppTitle->SetLabel( m_titleName );
|
m_staticTextAppTitle->SetLabel( m_titleName );
|
||||||
m_staticTextCopyright->SetLabel( m_info.GetCopyright() );
|
m_staticTextCopyright->SetLabel( m_info.GetCopyright() );
|
||||||
m_staticTextBuildVersion->SetLabel( "Version: " + m_info.GetBuildVersion() );
|
m_staticTextBuildVersion->SetLabel( "Version: " + m_info.GetBuildVersion() );
|
||||||
|
@ -126,7 +127,7 @@ void DIALOG_ABOUT::createNotebooks()
|
||||||
createNotebookHtmlPage( m_notebook, _( "About" ), IMAGES::INFORMATION,
|
createNotebookHtmlPage( m_notebook, _( "About" ), IMAGES::INFORMATION,
|
||||||
m_info.GetDescription() );
|
m_info.GetDescription() );
|
||||||
|
|
||||||
wxString version = GetVersionInfoData( m_titleName, true );
|
wxString version = GetVersionInfoData( m_untranslatedTitleName, true );
|
||||||
|
|
||||||
createNotebookHtmlPage( m_notebook, _( "Version" ), IMAGES::VERSION, version, true );
|
createNotebookHtmlPage( m_notebook, _( "Version" ), IMAGES::VERSION, version, true );
|
||||||
|
|
||||||
|
@ -464,7 +465,7 @@ void DIALOG_ABOUT::onCopyVersionInfo( wxCommandEvent& event )
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString msg_version = GetVersionInfoData( m_titleName );
|
wxString msg_version = GetVersionInfoData( m_untranslatedTitleName );
|
||||||
|
|
||||||
wxTheClipboard->SetData( new wxTextDataObject( msg_version ) );
|
wxTheClipboard->SetData( new wxTextDataObject( msg_version ) );
|
||||||
wxTheClipboard->Flush(); // Allow clipboard data to be available after KiCad closes
|
wxTheClipboard->Flush(); // Allow clipboard data to be available after KiCad closes
|
||||||
|
|
|
@ -55,6 +55,7 @@ class DIALOG_ABOUT : public DIALOG_ABOUT_BASE
|
||||||
private:
|
private:
|
||||||
wxImageList* m_images;
|
wxImageList* m_images;
|
||||||
wxString m_titleName;
|
wxString m_titleName;
|
||||||
|
wxString m_untranslatedTitleName;
|
||||||
|
|
||||||
ABOUT_APP_INFO& m_info;
|
ABOUT_APP_INFO& m_info;
|
||||||
|
|
||||||
|
|
|
@ -287,7 +287,7 @@ int COMMON_CONTROL::ReportBug( const TOOL_EVENT& aEvent )
|
||||||
if( WarnUserIfOperatingSystemUnsupported() )
|
if( WarnUserIfOperatingSystemUnsupported() )
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
wxString version = GetVersionInfoData( m_frame->GetAboutTitle(), false, true );
|
wxString version = GetVersionInfoData( m_frame->GetUntranslatedAboutTitle(), false, true );
|
||||||
|
|
||||||
wxString message;
|
wxString message;
|
||||||
message.Printf( m_bugReportTemplate, version );
|
message.Printf( m_bugReportTemplate, version );
|
||||||
|
|
|
@ -123,7 +123,7 @@ SCH_EDIT_FRAME::SCH_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
|
||||||
m_showBorderAndTitleBlock = true; // true to show sheet references
|
m_showBorderAndTitleBlock = true; // true to show sheet references
|
||||||
m_supportsAutoSave = true;
|
m_supportsAutoSave = true;
|
||||||
m_syncingPcbToSchSelection = false;
|
m_syncingPcbToSchSelection = false;
|
||||||
m_aboutTitle = _( "KiCad Schematic Editor" );
|
m_aboutTitle = _HKI( "KiCad Schematic Editor" );
|
||||||
|
|
||||||
m_findReplaceDialog = nullptr;
|
m_findReplaceDialog = nullptr;
|
||||||
|
|
||||||
|
|
|
@ -111,7 +111,7 @@ SYMBOL_EDIT_FRAME::SYMBOL_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
|
||||||
m_libMgr = nullptr;
|
m_libMgr = nullptr;
|
||||||
m_unit = 1;
|
m_unit = 1;
|
||||||
m_convert = 1;
|
m_convert = 1;
|
||||||
m_aboutTitle = _( "KiCad Symbol Editor" );
|
m_aboutTitle = _HKI( "KiCad Symbol Editor" );
|
||||||
|
|
||||||
wxIcon icon;
|
wxIcon icon;
|
||||||
wxIconBundle icon_bundle;
|
wxIconBundle icon_bundle;
|
||||||
|
|
|
@ -117,7 +117,7 @@ SYMBOL_VIEWER_FRAME::SYMBOL_VIEWER_FRAME( KIWAY* aKiway, wxWindow* aParent, FRAM
|
||||||
if( aFrameType == FRAME_SCH_VIEWER_MODAL )
|
if( aFrameType == FRAME_SCH_VIEWER_MODAL )
|
||||||
SetModal( true );
|
SetModal( true );
|
||||||
|
|
||||||
m_aboutTitle = _( "KiCad Symbol Library Viewer" );
|
m_aboutTitle = _HKI( "KiCad Symbol Library Viewer" );
|
||||||
|
|
||||||
// Force the frame name used in config. the lib viewer frame has a name
|
// Force the frame name used in config. the lib viewer frame has a name
|
||||||
// depending on aFrameType (needed to identify the frame by wxWidgets),
|
// depending on aFrameType (needed to identify the frame by wxWidgets),
|
||||||
|
|
|
@ -83,7 +83,7 @@ GERBVIEW_FRAME::GERBVIEW_FRAME( KIWAY* aKiway, wxWindow* aParent )
|
||||||
m_apertText = nullptr;
|
m_apertText = nullptr;
|
||||||
m_dcodeText = nullptr;
|
m_dcodeText = nullptr;
|
||||||
m_displayMode = 0;
|
m_displayMode = 0;
|
||||||
m_aboutTitle = _( "KiCad Gerber Viewer" );
|
m_aboutTitle = _HKI( "KiCad Gerber Viewer" );
|
||||||
|
|
||||||
SHAPE_POLY_SET dummy; // A ugly trick to force the linker to include
|
SHAPE_POLY_SET dummy; // A ugly trick to force the linker to include
|
||||||
// some methods in code and avoid link errors
|
// some methods in code and avoid link errors
|
||||||
|
|
|
@ -503,7 +503,9 @@ public:
|
||||||
*/
|
*/
|
||||||
virtual void ProjectChanged() {}
|
virtual void ProjectChanged() {}
|
||||||
|
|
||||||
const wxString& GetAboutTitle() const { return m_aboutTitle; }
|
const wxString& GetAboutTitle() const { return wxGetTranslation( m_aboutTitle ); }
|
||||||
|
|
||||||
|
const wxString& GetUntranslatedAboutTitle() const { return m_aboutTitle; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get if the contents of the frame have been modified since the last save.
|
* Get if the contents of the frame have been modified since the last save.
|
||||||
|
|
|
@ -95,7 +95,7 @@ PL_EDITOR_FRAME::PL_EDITOR_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
|
||||||
|
|
||||||
m_showBorderAndTitleBlock = true; // true for reference drawings.
|
m_showBorderAndTitleBlock = true; // true for reference drawings.
|
||||||
DS_DATA_MODEL::GetTheInstance().m_EditMode = true;
|
DS_DATA_MODEL::GetTheInstance().m_EditMode = true;
|
||||||
m_aboutTitle = _( "KiCad Drawing Sheet Editor" );
|
m_aboutTitle = _HKI( "KiCad Drawing Sheet Editor" );
|
||||||
|
|
||||||
// Give an icon
|
// Give an icon
|
||||||
wxIcon icon;
|
wxIcon icon;
|
||||||
|
|
|
@ -111,7 +111,7 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
|
||||||
m_show_layer_manager_tools( true )
|
m_show_layer_manager_tools( true )
|
||||||
{
|
{
|
||||||
m_showBorderAndTitleBlock = false; // true to show the frame references
|
m_showBorderAndTitleBlock = false; // true to show the frame references
|
||||||
m_aboutTitle = _( "KiCad Footprint Editor" );
|
m_aboutTitle = _HKI( "KiCad Footprint Editor" );
|
||||||
m_selLayerBox = nullptr;
|
m_selLayerBox = nullptr;
|
||||||
m_editorSettings = nullptr;
|
m_editorSettings = nullptr;
|
||||||
|
|
||||||
|
|
|
@ -124,7 +124,7 @@ FOOTPRINT_VIEWER_FRAME::FOOTPRINT_VIEWER_FRAME( KIWAY* aKiway, wxWindow* aParent
|
||||||
if( aFrameType == FRAME_FOOTPRINT_VIEWER_MODAL )
|
if( aFrameType == FRAME_FOOTPRINT_VIEWER_MODAL )
|
||||||
SetModal( true );
|
SetModal( true );
|
||||||
|
|
||||||
m_aboutTitle = _( "KiCad Footprint Library Viewer" );
|
m_aboutTitle = _HKI( "KiCad Footprint Library Viewer" );
|
||||||
|
|
||||||
// Force the items to always snap
|
// Force the items to always snap
|
||||||
m_magneticItems.pads = MAGNETIC_OPTIONS::CAPTURE_ALWAYS;
|
m_magneticItems.pads = MAGNETIC_OPTIONS::CAPTURE_ALWAYS;
|
||||||
|
|
|
@ -199,7 +199,7 @@ PCB_EDIT_FRAME::PCB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
|
||||||
// assume dirty
|
// assume dirty
|
||||||
m_ZoneFillsDirty = true;
|
m_ZoneFillsDirty = true;
|
||||||
|
|
||||||
m_aboutTitle = _( "KiCad PCB Editor" );
|
m_aboutTitle = _HKI( "KiCad PCB Editor" );
|
||||||
|
|
||||||
// Must be created before the menus are created.
|
// Must be created before the menus are created.
|
||||||
if( ADVANCED_CFG::GetCfg().m_ShowPcbnewExportNetlist )
|
if( ADVANCED_CFG::GetCfg().m_ShowPcbnewExportNetlist )
|
||||||
|
|
Loading…
Reference in New Issue