def create_tenant(self, tenant_name, enabled, description):  
        tenants = self.shell.keystone.tenants.findall(name=tenant_name)
        if not tenants:
            fields = {'tenant_name': tenant_name, 'enabled': enabled, 
                      'description': description}  
            tenant = self.shell.keystone.tenants.create(**fields)
        else:
            tenant = tenants[0]

        # always give the admin user the admin role to any tenant created 
        # by the driver. 
        self.add_user_role(self.admin_user.id, tenant.id, 'admin')
        return tenant
This will translate a block of text with parameters.
dataset/ETHPy150Open open-cloud/xos/xos/openstack/driver.py/OpenStackDriver.create_tenant--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.3/django/templatetags/i18n.py/do_block_translate