Log when message has disappeared
This commit is contained in:
parent
6d88952df5
commit
5a77b1b59e
@ -7,6 +7,9 @@ from django.contrib import messages
|
|||||||
|
|
||||||
from trans.models import Project, SubProject, Translation, Unit
|
from trans.models import Project, SubProject, Translation, Unit
|
||||||
from trans.forms import TranslationForm
|
from trans.forms import TranslationForm
|
||||||
|
import logging
|
||||||
|
|
||||||
|
logger = logging.getLogger('weblate')
|
||||||
|
|
||||||
def home(request):
|
def home(request):
|
||||||
projects = Project.objects.all()
|
projects = Project.objects.all()
|
||||||
@ -68,6 +71,7 @@ def translate(request, project, subproject, lang):
|
|||||||
# 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))
|
||||||
except Unit.DoesNotExist:
|
except Unit.DoesNotExist:
|
||||||
|
logger.error('message %s disappeared!', form.cleaned_data['checksum'])
|
||||||
messages.add_message(request, messages.ERROR, _('Message you wanted to translate is no longer available!'))
|
messages.add_message(request, messages.ERROR, _('Message you wanted to translate is no longer available!'))
|
||||||
|
|
||||||
# If we failed to get unit above or on no POST
|
# If we failed to get unit above or on no POST
|
||||||
|
Loading…
Reference in New Issue
Block a user