[libgweather] weather: Use unicode in temperature units
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgweather] weather: Use unicode in temperature units
- Date: Sun, 23 Jul 2017 19:42:37 +0000 (UTC)
commit c10fa4264d2cd01da7de583284e2fb33004eb8bd
Author: Florian Müllner <fmuellner gnome org>
Date: Sat Jul 22 18:24:03 2017 +0200
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.
https://bugzilla.gnome.org/show_bug.cgi?id=785274
libgweather/gweather-weather.c | 24 ++++++++++++------------
1 files changed, 12 insertions(+), 12 deletions(-)
---
diff --git a/libgweather/gweather-weather.c b/libgweather/gweather-weather.c
index 7d12b04..d4f196e 100644
--- a/libgweather/gweather-weather.c
+++ b/libgweather/gweather-weather.c
@@ -797,29 +797,29 @@ temperature_string (gfloat temp_f, GWeatherTemperatureUnit to_unit, gboolean wan
switch (to_unit) {
case GWEATHER_TEMP_UNIT_FAHRENHEIT:
if (!want_round) {
- /* TRANSLATOR: This is the temperature in degrees Fahrenheit (\302\260 is U+00B0 DEGREE SIGN) */
- return g_strdup_printf (_("%.1f \302\260F"), temp_f);
+ /* TRANSLATOR: This is the temperature in degrees Fahrenheit (U+2109 DEGREE FAHRENHEIT) */
+ return g_strdup_printf (_("%.1f \u2109"), temp_f);
} else {
- /* TRANSLATOR: This is the temperature in degrees Fahrenheit (\302\260 is U+00B0 DEGREE SIGN) */
- return g_strdup_printf (_("%d \302\260F"), (int)floor (temp_f + 0.5));
+ /* TRANSLATOR: This is the temperature in degrees Fahrenheit (U+2109 DEGREE FAHRENHEIT) */
+ return g_strdup_printf (_("%d \u2109"), (int)floor (temp_f + 0.5));
}
break;
case GWEATHER_TEMP_UNIT_CENTIGRADE:
if (!want_round) {
- /* TRANSLATOR: This is the temperature in degrees Celsius (\302\260 is U+00B0 DEGREE SIGN) */
- return g_strdup_printf (_("%.1f \302\260C"), TEMP_F_TO_C (temp_f));
+ /* TRANSLATOR: This is the temperature in degrees Celsius (U+2103 DEGREE CELSIUS) */
+ return g_strdup_printf (_("%.1f \u2103"), TEMP_F_TO_C (temp_f));
} else {
- /* TRANSLATOR: This is the temperature in degrees Celsius (\302\260 is U+00B0 DEGREE SIGN) */
- return g_strdup_printf (_("%d \302\260C"), (int)floor (TEMP_F_TO_C (temp_f) + 0.5));
+ /* TRANSLATOR: This is the temperature in degrees Celsius (U+2103 DEGREE CELSIUS) */
+ return g_strdup_printf (_("%d \u2103"), (int)floor (TEMP_F_TO_C (temp_f) + 0.5));
}
break;
case GWEATHER_TEMP_UNIT_KELVIN:
if (!want_round) {
- /* TRANSLATOR: This is the temperature in kelvin */
- return g_strdup_printf (_("%.1f K"), TEMP_F_TO_K (temp_f));
+ /* TRANSLATOR: This is the temperature in kelvin (U+212A KELVIN SIGN) */
+ return g_strdup_printf (_("%.1f \u212A"), TEMP_F_TO_K (temp_f));
} else {
- /* TRANSLATOR: This is the temperature in kelvin */
- return g_strdup_printf (_("%d K"), (int)floor (TEMP_F_TO_K (temp_f)));
+ /* TRANSLATOR: This is the temperature in kelvin (U+212A KELVIN SIGN) */
+ return g_strdup_printf (_("%d \u212A"), (int)floor (TEMP_F_TO_K (temp_f)));
}
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]