mirror of
https://github.com/olivierkes/manuskript.git
synced 2024-06-15 17:34:33 +12:00
- formatting characters count according to locale, as in words count
This commit is contained in:
parent
c6da77baf9
commit
e15cb80847
|
@ -306,6 +306,8 @@ class mainEditor(QWidget, Ui_mainEditor):
|
||||||
progress = item.data(Outline.goalPercentage)
|
progress = item.data(Outline.goalPercentage)
|
||||||
# mw = qApp.activeWindow()
|
# mw = qApp.activeWindow()
|
||||||
|
|
||||||
|
if not chars:
|
||||||
|
chars = 0
|
||||||
if not wc:
|
if not wc:
|
||||||
wc = 0
|
wc = 0
|
||||||
if goal:
|
if goal:
|
||||||
|
@ -319,13 +321,13 @@ class mainEditor(QWidget, Ui_mainEditor):
|
||||||
del p
|
del p
|
||||||
self.lblRedacProgress.setPixmap(self.px)
|
self.lblRedacProgress.setPixmap(self.px)
|
||||||
self.lblRedacWC.setText(self.tr("({} chars) {} words / {} ").format(
|
self.lblRedacWC.setText(self.tr("({} chars) {} words / {} ").format(
|
||||||
chars,
|
locale.format("%d", chars, grouping=True),
|
||||||
locale.format("%d", wc, grouping=True),
|
locale.format("%d", wc, grouping=True),
|
||||||
locale.format("%d", goal, grouping=True)))
|
locale.format("%d", goal, grouping=True)))
|
||||||
else:
|
else:
|
||||||
self.lblRedacProgress.hide()
|
self.lblRedacProgress.hide()
|
||||||
self.lblRedacWC.setText(self.tr("({} chars) {} words ").format(
|
self.lblRedacWC.setText(self.tr("({} chars) {} words ").format(
|
||||||
chars,
|
locale.format("%d", chars, grouping=True),
|
||||||
locale.format("%d", wc, grouping=True)))
|
locale.format("%d", wc, grouping=True)))
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
Loading…
Reference in a new issue