def update_translated_resources(db_project, vcs_project, changeset, locale):
    for resource in db_project.resources.all():
        # We only want to create/update the TranslatedResource object if the
        # resource exists in the current locale, UNLESS the file is asymmetric.
        vcs_resource = vcs_project.resources.get(resource.path, None)
        if vcs_resource is not None:
            resource_exists = vcs_resource.files.get(locale) is not None
            if resource_exists or resource.is_asymmetric:
                translatedresource, _ = TranslatedResource.objects.get_or_create(resource=resource, locale=locale)
                translatedresource.calculate_stats()
Delete Floatingip agent gateway port.
dataset/ETHPy150Open mozilla/pontoon/pontoon/sync/core.py/update_translated_resources--crossover with--dataset/ETHPy150Open openstack/neutron/neutron/api/rpc/handlers/l3_rpc.py/L3RpcCallback.delete_agent_gateway_port