The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: Spike on March 01, 2012, 10:23:56 AM

Title: Initial language selection box is too small
Post by: Spike on March 01, 2012, 10:23:56 AM
I think the initial language selection box is too small.

Found in Simutrans 111.2.1, default installation.


Title: Re: Initial language selection box is too small
Post by: Fabio on March 01, 2012, 01:40:57 PM
This dialog could indeed use more space. Anyway when it's open you have no need to see the map.
Title: Re: Initial language selection box is too small
Post by: Lmallet on March 01, 2012, 04:18:29 PM
Should this not be a drop-down list?
Title: Re: Initial language selection box is too small
Post by: prissi on March 01, 2012, 04:28:10 PM
This dialog must fit on the tinyest devices and is usually only shown a single time at all. But all languages shoudl be visible.
Title: Re: Initial language selection box is too small
Post by: VS on March 01, 2012, 05:38:56 PM
It seems that my test language was in your export :-( It pushes one item below end of window, without it things would be fine.
Title: Re: Initial language selection box is too small
Post by: Fabio on March 01, 2012, 05:53:27 PM
IMHO given the base dimensions, the dialog should either
1) resize dynamically
2) add scroll bars.
It shouldn't be needed 99% of times, but in this case it would have helped.
Title: Re: Initial language selection box is too small
Post by: isidoro on March 01, 2012, 06:15:13 PM
I can see your hand here, prissi (the flags)   ;)

I don't want to be picky, so please ignore these remarks about the dialog if you feel like it:
Title: Re: Initial language selection box is too small
Post by: Zeno on March 01, 2012, 06:29:21 PM
Quote from: isidoro on March 01, 2012, 06:15:13 PM
I miss diacritics in some of them: French, Spanish, Catalonian, ...
I can see diacritics in texts when playing in Spanish as well as Catalan (not catalonian). Did you mean another thing?
About language names, all of them should be written in native name IMHO, but I don't know if there's any issue with that or it's simply the lack of a rule.

PS:@isidoro: You meant in the native name, of course... now I realize, sorry! Maybe there's a problem displaying such characters in that window... elsewhere in the game they appear to be ok though.
Title: Re: Initial language selection box is too small
Post by: prissi on March 01, 2012, 08:09:27 PM
Diacritics and anything else is not possible with this dialog, as only the latin1 base font is loaded at this time.

I have palinning for a long time to discard this dialog on startup, as the language settings can be either guessed from the environment or with windows functions.
Title: Re: Initial language selection box is too small
Post by: Dwachs on March 03, 2012, 10:58:30 AM
the initial bug report seems to be fixed.
Title: Re: Initial language selection box is too small
Post by: Ashley on March 03, 2012, 04:00:55 PM
Quote from: prissi on March 01, 2012, 08:09:27 PM
I have palinning for a long time to discard this dialog on startup, as the language settings can be either guessed from the environment or with windows functions.

If this is done, it would probably be best done via a call to a function in the simsys_X OS-specific files (per-platform).
Title: Re: Initial language selection box is too small
Post by: isidoro on March 03, 2012, 07:47:02 PM
In Linux, and probably other UNICes, it is very easy.  The relevant function is setlocale, in locale.h
Title: Re: Initial language selection box is too small
Post by: prissi on March 03, 2012, 08:57:05 PM
Infourtunately this does not neccessarily returns teh same on any system:
Quote
On success, A pointer to a C string identifying the locale currently set for the category. If category is LC_ALL and different parts of the locale are set to different values, the string returned gives this information in a format which may vary between compiler implementations.

WIndows for instance returns "German_Germany.1252"
Title: Re: Initial language selection box is too small
Post by: isidoro on March 03, 2012, 09:50:03 PM
There is always the possibility to check more prevalent systems (Windows, Linux, etc.) and default to the former behavior if now known.  A command-line option would also be sensible.
Title: Re: Initial language selection box is too small
Post by: prissi on March 03, 2012, 11:13:49 PM
Commandline option exists, otherwise a server could never set its language ...

I added some code which works for Linux, Haiku and Windows (all needing very different code).
Title: Re: Initial language selection box is too small
Post by: isidoro on March 04, 2012, 08:57:30 AM
Nice!