Skip to content

Commit

Permalink
Rename add_errors() as add_failed_checks()
Browse files Browse the repository at this point in the history
  • Loading branch information
eemeli committed Dec 19, 2024
1 parent c931f71 commit ff2b00d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pontoon/sync/core/translations_from_repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit ff2b00d

Please sign in to comment.