[gnome-desktop: 5/6] replace em-space with en-space



commit d41b1df12895ac1989f0015f543af646d924d3e4
Author: Florian Müllner <fmuellner gnome org>
Date:   Wed Aug 1 19:30:16 2018 +0200

    replace em-space with en-space

 libgnome-desktop/gnome-wall-clock.c | 18 +++++++++---------
 tests/en_US.utf-8.ref.ui            |  2 +-
 tests/he_IL.utf8.ref.ui             |  2 +-
 tests/wall-clock.c                  |  8 ++++----
 4 files changed, 15 insertions(+), 15 deletions(-)
---
diff --git a/libgnome-desktop/gnome-wall-clock.c b/libgnome-desktop/gnome-wall-clock.c
index 3c095264..d83aed8f 100644
--- a/libgnome-desktop/gnome-wall-clock.c
+++ b/libgnome-desktop/gnome-wall-clock.c
@@ -221,7 +221,7 @@ string_replace (const char *input,
 }
 
 /* This function wraps g_date_time_format, replacing colon with the ratio
- * character and underscores with em-space as it looks visually better
+ * character and underscores with en-space as it looks visually better
  * in time strings.
  */
 static char *
@@ -230,20 +230,20 @@ date_time_format (GDateTime *datetime,
 {
        char *replaced_format;
        char *ret;
-       char *no_ratio, *no_emspace;
+       char *no_ratio, *no_enspace;
        gboolean is_utf8;
 
        is_utf8 = g_get_charset (NULL);
 
        /* First, replace ratio with plain colon */
        no_ratio = string_replace (format, "∶", ":");
-       /* Then do the same with em-space and underscore before passing it to
+       /* Then do the same with en-space and underscore before passing it to
         * g_date_time_format.  */
-       no_emspace = string_replace (no_ratio, " ", "_");
-       replaced_format = g_date_time_format (datetime, no_emspace);
+       no_enspace = string_replace (no_ratio, " ", "_");
+       replaced_format = g_date_time_format (datetime, no_enspace);
 
        g_free (no_ratio);
-       g_free (no_emspace);
+       g_free (no_enspace);
 
        if (is_utf8) {
                char *tmp;
@@ -251,13 +251,13 @@ date_time_format (GDateTime *datetime,
                 * and prepend it with an LTR marker to force direction. */
                tmp = string_replace (replaced_format, ":", "\xE2\x80\x8E∶");
 
-               /* Finally, replace double spaces with a single em-space.*/
-               ret = string_replace (tmp, "_", " ");
+               /* Finally, replace double spaces with a single en-space.*/
+               ret = string_replace (tmp, "_", " ");
 
                g_free (tmp);
        } else {
                /* Colon instead of ratio is already fine, but replace the
-                * underscore with double spaces instead of em-space */
+                * underscore with double spaces instead of en-space */
                ret = string_replace (replaced_format, "_", "  ");
        }
 
diff --git a/tests/en_US.utf-8.ref.ui b/tests/en_US.utf-8.ref.ui
index c676e422..aa4d98b6 100644
--- a/tests/en_US.utf-8.ref.ui
+++ b/tests/en_US.utf-8.ref.ui
@@ -9,7 +9,7 @@
       <object class="GtkLabel" id="label1">
         <property name="visible">True</property>
         <property name="can_focus">False</property>
-        <property name="label" translatable="yes">Wed May 28 23‎∶59‎∶59</property>
+        <property name="label" translatable="yes">Wed May 28 23‎∶59‎∶59</property>
       </object>
     </child>
   </object>
diff --git a/tests/he_IL.utf8.ref.ui b/tests/he_IL.utf8.ref.ui
index e1b44729..75fd4cd7 100644
--- a/tests/he_IL.utf8.ref.ui
+++ b/tests/he_IL.utf8.ref.ui
@@ -9,7 +9,7 @@
       <object class="GtkLabel" id="label1">
         <property name="visible">True</property>
         <property name="can_focus">False</property>
-        <property name="label" translatable="yes">ד' מאי 28 23‎∶59‎∶59</property>
+        <property name="label" translatable="yes">ד' מאי 28 23‎∶59‎∶59</property>
       </object>
     </child>
   </object>
diff --git a/tests/wall-clock.c b/tests/wall-clock.c
index 17a29bf9..382690e5 100644
--- a/tests/wall-clock.c
+++ b/tests/wall-clock.c
@@ -28,7 +28,7 @@
 #define RATIO "∶"
 
 #define SPACE "  "
-#define EM_SPACE " "
+#define EN_SPACE " "
 
 static void
 test_utf8_character (const char *utf8_char,
@@ -95,9 +95,9 @@ test_colon_vs_ratio (void)
 }
 
 static void
-test_space_vs_em_space (void)
+test_space_vs_en_space (void)
 {
-       test_utf8_character (EM_SPACE, SPACE);
+       test_utf8_character (EN_SPACE, SPACE);
 }
 
 static void
@@ -236,7 +236,7 @@ main (int   argc,
        g_test_init (&argc, &argv, NULL);
 
        g_test_add_func ("/wall-clock/colon-vs-ratio", test_colon_vs_ratio);
-       g_test_add_func ("/wall-clock/space-vs-em-space", test_space_vs_em_space);
+       g_test_add_func ("/wall-clock/space-vs-en-space", test_space_vs_en_space);
        g_test_add_func ("/wall-clock/24h-clock-format", test_clock_format_setting);
        g_test_add_func ("/wall-clock/notify-clock", test_notify_clock);
        g_test_add_func ("/wall-clock/weekday-setting", test_weekday_setting);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]