GSE: Sequences, Variables, Macros

GSE: Sequences, Variables, Macros

6M Downloads

Wrap text (if sentence is too long) in tooltips

xan2622 opened this issue · 2 comments

commented

🔵 Is your feature request related to a problem? Please describe.
Some sentences (especially in translations) can be very long in tooltips.

Here is phrase#266871:

tooltip734

I admit, the tooltip shown in the screenshot above is not a real problem (not the worse example), but depending on how long the translation is, the tooltip can look like this (rarely, but it can happen):

Capture d’écran 2021-06-09 163105

I noticed that some tooltips look good even if they contain two lines : (phrase#266876)

tooltip  wrap

What did you do to make this tooltip show the second sentence on another line?
Did you hardcode the width and height of the tooltip? Or maybe another trick?

I would like some (translated) tooltips not to be wider than the GSE window itself, if possible.
Thank you in advance for your help.

🔵 Describe the solution you'd like
It could be interesting to add some special character within the sentence (on the Curseforge translation page) to force the tooltip to wrap text where this special character is located in the line.

I guess most of translators will want to place this character at the end of the sentense but depending on the sentence length, they might want to place it elsewhere.

commented

As I can’t tell what size the tooltip box will be I can’t control when or if to wrap. Things that are present in modern UX design just are not present in WoW’s api. You can however use \n To manually specify a new line in a tooltip translation.

commented

On the Curseforge Localization page (french language), I added several \n characters in some strings (tooltips I wanted not to be very wide), for example:

https://www.curseforge.com/wow/addons/gse-gnome-sequencer-enhanced-advanced-macros/localization/languages/93/phrases#266848

https://www.curseforge.com/wow/addons/gse-gnome-sequencer-enhanced-advanced-macros/localization/languages/93/phrases#266871

But it didn't work:
It seems that the Curseforge Localization page just added the \n character inside the translation:

Capture d’écran 2021-07-01 220456

Capture d’écran 2021-07-01 220710