예제 #1
0
def translate(request, path, **kwargs):
    params = TranslatePageState(request.GET, **kwargs)
    # In Pootle, URLs ending in translate.html are used when the user
    # translates all files in a directory (for example, if the user is
    # going through all fuzzy translations in a directory). If this is
    # the case, we need to pass the current store name in the 'store'
    # GET variable so that Pootle will know where to continue from
    # when the user clicks submit/skip/suggest on a translation
    # unit. But otherwise the store name is the last component of the
    # path name and we don't need to pass the 'store' GET variable.
    if path[-1] == '/':
        path = path + 'translate.html'
    else:
        path = path + '/translate/'
    return url_manip.make_url(path, params.encode())
예제 #2
0
def translate(request, path, **kwargs):
    params = TranslatePageState(request.GET, **kwargs)
    # In Pootle, URLs ending in translate.html are used when the user
    # translates all files in a directory (for example, if the user is
    # going through all fuzzy translations in a directory). If this is
    # the case, we need to pass the current store name in the 'store'
    # GET variable so that Pootle will know where to continue from
    # when the user clicks submit/skip/suggest on a translation
    # unit. But otherwise the store name is the last component of the
    # path name and we don't need to pass the 'store' GET variable.
    if path[-1] == '/':
        path = path + 'translate.html'
    else:
        path = path + '/translate/'
    return url_manip.make_url(path, params.encode())
예제 #3
0
def commit(request, path_obj):
    params = ProjectIndexState(request.GET).encode()
    return  url_manip.make_url(path_obj.pootle_path + '/commit', params)
예제 #4
0
def show_directory(request, directory_path, **kwargs):
    params = ProjectIndexState(request.GET, **kwargs).encode()
    return url_manip.make_url(directory_path, params)
예제 #5
0
def update(request, path_obj):
    params = ProjectIndexState(request.GET).encode()
    return  url_manip.make_url('/wikitrans' +
                               path_obj.pootle_path +
                               '/update', params)
예제 #6
0
def show_directory(request, directory_path, **kwargs):
    params = ProjectIndexState(request.GET, **kwargs).encode()
    return url_manip.make_url(directory_path, params)
예제 #7
0
def update(request, path_obj):
    params = ProjectIndexState(request.GET).encode()
    return url_manip.make_url(path_obj.pootle_path + '/update', params)