The International Simutrans Forum

Development => Bug Reports => Topic started by: Fraoch on July 25, 2012, 03:50:48 PM

Title: Building description spills over into other strings
Post by: Fraoch on July 25, 2012, 03:50:48 PM
OK, now after a false bug report I made earlier today, this one is real and verified, I promise. :)

Simutrans 111.3 r5774, pak128 2.1.0, Ubuntu 12.04.

There are a few buildings whose descriptions spill over into their listing (in the Message Centre) and any stops made nearby that were supposed to automatically contain their name.  Lists also contain this error.

I have spotted:

Greenhouse - instead of reading "greenhouse" the listing reads "Green-This greenhouse used to be a regular shop.  But after reality." (which, interestingly, is not quite the description at the end)

Lighthouse - reads "LightSince lighthouses have been"

Old manor (I think) - reads "OldThis combination of gothic"

See attached screenshot.
Title: Re: Building description spills over into other strings
Post by: Dwachs on July 25, 2012, 05:54:02 PM
There need to be \n in the translation of these strings...
Title: Re: Building description spills over into other strings
Post by: prissi on July 25, 2012, 08:24:22 PM
Or more specific:

"House title\n\nDecription text"

For pak64 I think I found them all.
Title: Re: Building description spills over into other strings
Post by: VS on July 26, 2012, 10:10:43 AM
Sounds like a pak128 task for me, then?

I'll look into this in September.
Title: Re: Building description spills over into other strings
Post by: Ters on July 26, 2012, 11:16:51 AM
Things like this suggest that the building title and building description should be two different strings.
Title: Re: Building description spills over into other strings
Post by: prissi on July 26, 2012, 01:08:24 PM
Yes and no: Keeping books of the different strings would require a lot of modifications of the simutranslator. ANd display them seperately sound like a recipe for divergint title and descriptions.
Title: Re: Building description spills over into other strings
Post by: Ters on July 26, 2012, 01:58:39 PM
True, but relying on translators to remember not just one, but two \n at the correct place, will fail again and again.
Title: Re: Building description spills over into other strings
Post by: VS on July 26, 2012, 07:10:07 PM
This might be a dumb question, but... why can't the list use only part up to first \n ? Searching for \n\n seems redundant. Is there some hidden technical reason?
Title: Re: Building description spills over into other strings
Post by: prissi on July 26, 2012, 08:41:27 PM
All \n are removed to make a blockquote of the text. Also to allow long description like "The very haunted house\nof the later Earl Cloud\n\n ..."
Title: Re: Building description spills over into other strings
Post by: kierongreen on July 26, 2012, 08:42:04 PM
Wouldn't text wrapping work better for that?
Title: Re: Building description spills over into other strings
Post by: prissi on July 26, 2012, 08:45:40 PM
But the \n\n was already there for lot of translations. It would break a lots of existing strings.