From e15cb80847738dbdb6d9d5e57c5fa90fbe93493f Mon Sep 17 00:00:00 2001 From: Lech Baczynski Date: Tue, 10 Apr 2018 07:11:32 +0200 Subject: [PATCH] - formatting characters count according to locale, as in words count --- manuskript/ui/editors/mainEditor.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/manuskript/ui/editors/mainEditor.py b/manuskript/ui/editors/mainEditor.py index 5f8d94b1..b6fd83e2 100644 --- a/manuskript/ui/editors/mainEditor.py +++ b/manuskript/ui/editors/mainEditor.py @@ -306,6 +306,8 @@ class mainEditor(QWidget, Ui_mainEditor): progress = item.data(Outline.goalPercentage) # mw = qApp.activeWindow() + if not chars: + chars = 0 if not wc: wc = 0 if goal: @@ -319,13 +321,13 @@ class mainEditor(QWidget, Ui_mainEditor): del p self.lblRedacProgress.setPixmap(self.px) self.lblRedacWC.setText(self.tr("({} chars) {} words / {} ").format( - chars, + locale.format("%d", chars, grouping=True), locale.format("%d", wc, grouping=True), locale.format("%d", goal, grouping=True))) else: self.lblRedacProgress.hide() self.lblRedacWC.setText(self.tr("({} chars) {} words ").format( - chars, + locale.format("%d", chars, grouping=True), locale.format("%d", wc, grouping=True))) ###############################################################################