(self, tree)
Converts a tree to string with translations.

        Function names are translated by translate_func.
        Other strings are translated by translate_str.
Converts a tree to string with translations.
Converts a tree to string with translations .
def tree2str_translate(self, tree):
        """Converts a tree to string with translations.

        Function names are translated by translate_func.
        Other strings are translated by translate_str.
        """
        if isinstance(tree, str):
            return self.translate_str(tree)
        elif isinstance(tree, tuple) and len(tree) == 2:
            return self.translate_func(tree[0][:-1], tree[1])
        else:
            return ''.join([self.tree2str_translate(t) for t in tree])
def tree2str_translate ( self , tree ) : if isinstance ( tree , str ) : return self . translate_str ( tree ) elif isinstance ( tree , tuple ) and len ( tree ) == 2 : return self . translate_func ( tree [ 0 ] [ : - 1 ] , tree [ 1 ] ) else : return '' . join ( [ self . tree2str_translate ( t ) for t in tree ] )