Ejemplo n.º 1
0
def get_new_language_form(request, component):
    """Return new language form for user"""
    if not can_add_translation(request.user, component.project):
        raise PermissionDenied()
    if can_mass_add_translation(request.user, component.project):
        return NewLanguageOwnerForm
    return NewLanguageForm
Ejemplo n.º 2
0
def get_new_language_form(request, component):
    """Return new language form for user"""
    if not can_add_translation(request.user, component.project):
        raise PermissionDenied()
    if can_mass_add_translation(request.user, component.project):
        return NewLanguageOwnerForm
    return NewLanguageForm