The International Simutrans Forum

 

Author Topic: Building description spills over into other strings  (Read 2618 times)

0 Members and 1 Guest are viewing this topic.

Offline Fraoch

  • *
  • Posts: 81
  • Languages: EN, FR
Building description spills over into other strings
« 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.
« Last Edit: July 25, 2012, 05:55:43 PM by Fraoch »

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4601
  • Languages: EN, DE, AT
Re: Building description spills over into other strings
« Reply #1 on: July 25, 2012, 05:54:02 PM »
There need to be \n in the translation of these strings...

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9565
  • Languages: De,EN,JP
Re: Building description spills over into other strings
« Reply #2 on: July 25, 2012, 08:24:22 PM »
Or more specific:

"House title\n\nDecription text"

For pak64 I think I found them all.

Offline VS

  • Senior Plumber (Devotee)
  • Devotee
  • *
  • Posts: 4855
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: Building description spills over into other strings
« Reply #3 on: July 26, 2012, 10:10:43 AM »
Sounds like a pak128 task for me, then?

I'll look into this in September.
« Last Edit: July 26, 2012, 10:17:01 AM by VS »

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5543
  • Languages: EN, NO
Re: Building description spills over into other strings
« Reply #4 on: July 26, 2012, 11:16:51 AM »
Things like this suggest that the building title and building description should be two different strings.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9565
  • Languages: De,EN,JP
Re: Building description spills over into other strings
« Reply #5 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.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5543
  • Languages: EN, NO
Re: Building description spills over into other strings
« Reply #6 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.

Offline VS

  • Senior Plumber (Devotee)
  • Devotee
  • *
  • Posts: 4855
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: Building description spills over into other strings
« Reply #7 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?

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9565
  • Languages: De,EN,JP
Re: Building description spills over into other strings
« Reply #8 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 ..."

Offline kierongreen

  • Dev Team, Coder/patcher
  • Devotee
  • *
  • Posts: 2269
Re: Building description spills over into other strings
« Reply #9 on: July 26, 2012, 08:42:04 PM »
Wouldn't text wrapping work better for that?

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9565
  • Languages: De,EN,JP
Re: Building description spills over into other strings
« Reply #10 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.