Improve some strings and measurements.

Fixes https://gitlab.com/kicad/code/kicad/issues/10482
This commit is contained in:
Jeff Young 2022-03-03 22:35:40 +00:00
parent ec5b7a57ec
commit c4b6801f3a
4 changed files with 11 additions and 11 deletions

View File

@ -83,7 +83,7 @@ void DIALOG_PCM_PROGRESS::SetDownloadProgress( uint64_t aDownloaded, uint64_t aT
uint64_t DIALOG_PCM_PROGRESS::toKb( uint64_t aValue ) 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 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_downloaded.load() ),
toKb( m_downloadTotal.load() ) ) ); toKb( m_downloadTotal.load() ) ) );

View File

@ -387,12 +387,12 @@ wxString PANEL_PACKAGES_VIEW::toHumanReadableSize( const boost::optional<uint64_
uint64_t b = size.get(); uint64_t b = size.get();
if( b >= 1024 * 1024 ) if( b >= 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 ) 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 );
} }

View File

@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application. * 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) 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 * 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 * 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; return true;
} }
if( dltotal > 1024 ) if( dltotal > 1000 )
{ {
aReporter->SetCurrentProgress( dlnow / (double) dltotal ); aReporter->SetCurrentProgress( dlnow / (double) dltotal );
aReporter->Report( wxString::Format( _( "Downloading %lld/%lld Kb" ), dlnow / 1024, aReporter->Report( wxString::Format( _( "Downloading %lld/%lld kB" ), dlnow / 1000,
dltotal / 1024 ) ); dltotal / 1000 ) );
} }
else else
{ {

View File

@ -38,7 +38,7 @@
/* creates a BOM list from board /* creates a BOM list from board
* The format is: * The format is:
* "Id";"Designator";"Package";"Number";"Designation";"Supplier and ref"; * "Id";"Designator";"Footprint";"Number";"Designation";"Supplier and ref";
* 1;"P1";"DB25FC";1;"DB25FEMELLE";;; * 1;"P1";"DB25FC";1;"DB25FEMELLE";;;
* 2;"U9";"PGA120";1;"4003APG120";;; * 2;"U9";"PGA120";1;"4003APG120";;;
* 3;"JP1";"pin_array_8x2";1;"CONN_8X2";;; * 3;"JP1";"pin_array_8x2";1;"CONN_8X2";;;
@ -109,7 +109,7 @@ void PCB_EDIT_FRAME::RecreateBOMFileFromBoard( wxCommandEvent& aEvent )
msg = wxT( "\"" ); msg = wxT( "\"" );
msg << _( "Id" ) << wxT( "\";\"" ); msg << _( "Id" ) << wxT( "\";\"" );
msg << _( "Designator" ) << wxT( "\";\"" ); msg << _( "Designator" ) << wxT( "\";\"" );
msg << _( "Package" ) << wxT( "\";\"" ); msg << _( "Footprint" ) << wxT( "\";\"" );
msg << _( "Quantity" ) << wxT( "\";\"" ); msg << _( "Quantity" ) << wxT( "\";\"" );
msg << _( "Designation" ) << wxT( "\";\"" ); msg << _( "Designation" ) << wxT( "\";\"" );
msg << _( "Supplier and ref" ) << wxT( "\";\n" ); msg << _( "Supplier and ref" ) << wxT( "\";\n" );