From e9bb1a92f54ebc9fb626b0ce32c2fe20be503c9b Mon Sep 17 00:00:00 2001
From: Nikos Kouremenos <kourem@gmail.com>
Date: Fri, 3 Jun 2005 18:40:43 +0000
Subject: [PATCH] higing and marking for translation in popup notify

---
 src/dialogs.py |  8 ++++----
 src/gajim.py   | 16 ++++++++--------
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/src/dialogs.py b/src/dialogs.py
index 31a5b73540..54b8d8576a 100644
--- a/src/dialogs.py
+++ b/src/dialogs.py
@@ -689,16 +689,16 @@ class Popup_notification_window:
 		
 		# set colors [ http://www.w3schools.com/html/html_colornames.asp ]
 		self.window.modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse('black'))
-		if event_type == 'Contact signed in':
+		if event_type == _('Contact Signed In'):
 			close_button.modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse('limegreen'))
 			eventbox.modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse('limegreen'))
-		elif event_type == 'Contact signed out':
+		elif event_type == _('Contact Signed Out'):
 			close_button.modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse('red'))
 			eventbox.modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse('red'))
-		elif event_type == 'New Message':
+		elif event_type == _('New Message'):
 			close_button.modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse('dodgerblue'))
 			eventbox.modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse('dodgerblue'))
-			txt = 'From ' + txt
+			txt = _('From %s') % txt
 	
 		# position the window to bottom-right of screen
 		window_width, self.window_height = self.window.get_size()
diff --git a/src/gajim.py b/src/gajim.py
index 3cba134c03..699554fb92 100755
--- a/src/gajim.py
+++ b/src/gajim.py
@@ -306,7 +306,7 @@ class Interface:
 						show_notification = True
 					if show_notification:
 						instance = dialogs.Popup_notification_window(self,
-														'Contact signed in', jid, account)
+														_('Contact Signed In'), jid, account)
 						self.roster.popup_notification_windows.append(instance)
 						
 			elif old_show > 1 and new_show < 2:
@@ -324,13 +324,13 @@ class Interface:
 						show_notification = True
 					if show_notification:
 						instance = dialogs.Popup_notification_window(self,
-											 		'Contact signed out', jid, account)
+											 		_('Contact Signed Out'), jid, account)
 						self.roster.popup_notification_windows.append(instance)
 				
 		elif self.windows[account]['gc'].has_key(ji):
 			#it is a groupchat presence
-			self.windows[account]['gc'][ji].chg_user_status(ji, resource, \
-				array[1], array[2], array[6], array[7], array[8], array[9], \
+			self.windows[account]['gc'][ji].chg_user_status(ji, resource,
+				array[1], array[2], array[6], array[7], array[8], array[9],
 				array[10], array[11], account)
 
 	def handle_event_msg(self, account, array):
@@ -355,13 +355,13 @@ class Interface:
 					show_notification = True
 				if show_notification:
 					instance = dialogs.Popup_notification_window(self,
-																	'New Message', jid, account)
+																_('New Message'), jid, account)
 					self.roster.popup_notification_windows.append(instance)
 		self.roster.on_message(jid, array[1], array[2], account, array[3])
-		if gajim.config.get_per('soundevents', 'first_message_received', \
+		if gajim.config.get_per('soundevents', 'first_message_received',
 			'enabled') and first:
 			self.play_sound('first_message_received')
-		if gajim.config.get_per('soundevents', 'next_message_received', \
+		if gajim.config.get_per('soundevents', 'next_message_received',
 			'enabled') and not first:
 			self.play_sound('next_message_received')
 		
@@ -372,7 +372,7 @@ class Interface:
 			self.windows[account]['gc'][jid].print_conversation('Error %s: %s' % \
 				(array[1], array[2]), jid)
 			if self.windows[account]['gc'][jid].get_active_jid() == jid:
-				self.windows[account]['gc'][jid].set_subject(jid, \
+				self.windows[account]['gc'][jid].set_subject(jid,
 					self.windows[account]['gc'][jid].subjects[jid])
 			return
 		if jid.find('@') <= 0:
-- 
GitLab