After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 773030 - Buttonlabel to proceed to an insecure website is not matching button size if translated into german
Buttonlabel to proceed to an insecure website is not matching button size if ...
Status: RESOLVED FIXED
Product: epiphany
Classification: Core
Component: I18N
3.22.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: Epiphany Maintainers
Epiphany Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-10-16 13:21 UTC by Marcel Tiede
Modified: 2016-10-17 17:08 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
example screenshot (37.69 KB, image/png)
2016-10-16 13:21 UTC, Marcel Tiede
  Details
Ensure error page buttons expand to fit translations (653 bytes, patch)
2016-10-17 17:08 UTC, Michael Catanzaro
committed Details | Review

Description Marcel Tiede 2016-10-16 13:21:46 UTC
Created attachment 337786 [details]
example screenshot

In epiphany 3.22.1 the translated text of the button to proceed to an insecure website is not matching the available space of the button. The text is translated into german.

See attached image as an example.
Comment 1 Michael Catanzaro 2016-10-16 18:03:24 UTC
Looks like the width of the button is hardcoded to 200px in error.css. This would be easy to fix in GTK+, but I don't know how to do it in CSS. Maybe it's easy, or maybe not: I just don't know, we need someone who understands CSS. We also need to make sure that both buttons always get displayed with the same width.
Comment 2 Gabriel Ivașcu 2016-10-17 12:31:23 UTC
(In reply to Michael Catanzaro from comment #1)
> Looks like the width of the button is hardcoded to 200px in error.css. This
> would be easy to fix in GTK+, but I don't know how to do it in CSS.

A quick fix would be to set the width to "auto". That would make the button to have the same width as the text contained. However, it will look bad for shorter texts, since the button will be shorter too.

Another fix (which seems more appropriate to me) would be to leave the width property unchanged and add the "max-width" property with a value of 100%. This will make the button have a default width of 200px and in the case of a longer text that exceeds this width, the button will resize accordingly.

> We also need to make sure that both buttons always get displayed with
> the same width.

I don't think it's possible to achieve this with CSS only. Considering that both the buttons should resize according to the text inside them, they will not always have the same width. Some JavaScript code will be required to make one button get the width of another in case they differ.
Comment 3 Michael Catanzaro 2016-10-17 17:07:41 UTC
OK, thanks for the feedback.

Adrian suggested using min-width, which is slightly nicer than using both width and max-width, so I'll go with that. Someone else can mess with aligning the button sizes if desired.
Comment 4 Michael Catanzaro 2016-10-17 17:08:09 UTC
The following fix has been pushed:
ee29f6d Ensure error page buttons expand to fit translations
Comment 5 Michael Catanzaro 2016-10-17 17:08:12 UTC
Created attachment 337877 [details] [review]
Ensure error page buttons expand to fit translations