From d24b3b69c5dc79e5a6dd53bc6711f7b917e002dd Mon Sep 17 00:00:00 2001
From: Denis Fomin <fominde@gmail.com>
Date: Tue, 6 Aug 2013 23:42:02 +0400
Subject: [PATCH] =?UTF-8?q?[mrDoctorWh=D0=BE=20and=20Darlan]=20Fix=20day?=
 =?UTF-8?q?=20and=20time=20in=20RTL=20message.=20see=20#7284?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 src/conversation_textview.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/conversation_textview.py b/src/conversation_textview.py
index 8c7e31c96f..2751153b89 100644
--- a/src/conversation_textview.py
+++ b/src/conversation_textview.py
@@ -1302,7 +1302,7 @@ class ConversationTextview(gobject.GObject):
         if kind == 'status':
             direction_mark = i18n.direction_mark
         if current_print_time == 'always' and kind != 'info' and not simple:
-            timestamp_str = self.get_time_to_show(tim)
+            timestamp_str = self.get_time_to_show(tim, direction_mark)
             timestamp = time.strftime(timestamp_str, tim)
             timestamp = direction_mark + timestamp
             buffer_.insert_with_tags_by_name(end_iter, timestamp,
@@ -1318,7 +1318,7 @@ class ConversationTextview(gobject.GObject):
                     ft = self.fc.fuzzy_time(gajim.config.get('print_time_fuzzy'), tim)
                     tim_format = ft.decode(locale.getpreferredencoding())
                 else:
-                    tim_format = self.get_time_to_show(tim)
+                    tim_format = self.get_time_to_show(tim, direction_mark)
                 buffer_.insert_with_tags_by_name(end_iter, tim_format + '\n',
                         'time_sometimes')
         # If there's a displaymarking, print it here.
@@ -1373,7 +1373,7 @@ class ConversationTextview(gobject.GObject):
         self.just_cleared = False
         buffer_.end_user_action()
 
-    def get_time_to_show(self, tim):
+    def get_time_to_show(self, tim, direction_mark=''):
         """
         Get the time, with the day before if needed and return it. It DOESN'T
         format a fuzzy time
@@ -1392,7 +1392,7 @@ class ConversationTextview(gobject.GObject):
                 '%(nb_days)i days ago', diff_day, {'nb_days': diff_day},
                 {'nb_days': diff_day})
         if day_str:
-            format_ += day_str + ' '
+            format_ += i18n.direction_mark + day_str + direction_mark + ' '
         timestamp_str = gajim.config.get('time_stamp')
         timestamp_str = helpers.from_one_line(timestamp_str)
         format_ += timestamp_str
-- 
GitLab