← Back to team overview

kicad-developers team mailing list archive

Re: changes to specctra.cpp



I built wxWidgets 2.9.0 for linux, and this enabled me understand the problem better.

See my new inline function GetChars() in macros.h

I think that will work in a version independent way.

So we can revert to

ThrowIOError( _("Unable to open file \"%s\""), GetChars(filename) );

I will commit revised specctra files shortly.


Dick Hollenbeck a écrit :


Why the changes in Rev: 1723 to specctra.cpp?

What we lost was the ability of the translator to put the filename
anywhere in the sentence? Some languages are formulated differently,
and putting the filename at the end of the output string may not always
be appropriate.

Something going wrong with GetData()? There is the new

*wxString::wchar_ str*()

function which probably serves the same purpose.

If there was some compelling reason to take the %s out of the
translatable format string, (and I do not think there is), then why ask
the translator to translate the \" quote character in the new
translatable format string?


This is a not well done work. Sorry.

Since 3 or 4 days, i am testing wxWidgets 2.9 (i.e. devel version of wxWidgets 3.0)

ThrowIOError( _("Unable to open file \"%s\""), filename.GetData() ); does not work
( non-POD error)

*wxString::wchar_ str*() does not change anything.

This is the reason of my changes.

wxString msg;
msg.Printf( _("Unable to open file \"%s\""), filename.GetData() );
ThrowIOError( msg );

So i committed a new change using this syntax.

Jean-Pierre CHARRAS

Maître de conférences
Directeur d'études 2ieme année.
Génie Electrique et Informatique Industrielle 2
Institut Universitaire de Technologie 1 de Grenoble
BP 67, 38402 St Martin d'Heres Cedex

Recherche :
Rue de la Houille Blanche
38400 Saint Martin d'Heres