Эх сурвалжийг харах

Fixed add_exponents message typo and added add_numerics message.

Sander Mathijs van Veen 14 жил өмнө
parent
commit
dae7dd45de

+ 5 - 0
src/rules/numerics.py

@@ -3,6 +3,7 @@ from itertools import combinations
 from .utils import nary_node
 from .utils import nary_node
 from ..node import ExpressionLeaf as Leaf, OP_DIV, OP_MUL
 from ..node import ExpressionLeaf as Leaf, OP_DIV, OP_MUL
 from ..possibilities import Possibility as P, MESSAGES
 from ..possibilities import Possibility as P, MESSAGES
+from ..translate import _
 
 
 
 
 def add_numerics(root, args):
 def add_numerics(root, args):
@@ -25,6 +26,10 @@ def add_numerics(root, args):
     return nary_node('+', scope)
     return nary_node('+', scope)
 
 
 
 
+MESSAGES[add_numerics] = _('Combine the constants {3} and {4}, which'
+        ' will reduce to {3} + {4}.')
+
+
 #def match_subtract_numerics(node):
 #def match_subtract_numerics(node):
 #    """
 #    """
 #    3 - 2      ->  2.0
 #    3 - 2      ->  2.0

+ 1 - 1
src/rules/powers.py

@@ -138,7 +138,7 @@ def add_exponents(root, args):
     return nary_node('*', scope)
     return nary_node('*', scope)
 
 
 
 
-MESSAGES[add_exponents] = _('Add the exponents {1} and {2}, which'
+MESSAGES[add_exponents] = _('Add the exponents of {1} and {2}, which'
         ' will reduce to {1[0]}^({1[1]} + {2[1]}).')
         ' will reduce to {1[0]}^({1[1]} + {2[1]}).')