def translate(request, translation_project, dir_path=None): if dir_path: pootle_path = translation_project.pootle_path + dir_path units_query = Unit.objects.filter(store__pootle_path__startswith=pootle_path) else: units_query = Unit.objects.filter(store__translation_project=translation_project) return translate_page(request, units_query)
def translate(request, translation_project, dir_path=None): if dir_path: pootle_path = translation_project.pootle_path + dir_path request.directory = Directory.objects.get(pootle_path=pootle_path) else: request.directory = translation_project.directory return translate_page(request)
def translate(request, translation_project, dir_path=None): if dir_path: pootle_path = translation_project.pootle_path + dir_path units_query = Unit.objects.filter( store__pootle_path__startswith=pootle_path) else: units_query = Unit.objects.filter( store__translation_project=translation_project) return translate_page(request, units_query)
def translate(request, translation_project): return translate_page(request, translation_project.units)
def translate(request, translation_project): units_queryset = Unit.objects.filter( store__translation_project=translation_project) return translate_page(request, units_queryset)