aboutsummaryrefslogtreecommitdiffstats
path: root/translate.py
diff options
context:
space:
mode:
authorPinapelz <yukais@pinapelz.com>2025-04-17 13:08:57 -0700
committerPinapelz <yukais@pinapelz.com>2025-04-17 13:08:57 -0700
commitead6f998b47ff9e9f69ab636a995cbb30acdb775 (patch)
treeefe71ade05f3bd7f0798cf08f8dfaebb7b48bf4b /translate.py
parentac416b6fcc920545377cb98d3418da483dc0e800 (diff)
skip translation when deemed not possible
Diffstat (limited to 'translate.py')
-rw-r--r--translate.py2
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:
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage