Transports string is now marked for translation

This commit is contained in:
Nikos Kouremenos 2005-07-07 17:25:04 +00:00
parent a581b8018d
commit e2a3c1121a
4 changed files with 12 additions and 12 deletions

View File

@ -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'))

View File

@ -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)

View File

@ -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)

View File

@ -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