diff --git a/server/core/convert_page_translation.py b/server/core/convert_page_translation.py index e47e3040..11a2d75e 100644 --- a/server/core/convert_page_translation.py +++ b/server/core/convert_page_translation.py @@ -18,9 +18,11 @@ class ModuleDoesNotExistException(Exception): def translate_page(page: Page, locale: Locale): + logger.debug(f"translating page {page} for locale {locale}") translated_page = page.copy_for_translation(locale) revision = translated_page.latest_revision translated_page.publish(revision) + return translated_page # todo: make this a django command @@ -73,6 +75,7 @@ def convert_page_to_translation(slug: str, original_slug: str, language_code="en content_block.locale = locale content_block.save() + logger.debug(f"moving {module} to {translated_topic}") module.move(translated_topic, "last-child") return f"Converted page {slug} to be the {language_code} translation of {original_slug}"