From c4b6801f3a90deb7430142b038a01e1d12d09635 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Thu, 3 Mar 2022 22:35:40 +0000 Subject: [PATCH] Improve some strings and measurements. Fixes https://gitlab.com/kicad/code/kicad/issues/10482 --- kicad/pcm/dialogs/dialog_pcm_progress.cpp | 4 ++-- kicad/pcm/dialogs/panel_packages_view.cpp | 6 +++--- kicad/pcm/pcm.cpp | 8 ++++---- pcbnew/build_BOM_from_board.cpp | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/kicad/pcm/dialogs/dialog_pcm_progress.cpp b/kicad/pcm/dialogs/dialog_pcm_progress.cpp index bbe1d4c0cc..fd7ca7a263 100644 --- a/kicad/pcm/dialogs/dialog_pcm_progress.cpp +++ b/kicad/pcm/dialogs/dialog_pcm_progress.cpp @@ -83,7 +83,7 @@ void DIALOG_PCM_PROGRESS::SetDownloadProgress( uint64_t aDownloaded, uint64_t aT uint64_t DIALOG_PCM_PROGRESS::toKb( uint64_t aValue ) { - return ( aValue + 1023 ) / 1024; + return ( aValue + 999 ) / 1000; } @@ -134,7 +134,7 @@ bool DIALOG_PCM_PROGRESS::updateUI() } else { - m_downloadText->SetLabel( wxString::Format( _( "Downloaded %lld/%lld Kb" ), + m_downloadText->SetLabel( wxString::Format( _( "Downloaded %lld/%lld kB" ), toKb( m_downloaded.load() ), toKb( m_downloadTotal.load() ) ) ); diff --git a/kicad/pcm/dialogs/panel_packages_view.cpp b/kicad/pcm/dialogs/panel_packages_view.cpp index 2958eff8c2..44cc9f71b3 100644 --- a/kicad/pcm/dialogs/panel_packages_view.cpp +++ b/kicad/pcm/dialogs/panel_packages_view.cpp @@ -387,12 +387,12 @@ wxString PANEL_PACKAGES_VIEW::toHumanReadableSize( const boost::optional= 1024 * 1024 ) - return wxString::Format( "%.1f Mb", b / 1024.0 / 1024.0 ); + return wxString::Format( "%.1f MB", b / 1000.0 / 1000.0 ); if( b >= 1024 ) - return wxString::Format( "%lld Kb", b / 1024 ); + return wxString::Format( "%lld kB", b / 1000 ); - return wxString::Format( "%lld b", b ); + return wxString::Format( "%lld B", b ); } diff --git a/kicad/pcm/pcm.cpp b/kicad/pcm/pcm.cpp index 434e0e1795..abbc80786b 100644 --- a/kicad/pcm/pcm.cpp +++ b/kicad/pcm/pcm.cpp @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2021 Andrew Lutsenko, anlutsenko at gmail dot com - * Copyright (C) 1992-2021 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 1992-2022 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -200,11 +200,11 @@ bool PLUGIN_CONTENT_MANAGER::DownloadToStream( const wxString& aUrl, std::ostrea return true; } - if( dltotal > 1024 ) + if( dltotal > 1000 ) { aReporter->SetCurrentProgress( dlnow / (double) dltotal ); - aReporter->Report( wxString::Format( _( "Downloading %lld/%lld Kb" ), dlnow / 1024, - dltotal / 1024 ) ); + aReporter->Report( wxString::Format( _( "Downloading %lld/%lld kB" ), dlnow / 1000, + dltotal / 1000 ) ); } else { diff --git a/pcbnew/build_BOM_from_board.cpp b/pcbnew/build_BOM_from_board.cpp index 1810038300..c9316f00a4 100644 --- a/pcbnew/build_BOM_from_board.cpp +++ b/pcbnew/build_BOM_from_board.cpp @@ -38,7 +38,7 @@ /* creates a BOM list from board * The format is: - * "Id";"Designator";"Package";"Number";"Designation";"Supplier and ref"; + * "Id";"Designator";"Footprint";"Number";"Designation";"Supplier and ref"; * 1;"P1";"DB25FC";1;"DB25FEMELLE";;; * 2;"U9";"PGA120";1;"4003APG120";;; * 3;"JP1";"pin_array_8x2";1;"CONN_8X2";;; @@ -109,7 +109,7 @@ void PCB_EDIT_FRAME::RecreateBOMFileFromBoard( wxCommandEvent& aEvent ) msg = wxT( "\"" ); msg << _( "Id" ) << wxT( "\";\"" ); msg << _( "Designator" ) << wxT( "\";\"" ); - msg << _( "Package" ) << wxT( "\";\"" ); + msg << _( "Footprint" ) << wxT( "\";\"" ); msg << _( "Quantity" ) << wxT( "\";\"" ); msg << _( "Designation" ) << wxT( "\";\"" ); msg << _( "Supplier and ref" ) << wxT( "\";\n" );