Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
sakia
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
clients
python
sakia
Commits
ba893530
Commit
ba893530
authored
9 years ago
by
Vincent Texier
Browse files
Options
Downloads
Patches
Plain Diff
fix wrong values in informations tab
parent
5e126ad9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
res/i18n/ts/fr_FR.ts
+74
-59
74 additions, 59 deletions
res/i18n/ts/fr_FR.ts
src/cutecoin/gui/informations_tab.py
+25
-14
25 additions, 14 deletions
src/cutecoin/gui/informations_tab.py
with
99 additions
and
73 deletions
res/i18n/ts/fr_FR.ts
+
74
−
59
View file @
ba893530
This diff is collapsed.
Click to expand it.
src/cutecoin/gui/informations_tab.py
+
25
−
14
View file @
ba893530
...
...
@@ -51,16 +51,21 @@ class InformationsTabWidget(QWidget, Ui_InformationsTabWidget):
if
block
:
ud
=
round
(
self
.
get_referential_diff_value
(
block
[
'
dividend
'
]))
if
isinstance
(
ud
,
int
):
localized_ud
=
QLocale
().
toString
(
ud
)
localized_monetary_mass
=
QLocale
().
toString
(
round
(
self
.
get_referential_value
(
block
[
'
monetaryMass
'
])))
localized_mass_per_member
=
QLocale
().
toString
(
round
(
self
.
get_referential_value
(
block
[
'
monetaryMass
'
]
/
block
[
'
membersCount
'
])))
# use the float type of 64bits, to avoid display a 32bit signed integer...
localized_ud
=
QLocale
().
toString
(
float
(
ud
),
'
f
'
,
0
)
localized_monetary_mass
=
QLocale
().
toString
(
float
(
self
.
get_referential_value
(
block_t_minus_1
[
'
monetaryMass
'
])),
'
f
'
,
0
)
localized_mass_per_member
=
QLocale
().
toString
(
float
(
self
.
get_referential_value
(
block_t_minus_1
[
'
monetaryMass
'
]
/
block
[
'
membersCount
'
])),
'
f
'
,
0
)
else
:
localized_ud
=
QLocale
().
toString
(
ud
,
'
f
'
,
6
)
localized_monetary_mass
=
QLocale
().
toString
(
round
(
self
.
get_referential_value
(
block
[
'
monetaryMass
'
])),
'
f
'
,
6
round
(
self
.
get_referential_value
(
block
_t_minus_1
[
'
monetaryMass
'
])),
'
f
'
,
6
)
localized_mass_per_member
=
QLocale
().
toString
(
round
(
self
.
get_referential_value
(
block
[
'
monetaryMass
'
]
/
block
[
'
membersCount
'
]),
'
f
'
,
6
)
round
(
self
.
get_referential_value
(
block
_t_minus_1
[
'
monetaryMass
'
]
/
block
[
'
membersCount
'
]),
'
f
'
,
6
)
)
# set infos in label
...
...
@@ -79,12 +84,12 @@ class InformationsTabWidget(QWidget, Ui_InformationsTabWidget):
self
.
tr
(
'
Universal Dividend UD(t) in
'
),
self
.
get_referential_name
(),
localized_monetary_mass
,
self
.
tr
(
'
Monetary Mass M(t) in
'
),
self
.
tr
(
'
Monetary Mass M(t
-1
) in
'
),
self
.
get_referential_name
(),
block
[
'
membersCount
'
],
self
.
tr
(
'
Members N(t)
'
),
localized_mass_per_member
,
self
.
tr
(
'
Monetary Mass per member M(t)/N(t) in
'
),
self
.
tr
(
'
Monetary Mass per member M(t
-1
)/N(t) in
'
),
self
.
get_referential_name
(),
block
[
'
dividend
'
]
/
(
block_t_minus_1
[
'
monetaryMass
'
]
/
block
[
'
membersCount
'
]),
params
[
'
dt
'
]
/
86400
,
...
...
@@ -99,17 +104,23 @@ class InformationsTabWidget(QWidget, Ui_InformationsTabWidget):
if
block
:
if
isinstance
(
ud
,
int
):
localized_ud_t1
=
QLocale
().
toString
(
self
.
get_referential_diff_value
(
math
.
ceil
(
max
(
block
[
'
dividend
'
],
params
[
'
c
'
]
*
block
[
'
monetaryMass
'
]
/
block
[
'
membersCount
'
]))
)
float
(
self
.
get_referential_diff_value
(
math
.
ceil
(
max
(
block
[
'
dividend
'
],
params
[
'
c
'
]
*
block
[
'
monetaryMass
'
]
/
block
[
'
membersCount
'
]))
)
),
'
f
'
,
0
)
else
:
localized_ud_t1
=
QLocale
().
toString
(
self
.
get_referential_diff_value
(
math
.
ceil
(
max
(
block
[
'
dividend
'
],
params
[
'
c
'
]
*
block
[
'
monetaryMass
'
]
/
block
[
'
membersCount
'
]))
float
(
self
.
get_referential_diff_value
(
math
.
ceil
(
max
(
block
[
'
dividend
'
],
params
[
'
c
'
]
*
block
[
'
monetaryMass
'
]
/
block
[
'
membersCount
'
]))
)
),
'
f
'
,
2
6
)
# set infos in label
...
...
@@ -123,7 +134,7 @@ class InformationsTabWidget(QWidget, Ui_InformationsTabWidget):
"""
).
format
(
self
.
tr
(
'
{:2.0%} / {:} days
'
).
format
(
params
[
'
c
'
],
params
[
'
dt
'
]
/
86400
),
self
.
tr
(
'
Fundamental growth (c) / Delta time (dt)
'
),
self
.
tr
(
'
UD(t+1) = MAX { UD(t) ; c * M(t) / N(t) }
'
),
self
.
tr
(
'
UD(t+1) = MAX { UD(t) ; c * M(t
-1
) / N(t) }
'
),
self
.
tr
(
'
Universal Dividend (formula)
'
),
self
.
tr
(
'
{:} = MAX {{ {:} {:} ; {:2.0%} * {:} {:} / {:} }}
'
).
format
(
localized_ud_t1
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment