Actually save translation
This commit is contained in:
parent
04666ac331
commit
d080b3d0cd
@ -53,8 +53,13 @@ def translate(request, project, subproject, lang):
|
|||||||
if request.method == 'POST':
|
if request.method == 'POST':
|
||||||
form = TranslationForm(request.POST)
|
form = TranslationForm(request.POST)
|
||||||
if form.is_valid():
|
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
|
# 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:
|
else:
|
||||||
# What unit to show
|
# What unit to show
|
||||||
|
Loading…
Reference in New Issue
Block a user