[gnome-music/wip/mschraal/playertoolbar-rtl-colon-fix-41-backport] utils, playertoolbar: Use regular colon as time divider




commit 9781af9d8ac65dc16e0b4b013bc7c734660e8379
Author: Yosef Or Boczko <yoseforb gmail com>
Date:   Mon Mar 28 23:27:27 2022 +0300

    utils,playertoolbar: Use regular colon as time divider
    
    The GNOME HIG suggests using an alternate character for the hour,
    minutes divider
    (https://developer.gnome.org/hig/guidelines/typography.html#take-advantage-of-unicode).
    This leads to reversed time ordering in RTL languages.
    
    Use „:” (U+003A) again instead of „∶” (U+2236) for now. This will fix
    the reversed time in RTL languages.
    
    Fixes: #509

 gnomemusic/utils.py                 | 2 +-
 gnomemusic/widgets/playertoolbar.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gnomemusic/utils.py b/gnomemusic/utils.py
index cc887ec55..e84279882 100644
--- a/gnomemusic/utils.py
+++ b/gnomemusic/utils.py
@@ -167,7 +167,7 @@ def seconds_to_string(duration):
     minutes = seconds // 60
     seconds %= 60
 
-    return '{:d}∶{:02d}'.format(minutes, seconds)
+    return '{:d}:{:02d}'.format(minutes, seconds)
 
 
 def normalize_caseless(text):
diff --git a/gnomemusic/widgets/playertoolbar.py b/gnomemusic/widgets/playertoolbar.py
index 5b98d0e5c..99c442671 100644
--- a/gnomemusic/widgets/playertoolbar.py
+++ b/gnomemusic/widgets/playertoolbar.py
@@ -193,7 +193,7 @@ class PlayerToolbar(Gtk.ActionBar):
         coresong = player.props.current_song
         self._duration_label.props.label = utils.seconds_to_string(
             coresong.props.duration)
-        self._progress_time_label.props.label = "0∶00"
+        self._progress_time_label.props.label = "0:00"
 
         self._play_button.set_sensitive(True)
         self._sync_prev_next()


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