Add language to posts so they can be translated
This commit is contained in:
parent
54ab23a0e4
commit
f577a8b8ca
1 changed files with 6 additions and 1 deletions
7
scl.py
7
scl.py
|
@ -170,6 +170,7 @@ with Session(engine) as session:
|
||||||
status="\n".join(updated_entries),
|
status="\n".join(updated_entries),
|
||||||
in_reply_to_id=existing_record.most_recent_post_id,
|
in_reply_to_id=existing_record.most_recent_post_id,
|
||||||
visibility="public",
|
visibility="public",
|
||||||
|
language="en",
|
||||||
)
|
)
|
||||||
existing_record.most_recent_post_id = mastodon_post_result["id"]
|
existing_record.most_recent_post_id = mastodon_post_result["id"]
|
||||||
|
|
||||||
|
@ -225,7 +226,10 @@ Cause: {}
|
||||||
map_media_post = None
|
map_media_post = None
|
||||||
|
|
||||||
mastodon_post_result = mastodon.status_post(
|
mastodon_post_result = mastodon.status_post(
|
||||||
status=post_text, media_ids=map_media_post, visibility="public"
|
status=post_text,
|
||||||
|
media_ids=map_media_post,
|
||||||
|
visibility="public",
|
||||||
|
language="en",
|
||||||
)
|
)
|
||||||
|
|
||||||
new_outage_record = SclOutage(
|
new_outage_record = SclOutage(
|
||||||
|
@ -253,6 +257,7 @@ Cause: {}
|
||||||
),
|
),
|
||||||
in_reply_to_id=active_outage.most_recent_post_id,
|
in_reply_to_id=active_outage.most_recent_post_id,
|
||||||
visibility="public",
|
visibility="public",
|
||||||
|
language="en",
|
||||||
)
|
)
|
||||||
|
|
||||||
active_outage.most_recent_post_id = mastodon_post_result["id"]
|
active_outage.most_recent_post_id = mastodon_post_result["id"]
|
||||||
|
|
Loading…
Reference in a new issue