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

Improve reporting of import progress

We need to be more specific about warning that nothing has been done.
Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent 61d240b8
......@@ -117,27 +117,18 @@ def upload_translation(request, project, subproject, lang):
merge_header=form.cleaned_data['merge_header'],
method=form.cleaned_data['method']
)
if ret:
messages.success(
request,
ungettext(
'File content successfully merged into translation, '
'processed %d string.',
'File content successfully merged into translation, '
'processed %d strings.',
count
) % count
)
else:
messages.info(
messages.info(
request,
ungettext(
'Processed %d string from the uploaded files.',
'Processed %d strings from the uploaded files.',
count
) % count
)
if not ret:
messages.warning(
request,
ungettext(
'There were no new strings in uploaded file, '
'processed %d string.',
'There were no new strings in uploaded file, '
'processed %d strings.',
count
) % count
_('There were no new strings in uploaded file!')
)
except Exception as error:
messages.error(
......
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