Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preview GUI text drops text in German translation #6584

Closed
DorpsGek opened this issue Jul 8, 2017 · 3 comments
Closed

Preview GUI text drops text in German translation #6584

DorpsGek opened this issue Jul 8, 2017 · 3 comments

Comments

@DorpsGek
Copy link

@DorpsGek DorpsGek commented Jul 8, 2017

mb opened the ticket and wrote:

In the preview GUI, the German translation is missing the descenders of the last text line ("Kapazität: 216 Passagiere"). Reason might be shown inconsistencies between languages, see picture.

In addition, it would be nice if both preview and advertisement messages would also show
the railtype of announced vehicles. There seems to be room enough.

Attachments
preview-GUI.png

Reported version: 1.7.1
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/6584
@TrueBrain
Copy link
Member

@TrueBrain TrueBrain commented Apr 13, 2018

Seems there is more wrong .. I also don't see the cost and weight in the German version. Sounds this needs a closer look :)

@TrueBrain TrueBrain changed the title preview GUI text Preview GUI text drops text in German translation Apr 13, 2018
@andythenorth andythenorth removed the stale label Jan 24, 2019
@nikolas
Copy link
Member

@nikolas nikolas commented Jan 29, 2019

Seems like it might be a bug in how text is laid out. You can do a temporary fix by altering the call to SetMinimalSize() in _nested_engine_preview_widget of engine_gui.cpp. But I'd like to get to the bottom of exactly why it's behaving like this.

with SetMinimalSize(320, 0):
2019-01-28-204959_355x212_scrot

with SetMinimalSize(300, 0) (as the code is currently):
2019-01-28-205106_321x202_scrot

with SetMinimalSize(280, 0):
2019-01-28-210137_304x213_scrot

So, slightly increasing the minimal widget width here by 20 pixels fixes the immediate problem. But there's something deeper going on: decreasing to 280 also fixes the problem, but causes the engine's image color to still be off.

nikolas added a commit to nikolas/OpenTTD that referenced this issue Jan 29, 2019
With language set to German, there was a problem in this dialog box due
to the long strings in this language. It looks like the call to
`GetStringHeight()` here is taking using `r.top` to help calculate the
max width, rather than `r.left`.
nikolas added a commit to nikolas/OpenTTD that referenced this issue Jan 29, 2019
With language set to German, there was a problem in this dialog box due
to the long strings in this language. It looks like the call to
`GetStringHeight()` here is using `r.top` to help calculate the
max width, rather than `r.left`.
@PeterN
Copy link
Member

@PeterN PeterN commented Jan 29, 2019

Wow. Wrong but mostly working for nearly 10 years.

@PeterN PeterN closed this in 6a56a4c Jan 29, 2019
nielsmh added a commit to nielsmh/OpenTTD that referenced this issue Mar 11, 2019
With language set to German, there was a problem in this dialog box due
to the long strings in this language. It looks like the call to
`GetStringHeight()` here is using `r.top` to help calculate the
max width, rather than `r.left`.
douiwby added a commit to douiwby/OpenTTD that referenced this issue Apr 16, 2020
With language set to German, there was a problem in this dialog box due
to the long strings in this language. It looks like the call to
`GetStringHeight()` here is using `r.top` to help calculate the
max width, rather than `r.left`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.