From 17cfd622150ea8f5ae85ef048c1b0c5d87e44ada Mon Sep 17 00:00:00 2001 From: vtexier <vit@free.fr> Date: Sat, 7 Mar 2020 00:12:17 +0100 Subject: [PATCH] [fix] fix referentials translation --- src/sakia/money/quant_zerosum.py | 16 +++++++--------- src/sakia/money/quantitative.py | 2 +- src/sakia/money/relative.py | 16 +++++++--------- src/sakia/money/relative_zerosum.py | 14 ++++++-------- 4 files changed, 21 insertions(+), 27 deletions(-) diff --git a/src/sakia/money/quant_zerosum.py b/src/sakia/money/quant_zerosum.py index 9a93e1d8..d14d3e36 100644 --- a/src/sakia/money/quant_zerosum.py +++ b/src/sakia/money/quant_zerosum.py @@ -14,23 +14,21 @@ class QuantitativeZSum(BaseReferential): """Q0 = Q - ( M(t-1) / N(t) ) <br > <table> - <tr><td>ZS</td><td>Quantitative value at zero sum</td></tr> + <tr><td>Q0</td><td>Quantitative value at zero sum</td></tr> <tr><td>Q</td><td>Quantitative value</td></tr> <tr><td>M</td><td>Monetary mass</td></tr> <tr><td>N</td><td>Members count</td></tr> <tr><td>t</td><td>Last UD time</td></tr> <tr><td>t-1</td><td>Penultimate UD time</td></tr> - </table>""", + </table>""" ) _DESCRIPTION_STR_ = QT_TRANSLATE_NOOP( "QuantitativeZSum", - """Quantitative at zero sum is used to display the difference between - the quantitative value and the average quantitative value. - If it is positive, the value is above the average value, and if it is negative, - the value is under the average value. - """.replace( - "\n", "<br >" - ), + """Quantitative at zero sum is used to display the difference between<br /> + the quantitative value and the average quantitative value.<br /> + If it is positive, the value is above the average value, and if it is negative,<br /> + the value is under the average value.<br /> + """ ) def __init__(self, amount, currency, app, block_number=None): diff --git a/src/sakia/money/quantitative.py b/src/sakia/money/quantitative.py index 5ac83137..e621cbf4 100644 --- a/src/sakia/money/quantitative.py +++ b/src/sakia/money/quantitative.py @@ -15,7 +15,7 @@ class Quantitative(BaseReferential): <table> <tr><td>Q</td><td>Quantitative value</td></tr> </table> - """, + """ ) _DESCRIPTION_STR_ = QT_TRANSLATE_NOOP( "Quantitative", "Base referential of the money. Units values are used here." diff --git a/src/sakia/money/relative.py b/src/sakia/money/relative.py index 79495794..f0f2d2a0 100644 --- a/src/sakia/money/relative.py +++ b/src/sakia/money/relative.py @@ -18,19 +18,17 @@ class Relative(BaseReferential): <tr><td>Q</td><td>Quantitative value</td></tr> <tr><td>UD</td><td>Universal Dividend</td></tr> <tr><td>t</td><td>Last UD time</td></tr> - </table>""", + </table>""" ) _DESCRIPTION_STR_ = QT_TRANSLATE_NOOP( "Relative", - """Relative referential of the money. - Relative value R is calculated by dividing the quantitative value Q by the last - Universal Dividend UD. - This referential is the most practical one to display prices and accounts. - No money creation or destruction is apparent here and every account tend to + """Relative referential of the money.<br /> + Relative value R is calculated by dividing the quantitative value Q by the last<br /> + Universal Dividend UD.<br /> + This referential is the most practical one to display prices and accounts.<br /> + No money creation or destruction is apparent here and every account tend to<br /> the average. - """.replace( - "\n", "<br >" - ), + """ ) def __init__(self, amount, currency, app, block_number=None): diff --git a/src/sakia/money/relative_zerosum.py b/src/sakia/money/relative_zerosum.py index 7d20268c..346127a8 100644 --- a/src/sakia/money/relative_zerosum.py +++ b/src/sakia/money/relative_zerosum.py @@ -20,17 +20,15 @@ class RelativeZSum(BaseReferential): <tr><td>N</td><td>Members count</td></tr> <tr><td>t</td><td>Last UD time</td></tr> <tr><td>t-1</td><td>Penultimate UD time</td></tr> - </table>""", + </table>""" ) _DESCRIPTION_STR_ = QT_TRANSLATE_NOOP( "RelativeZSum", - """Relative at zero sum is used to display the difference between - the relative value and the average relative value. - If it is positive, the value is above the average value, and if it is negative, - the value is under the average value. - """.replace( - "\n", "<br >" - ), + """Relative at zero sum is used to display the difference between<br /> + the relative value and the average relative value.<br /> + If it is positive, the value is above the average value, and if it is negative,<br /> + the value is under the average value.<br /> + """ ) def __init__(self, amount, currency, app, block_number=None): -- GitLab