[bronger] translate correclt strings during runtime. Fixes #2394
This commit is contained in:
parent
7fd8d0a29b
commit
152093e42e
|
@ -1494,7 +1494,7 @@ class ChatControl(ChatControlBase):
|
|||
# 2 seconds
|
||||
dialog = dialogs.ConfirmationDialog(
|
||||
#%s is being replaced in the code with JID
|
||||
_('You just received a new message from "%s"' % self.contact.jid),
|
||||
_('You just received a new message from "%s"') % self.contact.jid,
|
||||
_('If you close this tab and you have history disabled, '\
|
||||
'this message will be lost.'))
|
||||
if dialog.get_response() != gtk.RESPONSE_OK:
|
||||
|
|
|
@ -585,8 +585,8 @@ class ConnectionDisco:
|
|||
iq.setID(id)
|
||||
# Wait the answer during 30 secondes
|
||||
self.awaiting_timeouts[gajim.idlequeue.current_time() + 30] = (id,
|
||||
_('Registration information for transport %s has not arrived in time' % \
|
||||
agent))
|
||||
_('Registration information for transport %s has not arrived in time') % \
|
||||
agent)
|
||||
self.connection.SendAndCallForResponse(iq, self._ReceivedRegInfo,
|
||||
{'agent': agent})
|
||||
|
||||
|
|
|
@ -1976,9 +1976,9 @@ class ServiceRegistrationWindow(DataFormWindow):
|
|||
self.window = self.xml.get_widget('service_registration_window')
|
||||
self.window.set_transient_for(gajim.interface.roster.window)
|
||||
if infos.has_key('registered'):
|
||||
self.window.set_title(_('Edit %s' % service))
|
||||
self.window.set_title(_('Edit %s') % service)
|
||||
else:
|
||||
self.window.set_title(_('Register to %s' % service))
|
||||
self.window.set_title(_('Register to %s') % service)
|
||||
self.xml.get_widget('label').set_text(infos['instructions'])
|
||||
self.entries = {}
|
||||
self.draw_table()
|
||||
|
@ -2272,7 +2272,7 @@ class RemoveAccountWindow:
|
|||
self.dialog = None
|
||||
if gajim.connections[self.account].connected:
|
||||
self.dialog = dialogs.ConfirmationDialog(
|
||||
_('Account "%s" is connected to the server' % self.account),
|
||||
_('Account "%s" is connected to the server') % self.account,
|
||||
_('If you remove it, the connection will be lost.'),
|
||||
on_response_ok = remove)
|
||||
else:
|
||||
|
|
|
@ -851,7 +851,7 @@ class FileChooserDialog(gtk.FileChooserDialog):
|
|||
|
||||
class BindPortError(HigDialog):
|
||||
def __init__(self, port):
|
||||
ErrorDialog(_('Unable to bind to port %s.' % port),
|
||||
ErrorDialog(_('Unable to bind to port %s.') % port,
|
||||
_('Maybe you have another running instance of Gajim. '
|
||||
'File Transfer will be canceled.'))
|
||||
|
||||
|
@ -1206,7 +1206,7 @@ class NewChatDialog(InputDialog):
|
|||
if gajim.connections[self.account].connected <= 1:
|
||||
#if offline or connecting
|
||||
ErrorDialog(_('Connection not available'),
|
||||
_('Please make sure you are connected with "%s".' % self.account))
|
||||
_('Please make sure you are connected with "%s".') % self.account)
|
||||
return
|
||||
|
||||
if self.completion_dict.has_key(jid):
|
||||
|
@ -1218,7 +1218,7 @@ class NewChatDialog(InputDialog):
|
|||
ErrorDialog(_('Invalid JID'), e[0])
|
||||
return
|
||||
except:
|
||||
ErrorDialog(_('Invalid JID'), _('Unable to parse "%s".' % jid))
|
||||
ErrorDialog(_('Invalid JID'), _('Unable to parse "%s".') % jid)
|
||||
return
|
||||
gajim.interface.roster.new_chat_from_jid(self.account, jid)
|
||||
|
||||
|
@ -1560,7 +1560,7 @@ class SingleMessageWindow:
|
|||
if gajim.connections[self.account].connected <= 1:
|
||||
# if offline or connecting
|
||||
ErrorDialog(_('Connection not available'),
|
||||
_('Please make sure you are connected with "%s".' % self.account))
|
||||
_('Please make sure you are connected with "%s".') % self.account)
|
||||
return
|
||||
to_whom_jid = self.to_entry.get_text().decode('utf-8')
|
||||
if self.completion_dict.has_key(to_whom_jid):
|
||||
|
@ -1587,7 +1587,7 @@ class SingleMessageWindow:
|
|||
def on_reply_button_clicked(self, widget):
|
||||
# we create a new blank window to send and we preset RE: and to jid
|
||||
self.subject = _('RE: %s') % self.subject
|
||||
self.message = _('%s wrote:\n' % self.from_whom) + self.message
|
||||
self.message = _('%s wrote:\n') % self.from_whom + self.message
|
||||
# add > at the begining of each line
|
||||
self.message = self.message.replace('\n', '\n> ') + '\n\n'
|
||||
self.window.destroy()
|
||||
|
@ -1684,7 +1684,7 @@ class XMLConsoleWindow:
|
|||
if gajim.connections[self.account].connected <= 1:
|
||||
#if offline or connecting
|
||||
ErrorDialog(_('Connection not available'),
|
||||
_('Please make sure you are connected with "%s".' % self.account))
|
||||
_('Please make sure you are connected with "%s".') % self.account)
|
||||
return
|
||||
begin_iter, end_iter = self.input_tv_buffer.get_bounds()
|
||||
stanza = self.input_tv_buffer.get_text(begin_iter, end_iter).decode('utf-8')
|
||||
|
|
|
@ -328,7 +328,7 @@ _('Connection with peer cannot be established.'))
|
|||
else:
|
||||
dirname = os.path.dirname(file_path)
|
||||
if not os.access(dirname, os.W_OK):
|
||||
dialogs.ErrorDialog(_('Directory "%s" is not writable' % dirname), _('You do not have permission to create files in this directory.'))
|
||||
dialogs.ErrorDialog(_('Directory "%s" is not writable') % dirname, _('You do not have permission to create files in this directory.'))
|
||||
return
|
||||
dialog2.destroy()
|
||||
self._start_receive(file_path, account, contact, file_props)
|
||||
|
|
|
@ -723,8 +723,8 @@ class Interface:
|
|||
config.ServiceRegistrationWindow(array[0], array[1], account,
|
||||
array[2])
|
||||
else:
|
||||
dialogs.ErrorDialog(_('Contact with "%s" cannot be established'\
|
||||
% array[0]), _('Check your connection or try again later.'))
|
||||
dialogs.ErrorDialog(_('Contact with "%s" cannot be established')\
|
||||
% array[0], _('Check your connection or try again later.'))
|
||||
|
||||
def handle_event_agent_info_items(self, account, array):
|
||||
#('AGENT_INFO_ITEMS', account, (agent, node, items))
|
||||
|
|
|
@ -464,8 +464,8 @@ class HistoryManager:
|
|||
except ValueError:
|
||||
pass
|
||||
|
||||
file_.write(_('%(who)s on %(time)s said: %(message)s\n' % {'who': who,
|
||||
'time': time_, 'message': message}))
|
||||
file_.write(_('%(who)s on %(time)s said: %(message)s\n') % {'who': who,
|
||||
'time': time_, 'message': message})
|
||||
|
||||
def _delete_jid_logs(self, liststore, list_of_paths):
|
||||
paths_len = len(list_of_paths)
|
||||
|
|
Loading…
Reference in New Issue