@one_perm_required_or_403(pr_project_private_perm,
    (Project, 'slug__exact', 'project_slug'), anonymous_access=False)
def update_translation(request, project_slug, resource_slug, lang_code=None):
    resource = get_object_or_404(
        Resource.objects.select_related('project'),
        project__slug=project_slug, slug=resource_slug
    )
    if lang_code is None:
        lang_code = request.POST.get('language_code', None)
    target_language = get_object_or_404(Language, code=lang_code)
    project = resource.project
    # Get the team if exists to use it for permissions and links
    team = Team.objects.get_or_none(project, lang_code)

    check = ProjectPermission(request.user)
    if (not check.submit_translations(team or resource.project) or\
            not resource.accept_translations) and not\
            check.maintain(resource.project):
        return HttpResponse(
            simplejson.dumps({
                    'msg': _("You are not allowed to upload a translation."),
                    'status': 403,
            }),
            status=403, content_type='text/plain'
        )

    content = content_from_uploaded_file(request.FILES)
    try:
        _save_translation(resource, target_language, request.user, content)
    except FormatsBackendError, e:
        return HttpResponse(
            simplejson.dumps({
                    'msg': unicode(e),
                    'status': 400,
            }),
            status=400, content_type='text/plain'
        )
    return HttpResponse(
        simplejson.dumps({
                'msg': "",
                'status': 200,
        }),
        status=200, content_type='text/plain'
    )
Helper function to check the stats data passed into it, and raise an
dataset/ETHPy150Open rvanlaar/easy-transifex/src/transifex/transifex/resources/views.py/update_translation--crossover with--dataset/ETHPy150Open saltstack/salt/salt/modules/memcached.py/_check_stats