Commit d080b3d0 authored by Michal Čihař's avatar Michal Čihař

Actually save translation

parent 04666ac3
......@@ -53,8 +53,13 @@ def translate(request, project, subproject, lang):
if request.method == 'POST':
form = TranslationForm(request.POST)
if form.is_valid():
unit = Unit.objects.get(checksum = form.cleaned_data['checksum'], translation = obj)
unit.target = form.cleaned_data['target']
unit.fuzzy = form.cleaned_data['fuzzy']
unit.save_backend(request)
# Check and save
return HttpResponseRedirect('%s?type=%s&oldpos=%d' % (obj.get_translate_url(), rqtype, pos))
return HttpResponseRedirect('%s?type=%s&oldpos=%d' % (obj.get_translate_url(), rqtype, pos))
else:
# What unit to show
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment