Browse Source

room-history: Replace ratio character with colon in timestamps

Apparently using the ratio character can create issues for RTL languages.
fractal-12
Kévin Commaille 10 months ago
parent
commit
d65fbacac6
No known key found for this signature in database
GPG Key ID: F26F4BE20A08255B
  1. 4
      src/session/view/content/room_history/member_timestamp/row.rs
  2. 2
      src/session/view/content/room_history/message_row/mod.rs

4
src/session/view/content/room_history/member_timestamp/row.rs

@ -106,13 +106,13 @@ mod imp {
// For example, "May 5 at 01:20 PM".
// Do not change the time format as it will follow the system settings.
// See `man strftime` or the documentation of g_date_time_format for the available specifiers: <https://docs.gtk.org/glib/method.DateTime.format.html>
gettext("%B %-e at %I%M %p")
gettext("%B %-e at %I:%M %p")
} else {
// Translators: this is a date and a time in 24h format.
// For example, "May 5 at 13:20".
// Do not change the time format as it will follow the system settings.
// See `man strftime` or the documentation of g_date_time_format for the available specifiers: <https://docs.gtk.org/glib/method.DateTime.format.html>
gettext("%B %-e at %H%M")
gettext("%B %-e at %H:%M")
};
let label = datetime.format(&format).unwrap();

2
src/session/view/content/room_history/message_row/mod.rs

@ -236,7 +236,7 @@ mod imp {
let clock_format = Application::default().system_settings().clock_format();
let time = if clock_format == ClockFormat::TwelveHours {
datetime.format("%I%M %p").unwrap()
datetime.format("%I:%M %p").unwrap()
} else {
datetime.format("%R").unwrap()
};

Loading…
Cancel
Save