Too long text in creature info dialog
Preliminary checks
- [X] I've checked that there aren't other open issues on the same topic.
- [X] I've checked that this issue is reproducible on the latest snapshot build.
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.
Save file
not needed
Additional info
No response
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.
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.
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.
@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.
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.orENTL.
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.
Thanks for the suggestion. Hah, I see that in the original version they also have long "Geschwindigkeit" not fitting the dialog space.
Here are some other examples of buttons that suffer similar problems:
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.orENTL.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.
BTW @Laserlicht, the info dialog uses "Intro ansehen" when right clicking the intro anzeigen button:
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.orENTL.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".
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.
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.
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!
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:
If we use INTRO ANSEHEN it might just reduce the width enough.
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:
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'.
Space width is handled by int32_t FontCharHandler::_getSpaceCharWidth() const function.
Hi @zenseii , what functionality is missing to implement this feature?
@ihhub, the dialog needs to be re-implemented in the StandardWindow class to allow for width expansion of the dialog.
For this we need to add a method to StandardWindow which adds a vertical/hotizontal bar within the dialog (see the middle bar of the dialog in the screenshot of the issue description). We also need to be able to specify the exact offset of the bar within the window - e.g. the scenario select dialog has the horizontal bar not in the middle of the dialog.
The extra border decorations can be copy-pasted on-the-fly as usual.
Imo, this is the proper solution to this problem and similar ones like the reimplementation of the scenario select dialog.
