'Feed a translation, as a dictionary, into the cursor'

def push(self, trans_dict):

    if (not trans_dict['value']):
        return
    params = dict(trans_dict, state='translated')
    if (params['type'] == 'view'):
        if (params['imd_model'] == 'website'):
            params['imd_model'] = 'ir.ui.view'
        elif ((params['res_id'] is None) and (not params['imd_name'])):
            params['res_id'] = 0
    if (params['type'] == 'field'):
        (model, field) = params['name'].split(',')
        params['type'] = 'model'
        params['name'] = 'ir.model.fields,field_description'
        params['imd_model'] = 'ir.model.fields'
        params['imd_name'] = ('field_%s_%s' % (model.replace('.', '_'), field))
    elif (params['type'] == 'help'):
        (model, field) = params['name'].split(',')
        params['type'] = 'model'
        params['name'] = 'ir.model.fields,help'
        params['imd_model'] = 'ir.model.fields'
        params['imd_name'] = ('field_%s_%s' % (model.replace('.', '_'), field))
    elif (params['type'] == 'view'):
        params['type'] = 'model'
        params['name'] = 'ir.ui.view,arch_db'
        params['imd_model'] = 'ir.ui.view'
    query = ('    INSERT    INTO    %s    (name,    lang,    res_id,    src,    type,    imd_model,    module,    imd_name,    value,    state,    comments)\n                                                                                VALUES    (%%(name)s,    %%(lang)s,    %%(res_id)s,    %%(src)s,    %%(type)s,    %%(imd_model)s,    %%(module)s,\n                                                                                                                %%(imd_name)s,    %%(value)s,    %%(state)s,    %%(comments)s)    ' % self._table)
    self._cr.execute(query, params)
