From f69eda2d14dc1d030ce059bca13e7db48c91b267 Mon Sep 17 00:00:00 2001 From: Philipp Wolfer Date: Mon, 11 Sep 2023 14:36:46 +0200 Subject: [PATCH] Format playback rate in player toolbar locale aware --- picard/ui/playertoolbar.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/picard/ui/playertoolbar.py b/picard/ui/playertoolbar.py index 3df62a4673..76d26c4b83 100644 --- a/picard/ui/playertoolbar.py +++ b/picard/ui/playertoolbar.py @@ -20,7 +20,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - +import locale import os from PyQt5 import ( @@ -371,7 +371,7 @@ def on_slider_value_changed(self, value): def set_playback_rate(self, playback_rate): self.playback_rate = playback_rate - label = _(self.rate_fmt) % playback_rate + label = locale.format_string(_(self.rate_fmt), playback_rate) self.setText(label) def wheelEvent(self, event):