kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #35962
Re: partially untranslated strings in simulation dialog
On Mon, May 28, 2018 at 07:55:16AM +0200, Carsten Schoenert wrote:
> Hello Marco,
>
> Am 27.05.2018 um 12:10 schrieb Marco Ciampa:
> >> No apologies needed at all, Maciej!
> >> But I am sorry to say that it will not suffice, there are also some error
> >> message strings left out untranslated...
> ...
> >> eeschema/dialogs/dialog_sim_settings.cpp
> >> 109: DisplayError( this, wxT( "You need to select DC source (sweep 1)" ) );
> >> 139: DisplayError( this, wxT( "You need to select DC source (sweep 2)" ) );
> >>
> >> ^^^^^^^^^^^^^
> >> Not translated
>
> this is for sure just a oversight by the developers and not a intended
> behavior.
Of course I know it. That was my point in saying that there is no need to
apoligise!
> I'd hereby suggesting you prepare a patch about such strings.
> I've seen this also from time to time but didn't get backed out a patch
> yet due time limitations.
Here we go: see attach. I do not know if it is complete though, you know,
I am a mere translator, not a programmer!
TIA
Best regards,
--
Marco Ciampa
I know a joke about UDP, but you might not get it.
------------------------
GNU/Linux User #78271
FSFE fellow #364
------------------------
>From 62688cba331490e9e6334fda0eca6cd9dbed1a41 Mon Sep 17 00:00:00 2001
From: Marco Ciampa <ciampix@xxxxxxxxxx>
Date: Mon, 28 May 2018 11:24:20 +0200
Subject: [PATCH] Make the Simulator error strings translatable
---
eeschema/dialogs/dialog_sim_settings.cpp | 6 +++---
eeschema/sim/spice_value.cpp | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/eeschema/dialogs/dialog_sim_settings.cpp b/eeschema/dialogs/dialog_sim_settings.cpp
index f67582653..78bafc0fa 100644
--- a/eeschema/dialogs/dialog_sim_settings.cpp
+++ b/eeschema/dialogs/dialog_sim_settings.cpp
@@ -96,7 +96,7 @@ bool DIALOG_SIM_SETTINGS::TransferDataFromWindow()
// At least one source has to be enabled
if( !m_dcEnable1->IsChecked() && !m_dcEnable2->IsChecked() )
{
- DisplayError( this, wxT( "You need to enable at least one source" ) );
+ DisplayError( this, _( "You need to enable at least one source" ) );
return false;
}
@@ -106,7 +106,7 @@ bool DIALOG_SIM_SETTINGS::TransferDataFromWindow()
{
if( empty( m_dcSource1 ) )
{
- DisplayError( this, wxT( "You need to select DC source (sweep 1)" ) );
+ DisplayError( this, _( "You need to select DC source (sweep 1)" ) );
return false;
}
@@ -136,7 +136,7 @@ bool DIALOG_SIM_SETTINGS::TransferDataFromWindow()
{
if( empty( m_dcSource2 ) )
{
- DisplayError( this, wxT( "You need to select DC source (sweep 2)" ) );
+ DisplayError( this, _( "You need to select DC source (sweep 2)" ) );
return false;
}
diff --git a/eeschema/sim/spice_value.cpp b/eeschema/sim/spice_value.cpp
index 18017cc5b..96663efa4 100644
--- a/eeschema/sim/spice_value.cpp
+++ b/eeschema/sim/spice_value.cpp
@@ -37,12 +37,12 @@ SPICE_VALUE::SPICE_VALUE( const wxString& aString )
char buf[8] = { 0, };
if( aString.IsEmpty() )
- throw std::invalid_argument( "Spice value cannot be empty" );
+ throw std::invalid_argument( _("Spice value cannot be empty") );
LOCALE_IO dummy; // All numeric values should be in "C" locale(decimal separator = .)
if( sscanf( (const char*) aString.c_str(), "%lf%7s", &m_base, buf ) == 0 )
- throw std::invalid_argument( "Invalid Spice value string" );
+ throw std::invalid_argument( _("Invalid Spice value string") );
if( *buf == 0 )
{
@@ -75,7 +75,7 @@ SPICE_VALUE::SPICE_VALUE( const wxString& aString )
case 't': m_prefix = PFX_TERA; break;
default:
- throw std::invalid_argument( "Invalid unit prefix" );
+ throw std::invalid_argument( _("Invalid unit prefix") );
}
}
--
2.17.0
Follow ups
References