fixed some issue when building a distributable file
This commit is contained in:
parent
a0c4ad6af4
commit
353a487ded
@ -300,7 +300,7 @@ class baseBuffer(object):
|
|||||||
For this buffer it updates the date of posts in the list."""
|
For this buffer it updates the date of posts in the list."""
|
||||||
post = self.get_post()
|
post = self.get_post()
|
||||||
original_date = arrow.get(post["date"])
|
original_date = arrow.get(post["date"])
|
||||||
created_at = original_date.humanize(locale=languageHandler.getLanguage())
|
created_at = original_date.humanize(locale=languageHandler.curLang[:2])
|
||||||
self.tab.list.list.SetItem(self.tab.list.get_selected(), 2, created_at)
|
self.tab.list.list.SetItem(self.tab.list.get_selected(), 2, created_at)
|
||||||
|
|
||||||
class feedBuffer(baseBuffer):
|
class feedBuffer(baseBuffer):
|
||||||
@ -809,7 +809,7 @@ class peopleBuffer(feedBuffer):
|
|||||||
post = self.session.db[self.name]["items"][self.tab.list.get_selected()]
|
post = self.session.db[self.name]["items"][self.tab.list.get_selected()]
|
||||||
if post.has_key("last_seen") == False: return
|
if post.has_key("last_seen") == False: return
|
||||||
original_date = arrow.get(post["last_seen"]["time"])
|
original_date = arrow.get(post["last_seen"]["time"])
|
||||||
created_at = original_date.humanize(locale=languageHandler.getLanguage())
|
created_at = original_date.humanize(locale=languageHandler.curLang[:2])
|
||||||
self.tab.list.list.SetItem(self.tab.list.get_selected(), 1, created_at)
|
self.tab.list.list.SetItem(self.tab.list.get_selected(), 1, created_at)
|
||||||
|
|
||||||
def open_timeline(self, *args, **kwargs):
|
def open_timeline(self, *args, **kwargs):
|
||||||
|
@ -9,5 +9,5 @@ if hasattr(sys, "frozen"):
|
|||||||
def setup():
|
def setup():
|
||||||
fix_requests.fix()
|
fix_requests.fix()
|
||||||
if hasattr(sys, "frozen"):
|
if hasattr(sys, "frozen"):
|
||||||
fix_win32com.fix()
|
|
||||||
fix_libloader.fix()
|
fix_libloader.fix()
|
||||||
|
fix_win32com.fix()
|
@ -57,7 +57,7 @@ def render_person(status, session):
|
|||||||
if status.has_key("last_seen"):
|
if status.has_key("last_seen"):
|
||||||
original_date = arrow.get(status["last_seen"]["time"])
|
original_date = arrow.get(status["last_seen"]["time"])
|
||||||
# Translators: This is the date of last seen
|
# Translators: This is the date of last seen
|
||||||
last_seen = _(u"{0}").format(original_date.humanize(locale=languageHandler.getLanguage()),)
|
last_seen = _(u"{0}").format(original_date.humanize(locale=languageHandler.curLang[:2]),)
|
||||||
# Account suspended or deleted.
|
# Account suspended or deleted.
|
||||||
elif status.has_key("last_seen") == False and status.has_key("deactivated"):
|
elif status.has_key("last_seen") == False and status.has_key("deactivated"):
|
||||||
last_seen = _(u"Account deactivated")
|
last_seen = _(u"Account deactivated")
|
||||||
@ -76,7 +76,7 @@ def render_newsfeed_item(status, session):
|
|||||||
user = _(u"{0} has shared the {1}'s post").format(user, session.get_user_name(status["copy_history"][0]["owner_id"]))
|
user = _(u"{0} has shared the {1}'s post").format(user, session.get_user_name(status["copy_history"][0]["owner_id"]))
|
||||||
message = ""
|
message = ""
|
||||||
original_date = arrow.get(status["date"])
|
original_date = arrow.get(status["date"])
|
||||||
created_at = original_date.humanize(locale=languageHandler.getLanguage())
|
created_at = original_date.humanize(locale=languageHandler.curLang[:2])
|
||||||
# handle status updates.
|
# handle status updates.
|
||||||
if status["type"] == "post":
|
if status["type"] == "post":
|
||||||
message += short_text(status)
|
message += short_text(status)
|
||||||
@ -129,9 +129,9 @@ def render_message(message, session):
|
|||||||
original_date = original_date.to(now.tzinfo)
|
original_date = original_date.to(now.tzinfo)
|
||||||
# Format the date here differently depending in if this is the same day for both dates or not.
|
# Format the date here differently depending in if this is the same day for both dates or not.
|
||||||
if original_date.day == now.day:
|
if original_date.day == now.day:
|
||||||
created_at = original_date.format(_(u"H:mm."), locale=languageHandler.getLanguage())
|
created_at = original_date.format(_(u"H:mm."), locale=languageHandler.curLang[:2])
|
||||||
else:
|
else:
|
||||||
created_at = original_date.format(_(u"H:mm. dddd, MMMM D, YYYY"), locale=languageHandler.getLanguage())
|
created_at = original_date.format(_(u"H:mm. dddd, MMMM D, YYYY"), locale=languageHandler.curLang[:2])
|
||||||
# No idea why some messages send "text" instead "body"
|
# No idea why some messages send "text" instead "body"
|
||||||
if message.has_key("body"):
|
if message.has_key("body"):
|
||||||
body = message["body"]
|
body = message["body"]
|
||||||
@ -147,7 +147,7 @@ def render_status(status, session):
|
|||||||
user = _(u"{0} has shared the {1}'s post").format(user, session.get_user_name(status["copy_history"][0]["owner_id"]))
|
user = _(u"{0} has shared the {1}'s post").format(user, session.get_user_name(status["copy_history"][0]["owner_id"]))
|
||||||
message = ""
|
message = ""
|
||||||
original_date = arrow.get(status["date"])
|
original_date = arrow.get(status["date"])
|
||||||
created_at = original_date.humanize(locale=languageHandler.getLanguage())
|
created_at = original_date.humanize(locale=languageHandler.curLang[:2])
|
||||||
if status.has_key("copy_owner_id"):
|
if status.has_key("copy_owner_id"):
|
||||||
user = _(u"{0} has shared the {1}'s post").format(user, session.get_user_name(status["copy_owner_id"]))
|
user = _(u"{0} has shared the {1}'s post").format(user, session.get_user_name(status["copy_owner_id"]))
|
||||||
if status["post_type"] == "post" or status["post_type"] == "copy":
|
if status["post_type"] == "post" or status["post_type"] == "copy":
|
||||||
|
Loading…
Reference in New Issue
Block a user