Snake case

merge-requests/30/head
Bob Mottram 2021-12-26 10:50:49 +00:00
parent 4c2b42f3ba
commit d177997063
3 changed files with 8 additions and 8 deletions

View File

@ -20,7 +20,7 @@ from webapp_media import addEmbeddedElements
from utils import local_actor_url from utils import local_actor_url
from utils import get_actor_languages_list from utils import get_actor_languages_list
from utils import getBaseContentFromPost from utils import getBaseContentFromPost
from utils import getContentFromPost from utils import get_content_from_post
from utils import isAccountDir from utils import isAccountDir
from utils import removeHtml from utils import removeHtml
from utils import getConfigParam from utils import getConfigParam
@ -271,8 +271,8 @@ def _htmlBlogPostContent(debug: bool, session, authorized: bool,
languagesUnderstood = [] languagesUnderstood = []
if actor_json: if actor_json:
languagesUnderstood = get_actor_languages_list(actor_json) languagesUnderstood = get_actor_languages_list(actor_json)
jsonContent = getContentFromPost(post_json_object, system_language, jsonContent = get_content_from_post(post_json_object, system_language,
languagesUnderstood) languagesUnderstood)
if jsonContent: if jsonContent:
contentStr = addEmbeddedElements(translate, jsonContent, contentStr = addEmbeddedElements(translate, jsonContent,
peertube_instances) peertube_instances)

View File

@ -77,8 +77,8 @@ def get_actor_languages_list(actor_json: {}) -> []:
return [] return []
def getContentFromPost(post_json_object: {}, system_language: str, def get_content_from_post(post_json_object: {}, system_language: str,
languagesUnderstood: []) -> str: languagesUnderstood: []) -> str:
"""Returns the content from the post in the given language """Returns the content from the post in the given language
including searching for a matching entry within contentMap including searching for a matching entry within contentMap
""" """

View File

@ -27,7 +27,7 @@ from utils import removeHashFromPostId
from utils import removeHtml from utils import removeHtml
from utils import get_actor_languages_list from utils import get_actor_languages_list
from utils import getBaseContentFromPost from utils import getBaseContentFromPost
from utils import getContentFromPost from utils import get_content_from_post
from utils import hasObjectDict from utils import hasObjectDict
from utils import updateAnnounceCollection from utils import updateAnnounceCollection
from utils import isPGPEncrypted from utils import isPGPEncrypted
@ -1855,8 +1855,8 @@ def individualPostAsHtml(signing_priv_key_pem: str,
languagesUnderstood = [] languagesUnderstood = []
if actor_json: if actor_json:
languagesUnderstood = get_actor_languages_list(actor_json) languagesUnderstood = get_actor_languages_list(actor_json)
contentStr = getContentFromPost(post_json_object, system_language, contentStr = get_content_from_post(post_json_object, system_language,
languagesUnderstood) languagesUnderstood)
if not contentStr: if not contentStr:
contentStr = \ contentStr = \
autoTranslatePost(base_dir, post_json_object, autoTranslatePost(base_dir, post_json_object,