diff --git a/src/controller/buffers.py b/src/controller/buffers.py index 8ad84a8..8450089 100644 --- a/src/controller/buffers.py +++ b/src/controller/buffers.py @@ -300,7 +300,7 @@ class baseBuffer(object): For this buffer it updates the date of posts in the list.""" post = self.get_post() 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) class feedBuffer(baseBuffer): @@ -809,7 +809,7 @@ class peopleBuffer(feedBuffer): post = self.session.db[self.name]["items"][self.tab.list.get_selected()] if post.has_key("last_seen") == False: return 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) def open_timeline(self, *args, **kwargs): diff --git a/src/fixes/__init__.py b/src/fixes/__init__.py index 34956a9..96f1fbf 100644 --- a/src/fixes/__init__.py +++ b/src/fixes/__init__.py @@ -9,5 +9,5 @@ if hasattr(sys, "frozen"): def setup(): fix_requests.fix() if hasattr(sys, "frozen"): - fix_win32com.fix() - fix_libloader.fix() \ No newline at end of file + fix_libloader.fix() + fix_win32com.fix() \ No newline at end of file diff --git a/src/sessionmanager/renderers.py b/src/sessionmanager/renderers.py index 171332a..f91055c 100644 --- a/src/sessionmanager/renderers.py +++ b/src/sessionmanager/renderers.py @@ -57,7 +57,7 @@ def render_person(status, session): if status.has_key("last_seen"): original_date = arrow.get(status["last_seen"]["time"]) # 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. elif status.has_key("last_seen") == False and status.has_key("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"])) message = "" 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. if status["type"] == "post": message += short_text(status) @@ -129,9 +129,9 @@ def render_message(message, session): 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. 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: - 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" if message.has_key("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"])) message = "" 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"): 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":