From e2a3c1121ab4b0c20332a374e656c09fb61d5e7d Mon Sep 17 00:00:00 2001 From: Nikos Kouremenos Date: Thu, 7 Jul 2005 17:25:04 +0000 Subject: [PATCH] Transports string is now marked for translation --- src/config.py | 4 ++-- src/dialogs.py | 6 +++--- src/roster_window.py | 12 ++++++------ src/systray.py | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/config.py b/src/config.py index 877635450..6f14ef7f7 100644 --- a/src/config.py +++ b/src/config.py @@ -1633,7 +1633,7 @@ class ServiceRegistrationWindow: del self.infos['registered'] else: user1 = Contact(jid = self.service, name = self.service, - groups = ['Transports'], show = 'offline', status = 'offline', + groups = [_('Transports')], show = 'offline', status = 'offline', sub = 'from') self.plugin.roster.contacts[self.account][self.service] = [user1] self.plugin.roster.add_contact_to_roster(self.service, self.account) @@ -2103,7 +2103,7 @@ _('Without a connection, you can not browse available services')).get_response() registered_transports = [] contacts = self.plugin.roster.contacts[self.account] for j in contacts: - if 'Transports' in contacts[j][0].groups: + if _('Transports') in contacts[j][0].groups: registered_transports.append(j) if jid in registered_transports: self.register_button.set_label(_('_Edit')) diff --git a/src/dialogs.py b/src/dialogs.py index a9d406bf4..83f58746c 100644 --- a/src/dialogs.py +++ b/src/dialogs.py @@ -101,7 +101,7 @@ class EditGroupsDialog: store = gtk.ListStore(str, bool) self.list.set_model(store) for g in self.plugin.roster.groups[self.account].keys(): - if g in ['Transports', 'not in the roster']: + if g in [_('Transports'), 'not in the roster']: continue iter = store.append() store.set(iter, 0, g) @@ -270,7 +270,7 @@ _('Please fill in the data of the contact you want to add in account %s') %accou jid_agents = [] for j in self.plugin.roster.contacts[account]: user = self.plugin.roster.contacts[account][j][0] - if 'Transports' in user.groups and user.show != 'offline' and \ + if _('Transports') in user.groups and user.show != 'offline' and \ user.show != 'error': jid_agents.append(j) for a in jid_agents: @@ -306,7 +306,7 @@ _('Please fill in the data of the contact you want to add in account %s') %accou liststore = gtk.ListStore(str) self.group_comboboxentry.set_model(liststore) for g in self.plugin.roster.groups[account].keys(): - if g != 'not in the roster' and g != 'Transports': + if g != 'not in the roster' and g != _('Transports'): self.group_comboboxentry.append_text(g) self.xml.signal_autoconnect(self) diff --git a/src/roster_window.py b/src/roster_window.py index 517285fe6..f92dab01c 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -118,12 +118,12 @@ class RosterWindow: users = self.contacts[account][jid] user = users[0] if user.jid.find('@') <= 0: # if not '@' or '@' starts the jid ==> agent - user.groups = ['Transports'] + user.groups = [_('Transports')] elif user.groups == []: user.groups.append(_('General')) if (user.show == 'offline' or user.show == 'error') and \ - not showOffline and (not 'Transports' in user.groups or \ + not showOffline and (not _('Transports') in user.groups or \ gajim.connections[account].connected < 2) and \ not self.plugin.queues[account].has_key(user.jid): return @@ -146,7 +146,7 @@ class RosterWindow: self.tree.expand_row((model.get_path(iterG)[0]), False) typestr = 'contact' - if g == 'Transports': + if g == _('Transports'): typestr = 'agent' model.append(iterG, [self.jabber_state_images[user.show], user.name, @@ -1664,9 +1664,9 @@ _('If "%s" accepts this request you will know his status.') %jid).get_response() type1 = model.get_value(iter1, 2) type2 = model.get_value(iter2, 2) if type1 == 'group': - if name1 == 'Transports': + if name1 == _('Transports'): return 1 - if name2 == 'Transports': + if name2 == _('Transports'): return -1 if name1 == 'not in the roster': return 1 @@ -1740,7 +1740,7 @@ _('If "%s" accepts this request you will know his status.') %jid).get_response() return iter_group_source = model.iter_parent(iter_source) grp_source = model.get_value(iter_group_source, 3) - if grp_source == 'Transports' or grp_source == 'not in the roster': + if grp_source == _('Transports') or grp_source == 'not in the roster': return account = model.get_value(iter_dest, 4) type_dest = model.get_value(iter_dest, 2) diff --git a/src/systray.py b/src/systray.py index 595cdc589..d06cb6afc 100644 --- a/src/systray.py +++ b/src/systray.py @@ -205,7 +205,7 @@ class Systray: groups_menu = gtk.Menu() for group in self.plugin.roster.groups[account].keys(): - if group == 'Transports': + if group == _('Transports'): continue # at least one 'not offline' or 'without errors' in this group at_least_one = False