use better strings (adhere to HIG, try to describe better what is going on), make code by dkirov adhere to our coding standards, fix comments and FIXME in comments
This commit is contained in:
parent
55a5678ee4
commit
dd821ac164
|
@ -102,7 +102,7 @@ given account'), False)
|
|||
xa, dnd, invisible '), True),
|
||||
(_('message'), _('status message'), False),
|
||||
(_('account'), _('change status of account "account". \
|
||||
If not specified try to change status of all accounts that \
|
||||
If not specified, try to change status of all accounts that \
|
||||
have "sync with global status" option set'), False)
|
||||
]
|
||||
],
|
||||
|
@ -113,21 +113,21 @@ contact'),
|
|||
('jid', _('jid of the contact that you want to chat \
|
||||
with'),
|
||||
True),
|
||||
(_('account'), _('if specified contact is taken from \
|
||||
(_('account'), _('if specified, contact is taken from \
|
||||
the contact list of this account'), False)
|
||||
]
|
||||
],
|
||||
'send_message':[
|
||||
_('Send new message to a contact in the roster. Both pgp \
|
||||
_('Send new message to a contact in the roster. Both OpenPGP \
|
||||
key and account are optional. If you want to set only \'account\', whitout \
|
||||
\'pgp key\', just set \'pgp key\' to \'\'.'),
|
||||
[
|
||||
('jid', _('jid of the contact that will receive the \
|
||||
message'), True),
|
||||
(_('message'), _('message contents'), True),
|
||||
(_('pgp key'), _('if specified the message will be \
|
||||
(_('pgp key'), _('if specified, the message will be \
|
||||
encrypted using this pulic key'), False),
|
||||
(_('account'), _('if specified the message will be \
|
||||
(_('account'), _('if specified, the message will be \
|
||||
sent using this account'), False),
|
||||
]
|
||||
],
|
||||
|
@ -241,7 +241,7 @@ Please specify account for sending the message.') % sys.argv[2])
|
|||
for argument in command_props[1]:
|
||||
str += ' ' + argument[0] + ' - ' + argument[1] + '\n'
|
||||
return str
|
||||
self.send_error(_(' %s not found') % command)
|
||||
self.send_error(_('%s not found') % command)
|
||||
|
||||
def compose_help(self):
|
||||
''' print usage, and list available commands '''
|
||||
|
|
|
@ -332,11 +332,11 @@ class Connection:
|
|||
self.dispatch('SUBSCRIBED', (jid.getStripped().encode('utf8'),
|
||||
jid.getResource().encode('utf8')))
|
||||
#BE CAREFUL: no con.updateRosterItem() in a callback
|
||||
gajim.log.debug(_('we are now subscribed to %s') % who)
|
||||
gajim.log.debug(_('you are now subscribed to %s') % who)
|
||||
elif ptype == 'unsubscribe':
|
||||
gajim.log.debug(_('unsubscribe request from %s') % who)
|
||||
elif ptype == 'unsubscribed':
|
||||
gajim.log.debug(_('we are now unsubscribed from %s') % who)
|
||||
gajim.log.debug(_('you are now unsubscribed from %s') % who)
|
||||
self.dispatch('UNSUBSCRIBED', prs.getFrom().getStripped())
|
||||
elif ptype == 'error':
|
||||
errmsg = prs.getError()
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
## - Yann Le Boulanger <asterix@lagaule.org>
|
||||
## - Vincent Hanquez <tab@snarc.org>
|
||||
## - Nikos Kouremenos <nkour@jabber.org>
|
||||
## - Dimitur Kirov <dkirov@gmail.com>
|
||||
## - Dimitur Kirov <dkirov@gmail.com>
|
||||
##
|
||||
## Copyright (C) 2003-2005 Gajim Team
|
||||
##
|
||||
|
@ -51,7 +51,7 @@ class SocksQueue:
|
|||
self.idx += 1
|
||||
result = sock5_receiver.connect()
|
||||
self.connected += 1
|
||||
# we don;t need blocking sockets anymore
|
||||
# we don't need blocking sockets anymore
|
||||
# this unblocks ui!
|
||||
sock5_receiver._sock.setblocking(False)
|
||||
return result
|
||||
|
|
|
@ -95,7 +95,7 @@ class EditGroupsDialog:
|
|||
model = self.list.get_model()
|
||||
if model[path][1] and len(self.user.groups) == 1: # we try to remove
|
||||
# the last group
|
||||
ErrorDialog(_("Can't remove last group"),
|
||||
ErrorDialog(_('Cannot remove last group'),
|
||||
_('At least one contact group must be present.')).get_response()
|
||||
return
|
||||
model[path][1] = not model[path][1]
|
||||
|
@ -934,9 +934,9 @@ _('You can not join a group chat unless you are connected.')).get_response()
|
|||
our_jid = gajim.config.get_per('accounts', self.account, 'name') + '@' + \
|
||||
gajim.config.get_per('accounts', self.account, 'hostname')
|
||||
if len(gajim.connections) > 1:
|
||||
title = _('Join Groupchat as %s') % our_jid
|
||||
title = _('Join Group Chat as %s') % our_jid
|
||||
else:
|
||||
title = _('Join Groupchat')
|
||||
title = _('Join Group Chat')
|
||||
self.window.set_title(title)
|
||||
|
||||
self.recently_combobox = self.xml.get_widget('recently_combobox')
|
||||
|
@ -1044,7 +1044,7 @@ _('Without a connection, you can not change your password.')).get_response()
|
|||
continue
|
||||
password2 = self.password2_entry.get_text()
|
||||
if password1 != password2:
|
||||
ErrorDialog(_("Passwords don't match."),
|
||||
ErrorDialog(_('Passwords do not match'),
|
||||
_('The passwords typed in both fields must be identical.')).get_response()
|
||||
continue
|
||||
message = password1
|
||||
|
@ -1095,12 +1095,12 @@ class PopupNotificationWindow:
|
|||
close_button.modify_bg(gtk.STATE_NORMAL, dodgerblue)
|
||||
eventbox.modify_bg(gtk.STATE_NORMAL, dodgerblue)
|
||||
txt = _('From %s') % txt
|
||||
elif event_type == _('File Request'):
|
||||
elif event_type == _('File Trasfer Request'):
|
||||
bg_color = gtk.gdk.color_parse('coral')
|
||||
close_button.modify_bg(gtk.STATE_NORMAL, bg_color)
|
||||
eventbox.modify_bg(gtk.STATE_NORMAL, bg_color)
|
||||
txt = _('From %s') % txt
|
||||
elif event_type in [_('File Completed'), _('File Stopped')]:
|
||||
elif event_type in [_('File Transfer Completed'), _('File Transfer Stopped')]:
|
||||
bg_color = gtk.gdk.color_parse('coral')
|
||||
close_button.modify_bg(gtk.STATE_NORMAL, bg_color)
|
||||
eventbox.modify_bg(gtk.STATE_NORMAL, bg_color)
|
||||
|
@ -1166,17 +1166,17 @@ class PopupNotificationWindow:
|
|||
self.plugin.windows['file_transfers'].show_file_request(
|
||||
self.account, contact, self.file_props)
|
||||
|
||||
elif self.msg_type == 'file-completed': # it's file request
|
||||
sectext ='\t' + _('File Name: %s') % self.file_props['name']
|
||||
sectext +='\n\t' + _('Size: %s') % \
|
||||
elif self.msg_type == 'file-completed': # it's file request # FIXME: comment
|
||||
sectext = '\t' + _('Filename: %s') % self.file_props['name']
|
||||
sectext += '\n\t' + _('Size: %s') % \
|
||||
gtkgui_helpers.convert_bytes(self.file_props['size'])
|
||||
sectext +='\n\t' +_('Sender: %s') % self.jid
|
||||
InformationDialog(_('File Transfer Completed'), sectext).get_response()
|
||||
sectext += '\n\t' +_('Sender: %s') % self.jid
|
||||
InformationDialog(_('File transfer completed'), sectext).get_response()
|
||||
|
||||
elif self.msg_type == 'file-stopped': # it's file request
|
||||
sectext ='\t' + _('File Name: %s') % self.file_props['name']
|
||||
sectext +='\n\t' + _('Sender: %s') % self.jid
|
||||
ErrorDialog(_('File Transfer Stopped by Peer'), \
|
||||
elif self.msg_type == 'file-stopped': # it's file request # FIXME: comment
|
||||
sectext = '\t' + _('Filename: %s') % self.file_props['name']
|
||||
sectext += '\n\t' + _('Sender: %s') % self.jid
|
||||
ErrorDialog(_('File transfer stopped by the contact of the other side'), \
|
||||
sectext).get_response()
|
||||
|
||||
else: # 'chat'
|
||||
|
@ -1341,6 +1341,20 @@ class XMLConsoleWindow:
|
|||
self.input_textview.modify_text(
|
||||
gtk.STATE_NORMAL, gtk.gdk.color_parse('green'))
|
||||
|
||||
|
||||
#st = self.input_textview.get_style()
|
||||
|
||||
|
||||
#style = gtk.Style()
|
||||
#style.font_desc = st.font_desc
|
||||
|
||||
#self.input_textview.set_name('input')
|
||||
#s = '''\
|
||||
style "console" { GtkTextView::cursor-color="%s" }
|
||||
#widget "*.*.input" style : application "console"''' % '#FFFFFF'
|
||||
#gtk.rc_parse_string(s)
|
||||
|
||||
|
||||
self.stanzas_log_textview.modify_base(
|
||||
gtk.STATE_NORMAL, gtk.gdk.color_parse('black'))
|
||||
self.stanzas_log_textview.modify_text(
|
||||
|
@ -1457,10 +1471,10 @@ class FileTransfersWindow:
|
|||
sec_text += '\n\t' + _('Type: %s') % file_props['mime-type']
|
||||
if file_props.has_key('desc'):
|
||||
sec_text += '\n\t' + _('Description: %s') % file_props['desc']
|
||||
prim_text = _(' %s wants to send you file') % contact.jid
|
||||
prim_text = _('%s wants to send you a file:') % contact.jid
|
||||
dialog = ConfirmationDialog(prim_text, sec_text)
|
||||
if dialog.get_response() == gtk.RESPONSE_OK:
|
||||
dialog = gtk.FileChooserDialog(title=_('Save File As...'),
|
||||
dialog = gtk.FileChooserDialog(title=_('Save File as...'),
|
||||
action=gtk.FILE_CHOOSER_ACTION_SAVE,
|
||||
buttons=(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL,
|
||||
gtk.STOCK_SAVE, gtk.RESPONSE_OK))
|
||||
|
|
10
src/gajim.py
10
src/gajim.py
|
@ -657,8 +657,8 @@ class Interface:
|
|||
def handle_event_bad_passphrase(self, account, array):
|
||||
keyID = gajim.config.get_per('accounts', account, 'keyid')
|
||||
self.roster.forget_gpg_passphrase(keyID)
|
||||
dialogs.WarningDialog(_('Your GPG passphrase is incorrect'),
|
||||
_('You are currently connected without your GPG key.')).get_response()
|
||||
dialogs.WarningDialog(_('Your passphrase is incorrect'),
|
||||
_('You are currently connected without your OpenPGP key.')).get_response()
|
||||
|
||||
def handle_event_roster_info(self, account, array):
|
||||
#('ROSTER_INFO', account, (jid, name, sub, ask, groups))
|
||||
|
@ -704,7 +704,7 @@ class Interface:
|
|||
if gajim.config.get('autopopupaway') or \
|
||||
gajim.connections[account].connected in (2, 3): # we're online or chat
|
||||
instance = dialogs.PopupNotificationWindow(self,
|
||||
_('File Request'), jid, account, 'file', file_props)
|
||||
_('File Transfer Request'), jid, account, 'file', file_props)
|
||||
self.roster.popup_notification_windows.append(instance)
|
||||
def handle_event_file_progress(self, account, file_props):
|
||||
self.windows['file_transfers'].set_progress(file_props['type'],
|
||||
|
@ -723,10 +723,10 @@ class Interface:
|
|||
gajim.connections[account].connected in (2, 3): # we're online or chat
|
||||
if file_props['error'] == 0:
|
||||
msg_type = 'file-completed'
|
||||
event_type = _('File Completed')
|
||||
event_type = _('File Transfer Completed')
|
||||
elif file_props['error'] == -1:
|
||||
msg_type = 'file-stopped'
|
||||
event_type = _('File Stopped')
|
||||
event_type = _('File Transfer Stopped')
|
||||
instance = dialogs.PopupNotificationWindow(self, event_type,
|
||||
file_props['sender'].getStripped(), account, msg_type, file_props)
|
||||
self.roster.popup_notification_windows.append(instance)
|
||||
|
|
Loading…
Reference in New Issue