Handling of understood languages prior to automatic translation

main
Bob Mottram 2021-07-20 14:36:10 +01:00
parent bb3de9e173
commit 882774bc50
1 changed files with 3 additions and 2 deletions

View File

@ -24,6 +24,7 @@ from posts import downloadAnnounce
from posts import populateRepliesJson from posts import populateRepliesJson
from utils import getActorLanguagesList from utils import getActorLanguagesList
from utils import getBaseContentFromPost from utils import getBaseContentFromPost
from utils import getContentFromPost
from utils import hasObjectDict from utils import hasObjectDict
from utils import updateAnnounceCollection from utils import updateAnnounceCollection
from utils import isPGPEncrypted from utils import isPGPEncrypted
@ -1600,8 +1601,8 @@ def individualPostAsHtml(allowDownloads: bool,
languagesUnderstood = [] languagesUnderstood = []
if actorJson: if actorJson:
languagesUnderstood = getActorLanguagesList(actorJson) languagesUnderstood = getActorLanguagesList(actorJson)
contentStr = getBaseContentFromPost(postJsonObject, systemLanguage, contentStr = getContentFromPost(postJsonObject, systemLanguage,
languagesUnderstood) languagesUnderstood)
if not contentStr: if not contentStr:
contentStr = \ contentStr = \
autoTranslatePost(baseDir, postJsonObject, autoTranslatePost(baseDir, postJsonObject,