Просмотр исходного кода

Added additional possibility messages.

Sander Mathijs van Veen 14 лет назад
Родитель
Сommit
504b9da863
1 измененных файлов с 13 добавлено и 3 удалено
  1. 13 3
      src/rules/powers.py

+ 13 - 3
src/rules/powers.py

@@ -138,9 +138,7 @@ def add_exponents(root, args):
     return nary_node('*', scope)
     return nary_node('*', scope)
 
 
 
 
-#MESSAGES[add_exponents] = _('Add the exponents of {1[0]} and {1[1]}, which'
-#        ' will reduce to {1[0][0]}^({1[0][1]} + {1[1][1]}).')
-MESSAGES[add_exponents] = _('Add the exponents of {1} and {2}, which'
+MESSAGES[add_exponents] = _('Add the exponents {1} and {2}, which'
         ' will reduce to {1[0]}^({1[1]} + {2[1]}).')
         ' will reduce to {1[0]}^({1[1]} + {2[1]}).')
 
 
 
 
@@ -153,6 +151,10 @@ def subtract_exponents(root, args):
     return a ** (p - q)
     return a ** (p - q)
 
 
 
 
+MESSAGES[subtract_exponents] = _('Substract the exponents {1} and {2},'
+        ' which will reduce to {1[0]}^({1[1]} - {2[1]}).')
+
+
 def multiply_exponents(root, args):
 def multiply_exponents(root, args):
     """
     """
     (a^p)^q  ->  a^(pq)
     (a^p)^q  ->  a^(pq)
@@ -162,6 +164,10 @@ def multiply_exponents(root, args):
     return a ** (p * q)
     return a ** (p * q)
 
 
 
 
+MESSAGES[multiply_exponents] = _('Multiply the exponents {1} and {2},'
+        ' which will reduce to {1[0]}^({1[1]} * {2[1]}).')
+
+
 def duplicate_exponent(root, args):
 def duplicate_exponent(root, args):
     """
     """
     (ab)^p   ->  a^p * b^p
     (ab)^p   ->  a^p * b^p
@@ -176,6 +182,10 @@ def duplicate_exponent(root, args):
     return result
     return result
 
 
 
 
+MESSAGES[duplicate_exponent] = _('Duplicate the exponents {1} and {2},'
+        ' which will reduce to {1[0]}^({1[1]} * {2[1]}).')
+
+
 def remove_negative_exponent(root, args):
 def remove_negative_exponent(root, args):
     """
     """
     a^-p  ->  1 / a^p
     a^-p  ->  1 / a^p