Commit fc722e51cad923737c2fdab3e15ecb803a69f345
1 parent
ac895b84
Remove name of subdocuments from messages
Showing
1 changed file
with
6 additions
and
7 deletions
collector/storage/views.py
... | ... | @@ -809,7 +809,7 @@ class FinishAnnotationView(RedirectView): |
809 | 809 | 'dodanego żadnego tłumacza.') |
810 | 810 | for subdoc in subdocuments: |
811 | 811 | if subdoc.missing_translator(): |
812 | - messages.warning(request, f'Ostrzeżenie: Poddokument "{subdoc.name}" posiada język oryginału ' | |
812 | + messages.warning(request, f'Ostrzeżenie: Poddokument o ID "{subdoc.id}" posiada język oryginału ' | |
813 | 813 | f'inny niż polski, ale nie ma dodanego żadnego tłumacza.') |
814 | 814 | return render(self.request, 'storage/delete.html', {'msg': 'Czy na pewno chcesz zakończyć anotację dokumentu?', |
815 | 815 | 'submit_btn_text': 'Zakończ'}) |
... | ... | @@ -825,18 +825,17 @@ class FinishAnnotationView(RedirectView): |
825 | 825 | return HttpResponseRedirect(reverse('annotation', kwargs={'doc_id': document.id})) |
826 | 826 | for subdoc in subdocuments: |
827 | 827 | if not subdoc.check_details_filling(): |
828 | - messages.error(request, f'Błąd: Nie wypełniono wszystkich szczegółów poddokumentu o nazwie ' | |
829 | - f'"{subdoc.name}" i ID "{subdoc.id}".') | |
828 | + messages.error(request, f'Błąd: Nie wypełniono wszystkich szczegółów poddokumentu o ID "{subdoc.id}".') | |
830 | 829 | return HttpResponseRedirect(reverse('annotation', kwargs={'doc_id': document.id})) |
831 | 830 | if subdoc.original_lang_error(): |
832 | 831 | messages.error(request, |
833 | - f'Błąd: Poddokument "{subdoc.name}" o ID "{subdoc.id}" posiada tłumacza, ale posiada ' | |
834 | - f'polski język oryginału.') | |
832 | + f'Błąd: Poddokument o ID "{subdoc.id}" posiada tłumacza, ale posiada polski język ' | |
833 | + f'oryginału.') | |
835 | 834 | return HttpResponseRedirect(reverse('annotation', kwargs={'doc_id': document.id})) |
836 | 835 | if len(subdoc.chunks.all()) == 0: |
837 | 836 | messages.error(request, |
838 | - f'Błąd: Poddokument "{subdoc.name}" o ID "{subdoc.id}" nie posiada żadnych sekcji. Usuń ' | |
839 | - f'go przed zakończeniem anotacji.') | |
837 | + f'Błąd: Poddokument o ID "{subdoc.id}" nie posiada żadnych sekcji. Usuń go przed ' | |
838 | + f'zakończeniem anotacji.') | |
840 | 839 | return HttpResponseRedirect(reverse('annotation', kwargs={'doc_id': document.id})) |
841 | 840 | document.change_processing_status('correct') |
842 | 841 | document.save() |
... | ... |