[Xfce4-commits] [apps/xfce4-screensaver] 147/425: Honor locale time settings in lock screen.
noreply at xfce.org
noreply at xfce.org
Mon Oct 15 01:49:54 CEST 2018
This is an automated email from the git hooks/post-receive script.
b l u e s a b r e p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository apps/xfce4-screensaver.
commit debbeac50a48c78fd0ca1559228e54eebc4d7aa8
Author: brian m. carlson <sandals at crustytoothpaste.net>
Date: Fri May 30 21:36:05 2014 +0000
Honor locale time settings in lock screen.
The time display in the lock screen should honor the LC_TIME variable,
including the locale-specific settings for whether to display a 12-hour or
24-hour time. Sending the time and date strings through gettext results in
a value which is specific to LC_MESSAGES, which can be different from
LC_TIME. Use the %X value for time, which is guaranteed to be appropriate
for the locale in question.
Signed-off-by: brian m. carlson <sandals at crustytoothpaste.net>
---
src/gs-lock-plug.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/gs-lock-plug.c b/src/gs-lock-plug.c
index 8b47e96..cbc1241 100644
--- a/src/gs-lock-plug.c
+++ b/src/gs-lock-plug.c
@@ -300,10 +300,8 @@ date_time_update (GSLockPlug *plug)
gchar *str;
datetime = g_date_time_new_now_local ();
- /* Translators: Time format, see https://developer.gnome.org/glib/stable/glib-GDateTime.html#g-date-time-format */
- time = g_date_time_format (datetime, _("%l:%M %p"));
- /* Translators: Date format, see https://developer.gnome.org/glib/stable/glib-GDateTime.html#g-date-time-format */
- date = g_date_time_format (datetime, _("%A, %B %e"));
+ time = g_date_time_format (datetime, "%X");
+ date = g_date_time_format (datetime, "%A, %B %e");
str = g_strdup_printf ("<span size=\"xx-large\" weight=\"ultrabold\">%s</span>", time);
gtk_label_set_text (GTK_LABEL (plug->priv->auth_time_label), str);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list