예제 #1
0
파일: forms.py 프로젝트: saily/weblate
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
예제 #2
0
파일: forms.py 프로젝트: wrestrtdr/weblate
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