I was wondering if there was a way to change the way station names are generated via the text/*.tab files.
When I am playing Simutrans in French, station names are generally created using the format "station name" + "station type". Now, this works in English (ie. Montreal Station), but in French, you usually would have "station type" + "station name" (ie. Gare Montreal, or even better, Gare de Montreal).
Is there any way to do that? Or is this an extension request? I realize this could open up a whole discussion about auto-generating station names, but simply being able to reverse the order would be sufficient for now.
Yes, I remember this being discussed before. You may search the denied/considered/? requests subforums...
Btw, I guess something can be changed in the language.tab file.
Quote from: Lmallet on July 27, 2010, 05:58:22 PM
Is there any way to do that? Or is this an extension request? I realize this could open up a whole discussion about auto-generating station names, but simply being able to reverse the order would be sufficient for now.
This has to be implemented first, the order of these text pieces is fixed.
See also:
http://forum.simutrans.com/index.php?topic=5340.msg53876#msg53876
Quote from: Zeno on July 27, 2010, 06:11:14 PM
Yes, I remember this being discussed before. You may search the denied/considered/? requests subforums...
I had a vague memory of it as well, but I could not remember if this exact question was asked, and I did search the forum but didn't find much (I had skipped Dwachs link thinking it was about gettext only).
Quote from: Dwachs on July 27, 2010, 06:14:47 PM
This has to be implemented first, the order of these text pieces is fixed.
See also:
http://forum.simutrans.com/index.php?topic=5340.msg53876#msg53876
Thanks for that, I was suspecting that the %s had something to do with it, and that they were fixed values.
I completely support this idea, plus : is it possible to self create the pieces of stations names ? Current pieces are really ... boring, always the same ... :/
Quote from: gauthier on July 27, 2010, 07:16:56 PM
...plus : is it possible to self create the pieces of stations names ? Current pieces are really ... boring, always the same ... :/
That was discussed here:
http://forum.simutrans.com/index.php?topic=4587.0
ok
Quote from: Lmallet on July 27, 2010, 05:58:22 PM
I was wondering if there was a way to change the way station names are generated via the text/*.tab files.
When I am playing Simutrans in French, station names are generally created using the format "station name" + "station type". Now, this works in English (ie. Montreal Station), but in French, you usually would have "station type" + "station name" (ie. Gare Montreal, or even better, Gare de Montreal).
I'd support it too. For Latin languages (Portuguese, Spanish, French, Italian
et all) the current syntax sounds really strange for us. :/
Well, in short, we need a sprintf() alternative which would support arbitrary ordering of parameters...
This is available with boost or C++x0. We just have to wait another five years untils it is supported on most platforms we port to. Joking aside, there are some alternative implementations of sprintf which would support reordering. But two years ago all of them were either discontinued, required boost, were stated buggy and/or prone to buffer overuns and were available only for Windows/Linux/...
Maybe it is time to repeat this investigation.
Or perhaps break up the print function into two (2 strings), so the pieces are handled separately?
Something like:
if(lang_verb_last) {
printf("%s %s %s",stname,sttype,stloc);
} else {
printf("%s %s %s",sttype,stname,stloc);
}
I know the code is not what is used in ST, but I think it demonstrates the principle. Eh?
I would rather like the modified prinft syntax where %$2s %$2s (or something like that) gives the reverse order.
why not simple invert the content of the two strings ?
Because there might be situations, where sometime one and sometime the other order is required. In Berlin we have for instance Bahnhof Berlin-Gesundbrunnen and Berlin Hauptbahnhof.
QuoteBecause there might be situations, where sometime one and sometime the other order is required.
Of course, invert IF the language used needs ;)