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 785274 - Degrees Celsius sign is breakable
Degrees Celsius sign is breakable
Status: RESOLVED FIXED
Product: libgweather
Classification: Core
Component: general
3.24.x
Other Linux
: Normal normal
: future
Assigned To: libgweather-maint
libgweather-maint
Depends on:
Blocks:
 
 
Reported: 2017-07-22 15:42 UTC by Juraj Fiala
Modified: 2017-07-25 21:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
example of the breakage (9.35 KB, image/png)
2017-07-22 15:42 UTC, Juraj Fiala
  Details
weather: Use unicode in temperature units (3.03 KB, patch)
2017-07-22 16:29 UTC, Florian Müllner
committed Details | Review

Description Juraj Fiala 2017-07-22 15:42:52 UTC
Created attachment 356178 [details]
example of the breakage

When the degrees Celsius sign (°C) gets on the end of a row, it’s broken into ‘°’ and ‘C’ (see attachment). A solution could be to use Unicode U+2103 ℃ instead.

This probably applies to °F, where Unicode U+2109 ℉ could be used.

(Fedora 26, Slovak locale.)
Comment 1 Florian Müllner 2017-07-22 16:15:32 UTC
As mentioned earlier on IRC, those strings are provided by libgweather:
https://git.gnome.org//browse/libgweather/tree/libgweather/gweather-weather.c#n793
Comment 2 Florian Müllner 2017-07-22 16:29:57 UTC
Created attachment 356181 [details] [review]
weather: Use unicode in temperature units

All temperature units have their own unicode code points; using them
instead of letter+degree will guarantee that the unit isn't broken by
line wraps, and hopefully look nicer as well.
Comment 3 Giovanni Campagna 2017-07-23 18:27:23 UTC
Review of attachment 356181 [details] [review]:

Personally I'd prefer to see just the characters instead of the escape sequences, but I know sometimes gettext trips on unicode, so it looks good.
Except the typo. No need for V2 once that's fixed.

::: libgweather/gweather-weather.c
@@ +908,3 @@
 	if (!want_round) {
+	    /* TRANSLATOR: This is the temperature in kelvin (U+212A KELVIN SIGN) */
+	    return g_strdup_printf (_("%.1f /u212A"), TEMP_F_TO_K (temp_f));

Flipped backslash?
Comment 4 Florian Müllner 2017-07-23 19:42:51 UTC
Attachment 356181 [details] pushed as c10fa42 - weather: Use unicode in temperature units