not in the roster string can be translated now
This commit is contained in:
parent
e2a3c1121a
commit
f8a4675174
|
@ -688,7 +688,7 @@ class Chat:
|
||||||
allow_add = False
|
allow_add = False
|
||||||
if self.plugin.roster.contacts[self.account].has_key(text):
|
if self.plugin.roster.contacts[self.account].has_key(text):
|
||||||
c = self.plugin.roster.contacts[self.account][text][0]
|
c = self.plugin.roster.contacts[self.account][text][0]
|
||||||
if 'not in the roster' in c.groups:
|
if _('not in the roster') in c.groups:
|
||||||
allow_add = True
|
allow_add = True
|
||||||
else: # he's not at all in the account contacts
|
else: # he's not at all in the account contacts
|
||||||
allow_add = True
|
allow_add = True
|
||||||
|
|
|
@ -101,7 +101,7 @@ class EditGroupsDialog:
|
||||||
store = gtk.ListStore(str, bool)
|
store = gtk.ListStore(str, bool)
|
||||||
self.list.set_model(store)
|
self.list.set_model(store)
|
||||||
for g in self.plugin.roster.groups[self.account].keys():
|
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
|
continue
|
||||||
iter = store.append()
|
iter = store.append()
|
||||||
store.set(iter, 0, g)
|
store.set(iter, 0, g)
|
||||||
|
@ -306,7 +306,7 @@ _('Please fill in the data of the contact you want to add in account %s') %accou
|
||||||
liststore = gtk.ListStore(str)
|
liststore = gtk.ListStore(str)
|
||||||
self.group_comboboxentry.set_model(liststore)
|
self.group_comboboxentry.set_model(liststore)
|
||||||
for g in self.plugin.roster.groups[account].keys():
|
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.group_comboboxentry.append_text(g)
|
||||||
|
|
||||||
self.xml.signal_autoconnect(self)
|
self.xml.signal_autoconnect(self)
|
||||||
|
@ -786,8 +786,8 @@ class PopupNotificationWindow:
|
||||||
if jid in attached_keys:
|
if jid in attached_keys:
|
||||||
keyID = attached_keys[attached_keys.index(jid) + 1]
|
keyID = attached_keys[attached_keys.index(jid) + 1]
|
||||||
user = Contact(jid = self.jid, name = self.jid.split('@')[0],
|
user = Contact(jid = self.jid, name = self.jid.split('@')[0],
|
||||||
groups = ['not in the roster'], show = 'not in the roster',
|
groups = [_('not in the roster')], show = 'not in the roster',
|
||||||
status = 'not in the roster', sub = 'none', keyID = keyID)
|
status = _('not in the roster'), sub = 'none', keyID = keyID)
|
||||||
self.plugin.roster.contacts[self.account][self.jid] = [user]
|
self.plugin.roster.contacts[self.account][self.jid] = [user]
|
||||||
self.plugin.roster.add_contact_to_roster(user.self.jid, self.account)
|
self.plugin.roster.add_contact_to_roster(user.self.jid, self.account)
|
||||||
|
|
||||||
|
|
|
@ -440,8 +440,8 @@ class Interface:
|
||||||
u = self.roster.contacts[account][jid][0]
|
u = self.roster.contacts[account][jid][0]
|
||||||
u.resource = array[1]
|
u.resource = array[1]
|
||||||
self.roster.remove_user(u, account)
|
self.roster.remove_user(u, account)
|
||||||
if 'not in the roster' in u.groups:
|
if _('not in the roster') in u.groups:
|
||||||
u.groups.remove('not in the roster')
|
u.groups.remove(_('not in the roster'))
|
||||||
if len(u.groups) == 0:
|
if len(u.groups) == 0:
|
||||||
u.groups = [_('General')]
|
u.groups = [_('General')]
|
||||||
self.roster.add_contact_to_roster(u.jid, account)
|
self.roster.add_contact_to_roster(u.jid, account)
|
||||||
|
|
|
@ -248,7 +248,7 @@ class RosterWindow:
|
||||||
if user.ask == 'subscribe':
|
if user.ask == 'subscribe':
|
||||||
img = state_images['requested']
|
img = state_images['requested']
|
||||||
else:
|
else:
|
||||||
img = state_images['not in the roster']
|
img = state_images[_('not in the roster')]
|
||||||
for iter in iters:
|
for iter in iters:
|
||||||
model.set_value(iter, 0, img)
|
model.set_value(iter, 0, img)
|
||||||
model.set_value(iter, 1, name)
|
model.set_value(iter, 1, name)
|
||||||
|
@ -659,7 +659,7 @@ class RosterWindow:
|
||||||
history_menuitem.connect('activate', self.on_history, contact,
|
history_menuitem.connect('activate', self.on_history, contact,
|
||||||
account)
|
account)
|
||||||
|
|
||||||
if 'not in the roster' not in contact.groups:
|
if _('not in the roster') not in contact.groups:
|
||||||
#contact is in normal group
|
#contact is in normal group
|
||||||
edit_groups_menuitem.set_no_show_all(False)
|
edit_groups_menuitem.set_no_show_all(False)
|
||||||
assign_openpgp_key_menuitem.set_no_show_all(False)
|
assign_openpgp_key_menuitem.set_no_show_all(False)
|
||||||
|
@ -854,7 +854,7 @@ class RosterWindow:
|
||||||
self.contacts[account][jid] = [user1]
|
self.contacts[account][jid] = [user1]
|
||||||
else:
|
else:
|
||||||
user1 = self.contacts[account][jid][0]
|
user1 = self.contacts[account][jid][0]
|
||||||
if not 'not in the roster' in user1.groups:
|
if not _('not in the roster') in user1.groups:
|
||||||
dialogs.InformationDialog(_('Subscription request has been sent'),
|
dialogs.InformationDialog(_('Subscription request has been sent'),
|
||||||
_('If "%s" accepts this request you will know his status.') %jid).get_response()
|
_('If "%s" accepts this request you will know his status.') %jid).get_response()
|
||||||
return
|
return
|
||||||
|
@ -964,8 +964,8 @@ _('If "%s" accepts this request you will know his status.') %jid).get_response()
|
||||||
del self.contacts[account][u.jid]
|
del self.contacts[account][u.jid]
|
||||||
if user.jid in self.plugin.windows[account]['chats']:
|
if user.jid in self.plugin.windows[account]['chats']:
|
||||||
user1 = Contact(jid = user.jid, name = user.name,
|
user1 = Contact(jid = user.jid, name = user.name,
|
||||||
groups = ['not in the roster'], show = 'not in the roster',
|
groups = [_('not in the roster')], show = _('not in the roster'),
|
||||||
status = 'not in the roster', ask = 'none', keyID = user.keyID)
|
status = _('not in the roster'), ask = 'none', keyID = user.keyID)
|
||||||
self.contacts[account][user.jid] = [user1]
|
self.contacts[account][user.jid] = [user1]
|
||||||
self.add_contact_to_roster(user.jid, account)
|
self.add_contact_to_roster(user.jid, account)
|
||||||
|
|
||||||
|
@ -1151,8 +1151,8 @@ _('If "%s" accepts this request you will know his status.') %jid).get_response()
|
||||||
if jid in attached_keys:
|
if jid in attached_keys:
|
||||||
keyID = attached_keys[attached_keys.index(jid) + 1]
|
keyID = attached_keys[attached_keys.index(jid) + 1]
|
||||||
user = Contact(jid = jid, name = jid.split('@')[0],
|
user = Contact(jid = jid, name = jid.split('@')[0],
|
||||||
groups = ['not in the roster'], show = 'not in the roster',
|
groups = [_('not in the roster')], show = _('not in the roster'),
|
||||||
status = 'not in the roster', sub = 'none', keyID = keyID)
|
status = _('not in the roster'), sub = 'none', keyID = keyID)
|
||||||
self.contacts[account][jid] = [user]
|
self.contacts[account][jid] = [user]
|
||||||
self.add_contact_to_roster(user.jid, account)
|
self.add_contact_to_roster(user.jid, account)
|
||||||
|
|
||||||
|
@ -1185,8 +1185,8 @@ _('If "%s" accepts this request you will know his status.') %jid).get_response()
|
||||||
if jid in attached_keys:
|
if jid in attached_keys:
|
||||||
keyID = attached_keys[attached_keys.index(jid) + 1]
|
keyID = attached_keys[attached_keys.index(jid) + 1]
|
||||||
user1 = Contact(jid = jid, name = jid.split('@')[0],
|
user1 = Contact(jid = jid, name = jid.split('@')[0],
|
||||||
groups = ['not in the roster'], show = 'not in the roster',
|
groups = [_('not in the roster')], show = _('not in the roster'),
|
||||||
status = 'not in the roster', ask = 'none', keyID = keyID)
|
status = _('not in the roster'), ask = 'none', keyID = keyID)
|
||||||
self.contacts[account][jid] = [user1]
|
self.contacts[account][jid] = [user1]
|
||||||
self.add_contact_to_roster(jid, account)
|
self.add_contact_to_roster(jid, account)
|
||||||
|
|
||||||
|
@ -1501,7 +1501,7 @@ _('If "%s" accepts this request you will know his status.') %jid).get_response()
|
||||||
imgs = {}
|
imgs = {}
|
||||||
for state in ('connecting', 'online', 'chat', 'away', 'xa',
|
for state in ('connecting', 'online', 'chat', 'away', 'xa',
|
||||||
'dnd', 'invisible', 'offline', 'error', 'requested',
|
'dnd', 'invisible', 'offline', 'error', 'requested',
|
||||||
'message', 'opened', 'closed', 'not in the roster'):
|
'message', 'opened', 'closed', _('not in the roster')):
|
||||||
|
|
||||||
# try to open a pixfile with the correct method
|
# try to open a pixfile with the correct method
|
||||||
state_file = state.replace(' ', '_')
|
state_file = state.replace(' ', '_')
|
||||||
|
@ -1668,9 +1668,9 @@ _('If "%s" accepts this request you will know his status.') %jid).get_response()
|
||||||
return 1
|
return 1
|
||||||
if name2 == _('Transports'):
|
if name2 == _('Transports'):
|
||||||
return -1
|
return -1
|
||||||
if name1 == 'not in the roster':
|
if name1 == _('not in the roster'):
|
||||||
return 1
|
return 1
|
||||||
if name2 == 'not in the roster':
|
if name2 == _('not in the roster'):
|
||||||
return -1
|
return -1
|
||||||
if type1 == 'contact' and type2 == 'contact' and \
|
if type1 == 'contact' and type2 == 'contact' and \
|
||||||
gajim.config.get('sort_by_show'):
|
gajim.config.get('sort_by_show'):
|
||||||
|
@ -1681,7 +1681,7 @@ _('If "%s" accepts this request you will know his status.') %jid).get_response()
|
||||||
luser1 = self.contacts[account][jid1]
|
luser1 = self.contacts[account][jid1]
|
||||||
luser2 = self.contacts[account][jid2]
|
luser2 = self.contacts[account][jid2]
|
||||||
cshow = {'online':0, 'chat': 1, 'away': 2, 'xa': 3, 'dnd': 4,
|
cshow = {'online':0, 'chat': 1, 'away': 2, 'xa': 3, 'dnd': 4,
|
||||||
'invisible': 5, 'offline': 6, 'not in the roster': 7, 'error': 8}
|
'invisible': 5, 'offline': 6, _('not in the roster'): 7, 'error': 8}
|
||||||
s = self.get_show(luser1)
|
s = self.get_show(luser1)
|
||||||
if s in cshow:
|
if s in cshow:
|
||||||
show1 = cshow[s]
|
show1 = cshow[s]
|
||||||
|
@ -1740,7 +1740,7 @@ _('If "%s" accepts this request you will know his status.') %jid).get_response()
|
||||||
return
|
return
|
||||||
iter_group_source = model.iter_parent(iter_source)
|
iter_group_source = model.iter_parent(iter_source)
|
||||||
grp_source = model.get_value(iter_group_source, 3)
|
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
|
return
|
||||||
account = model.get_value(iter_dest, 4)
|
account = model.get_value(iter_dest, 4)
|
||||||
type_dest = model.get_value(iter_dest, 2)
|
type_dest = model.get_value(iter_dest, 2)
|
||||||
|
|
Loading…
Reference in New Issue