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())
def commit(request, path_obj): params = ProjectIndexState(request.GET).encode() return url_manip.make_url(path_obj.pootle_path + '/commit', params)
def show_directory(request, directory_path, **kwargs): params = ProjectIndexState(request.GET, **kwargs).encode() return url_manip.make_url(directory_path, params)
def update(request, path_obj): params = ProjectIndexState(request.GET).encode() return url_manip.make_url('/wikitrans' + path_obj.pootle_path + '/update', params)
def update(request, path_obj): params = ProjectIndexState(request.GET).encode() return url_manip.make_url(path_obj.pootle_path + '/update', params)