mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2024-11-29 22:23:12 -06:00
Translate templates text
This commit is contained in:
parent
c278fba4c7
commit
7082a5f3ec
@ -80,11 +80,11 @@ def render_tweet(tweet, template, session, relative_times=False, offset_seconds=
|
|||||||
available_data.update(source=tweet.source)
|
available_data.update(source=tweet.source)
|
||||||
if hasattr(tweet, "retweeted_status"):
|
if hasattr(tweet, "retweeted_status"):
|
||||||
if hasattr(tweet.retweeted_status, "quoted_status"):
|
if hasattr(tweet.retweeted_status, "quoted_status"):
|
||||||
text = "RT @{}: {} Quote from @{}: {}".format(session.get_user(tweet.retweeted_status.user).screen_name, process_text(tweet.retweeted_status), session.get_user(tweet.retweeted_status.quoted_status.user).screen_name, process_text(tweet.retweeted_status.quoted_status))
|
text = _"RT @{}: {} Quote from @{}: {}".format(session.get_user(tweet.retweeted_status.user).screen_name, process_text(tweet.retweeted_status), session.get_user(tweet.retweeted_status.quoted_status.user).screen_name, process_text(tweet.retweeted_status.quoted_status))
|
||||||
else:
|
else:
|
||||||
text = "RT @{}: {}".format(session.get_user(tweet.retweeted_status.user).screen_name, process_text(tweet.retweeted_status))
|
text = _"RT @{}: {}".format(session.get_user(tweet.retweeted_status.user).screen_name, process_text(tweet.retweeted_status))
|
||||||
elif hasattr(tweet, "quoted_status"):
|
elif hasattr(tweet, "quoted_status"):
|
||||||
text = "{} Quote from @{}: {}".format(process_text(tweet), session.get_user(tweet.quoted_status.user).screen_name, process_text(tweet.quoted_status))
|
text = "{} _Quote from @{}: {}".format(process_text(tweet), session.get_user(tweet.quoted_status.user).screen_name, process_text(tweet.quoted_status))
|
||||||
else:
|
else:
|
||||||
text = process_text(tweet)
|
text = process_text(tweet)
|
||||||
available_data.update(lang=tweet.lang, text=text)
|
available_data.update(lang=tweet.lang, text=text)
|
||||||
|
Loading…
Reference in New Issue
Block a user