diff options
| author | Pinapelz <yukais@pinapelz.com> | 2025-04-17 13:08:57 -0700 |
|---|---|---|
| committer | Pinapelz <yukais@pinapelz.com> | 2025-04-17 13:08:57 -0700 |
| commit | ead6f998b47ff9e9f69ab636a995cbb30acdb775 (patch) | |
| tree | efe71ade05f3bd7f0798cf08f8dfaebb7b48bf4b /translate.py | |
| parent | ac416b6fcc920545377cb98d3418da483dc0e800 (diff) | |
skip translation when deemed not possible
Diffstat (limited to 'translate.py')
| -rw-r--r-- | translate.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/translate.py b/translate.py index 478d3d5..3464bb4 100644 --- a/translate.py +++ b/translate.py @@ -100,6 +100,8 @@ def add_translate_text_to_en(news_post: dict, overrides: list=[]) -> dict: Takes a news post dict as input, then appends the translated EN headline and content to the newspost and returns it """ + if not translation_possible(): + return news_post translated_posts = [] translation_cache = _load_translation_cache() for post in news_post: |
