def save_translations(key):
 if (not hasattr(_to_save, 'translations')):
  return
 for trans in _to_save.translations.get(key, []):
  is_new = (trans.autoid is None)
  trans.save(force_insert=is_new, force_update=(not is_new))
 if (key in _to_save.translations):
  del _to_save.translations[key]

def save_translations ( key ) : if ( not hasattr ( _to_save , 'translations' ) ) : return for trans in _to_save . translations . get ( key , [ ] ) : is_new = ( trans . autoid is None ) trans . save ( force_insert = is_new , force_update = ( not is_new ) ) if ( key in _to_save . translations ) : del _to_save . translations [ key ]
for a given key .