ihhub / fheroes2

fheroes2 is a recreation of Heroes of Might and Magic II game engine.
https://ihhub.github.io/fheroes2/
GNU General Public License v2.0
2.71k stars 375 forks source link

Too long text in creature info dialog #7548

Open kitovyj opened 1 year ago

kitovyj commented 1 year ago

Preliminary checks

Platform

Windows

Describe the bug

German translation in upgrade creature dialog: misaligment and too long creature trait names, please see the screenshot. Note also untranslated "exit" in the city screen. german tr

Save file

not needed

Additional info

No response

ihhub commented 1 year ago

Hi @kitovyj , can you please come up with another word or a shorter version of it for German translation? I believe Exit in castle window is a separate issue.

kitovyj commented 1 year ago

Hi @kitovyj , can you please come up with another word or a shorter version of it for German translation? I believe Exit in castle window is a separate issue.

Maybe @Laserlicht can help here, I don't have german version of the game and I'm not a native speaker. I have the version from GOG, maybe somebody knows how to switch it to german version, then I can just look there.

Laserlicht commented 1 year ago

The official buttons: grafik

In the original resources the font space is reduced to fit into button...

Perhaps an abbreviation would also have to be used. E.g. ENTLAS. or ENTL.

@kitovyj You can simply download the german version from gog and use these resources for installing fheroes2 if you want to have the "full" german translation.

zenseii commented 1 year ago

The official buttons:

In the original resources the font space is reduced to fit into button...

Perhaps an abbreviation would also have to be used. E.g. ENTLAS. or ENTL.

Hi, everyone. I will make these buttons expand or shrink dynamically according to the text on them in a PR so we can avoid abbreviations (hopefully). Same thing I did in the campaign dialog.

kitovyj commented 1 year ago

Thanks for the suggestion. Hah, I see that in the original version they also have long "Geschwindigkeit" not fitting the dialog space.

zenseii commented 1 year ago

Here are some other examples of buttons that suffer similar problems: image image image image

kitovyj commented 1 year ago

The official buttons: In the original resources the font space is reduced to fit into button... Perhaps an abbreviation would also have to be used. E.g. ENTLAS. or ENTL.

Hi, everyone. I will make these buttons expand or shrink dynamically according to the text on them in a PR so we can avoid abbreviations (hopefully). Same thing I did in the campaign dialog.

Well, in this case it will not help, the buttons would overlay, or ENDE will become small and not convenient to use.

zenseii commented 1 year ago

BTW @Laserlicht, the info dialog uses "Intro ansehen" when right clicking the intro anzeigen button: image

zenseii commented 1 year ago

The official buttons: In the original resources the font space is reduced to fit into button... Perhaps an abbreviation would also have to be used. E.g. ENTLAS. or ENTL.

Hi, everyone. I will make these buttons expand or shrink dynamically according to the text on them in a PR so we can avoid abbreviations (hopefully). Same thing I did in the campaign dialog.

Well, in this case it will not help, the buttons would overlay, or ENDE will become small and not convdnient to use.

We enforce a minimum margin width on a button so ende would not become too small imo. It would leave enough space for "ABLEHNEN".

kitovyj commented 1 year ago

It could be that in the original they just drew buttons individually for different language versions or added font space parameter to the text resources.

zenseii commented 1 year ago

It could be that in the original they just drew buttons individually for different language versions or added font space parameter to the text resources.

Yep, in the official translations they did that. However, since we are not allowed to share original resources, edited or not, we cannot do that. This is why we generate buttons on the fly temporarily.

kitovyj commented 1 year ago

It could be that in the original they just drew buttons individually for different language versions or added font space parameter to the text resources.

Yep, in the official translations they did that. However, since we are not allowed to share original resources, edited or not, we cannot do that. This is why we generate buttons on the fly temporarily.

I see!

zenseii commented 1 year ago

I was planning on decreasing the margin for the campaign dialog to match the original game's margins, but I can see that it is still barely not enough for German's very long words: image

If we use INTRO ANSEHEN it might just reduce the width enough.

kitovyj commented 1 year ago

I was planning on decreasing the margin for the campaign dialog to match the original game's margins, but I can see that it is still barely not enough for German's very long words: image

If we use INTRO ANSEHEN it might just reduce the width enough.

I wonder, how difficult is it to add a font space parameter to text resources? Maybe a good, however laborious 'first issue'.