[gnome-desktop: 1/6] wall-clock: Separate show-weekday and show-date settings



commit 0dcbbee96c2647fa7a27de44f0c1bfacbe8c1032
Author: Florian Müllner <fmuellner gnome org>
Date:   Mon Jul 16 20:20:56 2018 +0200

    wall-clock: Separate show-weekday and show-date settings
    
    Currently show-date implies date and week day, so the current settings
    allow showing either full date with day and time, day and time or just
    the time. Separate the two settings to make it possible to show the
    date without day as well.
    
    https://gitlab.gnome.org/GNOME/gnome-desktop/issues/8

 libgnome-desktop/gnome-wall-clock.c | 28 ++++++++++++++++++++--------
 1 file changed, 20 insertions(+), 8 deletions(-)
---
diff --git a/libgnome-desktop/gnome-wall-clock.c b/libgnome-desktop/gnome-wall-clock.c
index ed9c614c..fb5140f5 100644
--- a/libgnome-desktop/gnome-wall-clock.c
+++ b/libgnome-desktop/gnome-wall-clock.c
@@ -269,10 +269,16 @@ gnome_wall_clock_string_for_datetime (GnomeWallClock      *self,
 
        if (clock_format == G_DESKTOP_CLOCK_FORMAT_24H) {
                if (show_full_date) {
-                       /* Translators: This is the time format with full date used
-                          in 24-hour mode. */
-                       format_string = show_seconds ? _("%a %b %e, %R:%S")
-                               : _("%a %b %e, %R");
+                       if (show_weekday)
+                               /* Translators: This is the time format with full date
+                                  plus day used in 24-hour mode. */
+                               format_string = show_seconds ? _("%a %b %e, %R:%S")
+                                       : _("%a %b %e, %R");
+                       else
+                               /* Translators: This is the time format with full date
+                                  used in 24-hour mode. */
+                               format_string = show_seconds ? _("%b %e, %R:%S")
+                                       : _("%b %e, %R");
                } else if (show_weekday) {
                        /* Translators: This is the time format with day used
                           in 24-hour mode. */
@@ -285,10 +291,16 @@ gnome_wall_clock_string_for_datetime (GnomeWallClock      *self,
                }
        } else {
                if (show_full_date) {
-                       /* Translators: This is a time format with full date used
-                          for AM/PM. */
-                       format_string = show_seconds ? _("%a %b %e, %l:%M:%S %p")
-                               : _("%a %b %e, %l:%M %p");
+                       if (show_weekday)
+                               /* Translators: This is a time format with full date
+                                  plus day used for AM/PM. */
+                               format_string = show_seconds ? _("%a %b %e, %l:%M:%S %p")
+                                       : _("%a %b %e, %l:%M %p");
+                       else
+                               /* Translators: This is a time format with full date
+                                  used for AM/PM. */
+                               format_string = show_seconds ? _("%b %e, %l:%M:%S %p")
+                                       : _("%b %e, %l:%M %p");
                } else if (show_weekday) {
                        /* Translators: This is a time format with day used
                           for AM/PM. */


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