Better localization support for decimal separator.
svn: r11999
This commit is contained in:
1 parent
00a667a54e
commit
ce8b02c9f6
3 files changed
+9
-8
No files matched your search
@@ -32,6 +32,7 @@
|
||||
#------------------------------------------------------------------------
|
||||
from gettext import gettext as _
|
||||
from gettext import ngettext
|
||||
import locale
|
||||
import math
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
@@ -95,7 +96,7 @@ class NumberOfAncestorsReport(Report):
|
||||
gen += 1
|
||||
theoretical = math.pow(2, ( gen - 1 ) )
|
||||
total_theoretical += theoretical
|
||||
percent = '(%3.2f%%)' % ((sum(thisgen.values()) / theoretical ) * 100)
|
||||
percent = '(%s%%)' % locale.format('%3.2f', ((sum(thisgen.values()) / theoretical ) * 100))
|
||||
|
||||
# TC # English return something like:
|
||||
# Generation 3 has 2 individuals. (50.00%)
|
||||
|
||||
Reference in new issue
Block a user