[nautilus] image-properties: Use N/S and E/W distinction for GPS coordinates



commit cab6380d3f0a2d3fb8075805ac788dc50b663849
Author: Michael von Gunten <mivogu gmail com>
Date:   Wed Jan 5 12:46:00 2022 +0000

    image-properties: Use N/S and E/W distinction for GPS coordinates
    
    Also drop the slash separator, which is non-standard for geographical coordinates.

 .../image-properties/nautilus-image-properties-page.c      | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)
---
diff --git a/extensions/image-properties/nautilus-image-properties-page.c 
b/extensions/image-properties/nautilus-image-properties-page.c
index 86d4ce9cd..a8dd7a6d2 100644
--- a/extensions/image-properties/nautilus-image-properties-page.c
+++ b/extensions/image-properties/nautilus-image-properties-page.c
@@ -24,6 +24,8 @@
 #include <gexiv2/gexiv2.h>
 #include <glib/gi18n.h>
 
+#include <math.h>
+
 #define LOAD_BUFFER_SIZE 8192
 
 typedef struct
@@ -254,8 +256,16 @@ append_gexiv2_info (NautilusImagesPropertiesPage *page)
     {
         g_autofree char *gps_coords = NULL;
 
-        /* Translators: These are the coordinates of a position where a picture was taken. */
-        gps_coords = g_strdup_printf (_("%f N / %f W (%.0f m)"), latitude, longitude, altitude);
+        gps_coords = g_strdup_printf ("%f° %s %f° %s (%.0f m)",
+                                      fabs (latitude),
+                                      /* Translators: "N" and "S" stand for
+                                       * north and south in GPS coordinates. */
+                                      latitude >= 0 ? _("N") : _("S"),
+                                      fabs (longitude),
+                                      /* Translators: "E" and "W" stand for
+                                       * east and west in GPS coordinates. */
+                                      longitude >= 0 ? _("E") : _("W"),
+                                      altitude);
 
         append_item (page, _("Coordinates"), gps_coords);
     }


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