From d080b3d0cdbf45f6c8a2fe8373b2ceae2e8731dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Wed, 29 Feb 2012 11:44:43 +0100 Subject: [PATCH] Actually save translation --- trans/views.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/trans/views.py b/trans/views.py index 90920e734..e4a8309b2 100644 --- a/trans/views.py +++ b/trans/views.py @@ -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