From ff2b00d299ab14586e7783806fd81f475acb4968 Mon Sep 17 00:00:00 2001 From: Eemeli Aro Date: Fri, 20 Dec 2024 00:02:13 +0200 Subject: [PATCH] Rename add_errors() as add_failed_checks() --- pontoon/sync/core/translations_from_repo.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pontoon/sync/core/translations_from_repo.py b/pontoon/sync/core/translations_from_repo.py index 6bc23c87e..f7bee66a8 100644 --- a/pontoon/sync/core/translations_from_repo.py +++ b/pontoon/sync/core/translations_from_repo.py @@ -79,7 +79,7 @@ def write_db_updates( updated_translations, new_translations = update_db_translations( project, updates, user, now ) - add_errors(new_translations) + add_failed_checks(new_translations) add_translation_memory_entries(project, new_translations + updated_translations) @@ -454,12 +454,11 @@ def get_path_locale(path_vars: dict[str, str]) -> str | None: return None -def add_errors(translations: list[Translation]) -> None: +def add_failed_checks(translations: list[Translation]) -> None: """ Run checks on all changed translations from supported resources """ if translations: - # TODO: Resource format should be retained checked_translations = Translation.objects.filter( pk__in=[tx.pk for tx in translations], entity__resource__format__in=DB_FORMATS,