← Back to team overview

kicad-developers team mailing list archive

Re: Empty if body in PGM_BASE::initPgm

 

On 03/29/2014 05:55 AM, Lorenzo Marcantonio wrote:
> Near the end there is:
> 
>     bool succes = SetLanguage( true );
> 
>     if( !succes )
>     {
>     }
> 
> Was something supposed to be done here (like a warning) or it's just
> a relic (the warning was removed but the check remained)?

relic.

> 
> I'd actually expected a warning from g++ for that...
> 
> As an aside... why is there all that logic for language choosing? isn't
> that supposed to be done by wx from the OS environment or is
> yet-another-wx-broken-piece so that we need to do it by hand?

There is a setting in $HOME/.kicad_common that KiCad consults and when set, KiCad will use
this to set the Locale, this trumps the normal OS environment variables.

I recently ran KiCad in German for a full week, Ich kann noch Deutsch.

The other pathway to a LOCALE change is platform dependent, and involves environment
variables and sometimes reboots.

KiCad is an aggregation of past decisions by multiple people.  Its not always possible to
know if the original intentions still pertain without discussion.

I don't know anymore about it than that, and for me it was like dust in the kitchen while
doing a major remodelling job.  Was not my primary concern.


> (qt is
> guilty too on that... it uses the wrong environment variables to choose
> the string catalog)

That's because "environment variables are too hard."




Follow ups

References