Exemple #1
0
    def translate(self, opt=None, only=False):
        """Generate code translation

Args:
    opt (argparse.Namespace, optional): Extra arguments provided by argparse
    only (bool): If true, translate current node only.
        """

        # configure if not configured
        if not self.project.builder.configured:
            self.project.builder.configure()

        if only:
            backend.translate_one(self, opt)
        else:
            backend.translate(self, opt)
Exemple #2
0
    def translate(self, opt=None, only=False):
        """Generate code translation

Args:
    opt (argparse.Namespace, optional): Extra arguments provided by argparse
    only (bool): If true, translate current node only.
        """

        # configure if not configured
        if not self.project.builder.configured:
            self.project.builder.configure()

        if only:
            backend.translate_one(self, opt)
        else:
            backend.translate(self, opt)
Exemple #3
0
def translate():
    """Translate a word"""
    rus.var.set(be.translate(engl.var.get()))