[bronger] translate correclt strings during runtime. Fixes #2394

This commit is contained in:
Yann Leboulanger 2006-09-08 22:27:04 +00:00
parent 7fd8d0a29b
commit 152093e42e
7 changed files with 17 additions and 17 deletions

View File

@ -1494,7 +1494,7 @@ class ChatControl(ChatControlBase):
# 2 seconds # 2 seconds
dialog = dialogs.ConfirmationDialog( dialog = dialogs.ConfirmationDialog(
#%s is being replaced in the code with JID #%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, '\ _('If you close this tab and you have history disabled, '\
'this message will be lost.')) 'this message will be lost.'))
if dialog.get_response() != gtk.RESPONSE_OK: if dialog.get_response() != gtk.RESPONSE_OK:

View File

@ -585,8 +585,8 @@ class ConnectionDisco:
iq.setID(id) iq.setID(id)
# Wait the answer during 30 secondes # Wait the answer during 30 secondes
self.awaiting_timeouts[gajim.idlequeue.current_time() + 30] = (id, self.awaiting_timeouts[gajim.idlequeue.current_time() + 30] = (id,
_('Registration information for transport %s has not arrived in time' % \ _('Registration information for transport %s has not arrived in time') % \
agent)) agent)
self.connection.SendAndCallForResponse(iq, self._ReceivedRegInfo, self.connection.SendAndCallForResponse(iq, self._ReceivedRegInfo,
{'agent': agent}) {'agent': agent})

View File

@ -1976,9 +1976,9 @@ class ServiceRegistrationWindow(DataFormWindow):
self.window = self.xml.get_widget('service_registration_window') self.window = self.xml.get_widget('service_registration_window')
self.window.set_transient_for(gajim.interface.roster.window) self.window.set_transient_for(gajim.interface.roster.window)
if infos.has_key('registered'): if infos.has_key('registered'):
self.window.set_title(_('Edit %s' % service)) self.window.set_title(_('Edit %s') % service)
else: 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.xml.get_widget('label').set_text(infos['instructions'])
self.entries = {} self.entries = {}
self.draw_table() self.draw_table()
@ -2272,7 +2272,7 @@ class RemoveAccountWindow:
self.dialog = None self.dialog = None
if gajim.connections[self.account].connected: if gajim.connections[self.account].connected:
self.dialog = dialogs.ConfirmationDialog( 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.'), _('If you remove it, the connection will be lost.'),
on_response_ok = remove) on_response_ok = remove)
else: else:

View File

@ -851,7 +851,7 @@ class FileChooserDialog(gtk.FileChooserDialog):
class BindPortError(HigDialog): class BindPortError(HigDialog):
def __init__(self, port): 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. ' _('Maybe you have another running instance of Gajim. '
'File Transfer will be canceled.')) 'File Transfer will be canceled.'))
@ -1206,7 +1206,7 @@ class NewChatDialog(InputDialog):
if gajim.connections[self.account].connected <= 1: if gajim.connections[self.account].connected <= 1:
#if offline or connecting #if offline or connecting
ErrorDialog(_('Connection not available'), 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 return
if self.completion_dict.has_key(jid): if self.completion_dict.has_key(jid):
@ -1218,7 +1218,7 @@ class NewChatDialog(InputDialog):
ErrorDialog(_('Invalid JID'), e[0]) ErrorDialog(_('Invalid JID'), e[0])
return return
except: except:
ErrorDialog(_('Invalid JID'), _('Unable to parse "%s".' % jid)) ErrorDialog(_('Invalid JID'), _('Unable to parse "%s".') % jid)
return return
gajim.interface.roster.new_chat_from_jid(self.account, jid) gajim.interface.roster.new_chat_from_jid(self.account, jid)
@ -1560,7 +1560,7 @@ class SingleMessageWindow:
if gajim.connections[self.account].connected <= 1: if gajim.connections[self.account].connected <= 1:
# if offline or connecting # if offline or connecting
ErrorDialog(_('Connection not available'), 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 return
to_whom_jid = self.to_entry.get_text().decode('utf-8') to_whom_jid = self.to_entry.get_text().decode('utf-8')
if self.completion_dict.has_key(to_whom_jid): if self.completion_dict.has_key(to_whom_jid):
@ -1587,7 +1587,7 @@ class SingleMessageWindow:
def on_reply_button_clicked(self, widget): def on_reply_button_clicked(self, widget):
# we create a new blank window to send and we preset RE: and to jid # we create a new blank window to send and we preset RE: and to jid
self.subject = _('RE: %s') % self.subject 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 # add > at the begining of each line
self.message = self.message.replace('\n', '\n> ') + '\n\n' self.message = self.message.replace('\n', '\n> ') + '\n\n'
self.window.destroy() self.window.destroy()
@ -1684,7 +1684,7 @@ class XMLConsoleWindow:
if gajim.connections[self.account].connected <= 1: if gajim.connections[self.account].connected <= 1:
#if offline or connecting #if offline or connecting
ErrorDialog(_('Connection not available'), 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 return
begin_iter, end_iter = self.input_tv_buffer.get_bounds() begin_iter, end_iter = self.input_tv_buffer.get_bounds()
stanza = self.input_tv_buffer.get_text(begin_iter, end_iter).decode('utf-8') stanza = self.input_tv_buffer.get_text(begin_iter, end_iter).decode('utf-8')

View File

@ -328,7 +328,7 @@ _('Connection with peer cannot be established.'))
else: else:
dirname = os.path.dirname(file_path) dirname = os.path.dirname(file_path)
if not os.access(dirname, os.W_OK): 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 return
dialog2.destroy() dialog2.destroy()
self._start_receive(file_path, account, contact, file_props) self._start_receive(file_path, account, contact, file_props)

View File

@ -723,8 +723,8 @@ class Interface:
config.ServiceRegistrationWindow(array[0], array[1], account, config.ServiceRegistrationWindow(array[0], array[1], account,
array[2]) array[2])
else: else:
dialogs.ErrorDialog(_('Contact with "%s" cannot be established'\ dialogs.ErrorDialog(_('Contact with "%s" cannot be established')\
% array[0]), _('Check your connection or try again later.')) % array[0], _('Check your connection or try again later.'))
def handle_event_agent_info_items(self, account, array): def handle_event_agent_info_items(self, account, array):
#('AGENT_INFO_ITEMS', account, (agent, node, items)) #('AGENT_INFO_ITEMS', account, (agent, node, items))

View File

@ -464,8 +464,8 @@ class HistoryManager:
except ValueError: except ValueError:
pass pass
file_.write(_('%(who)s on %(time)s said: %(message)s\n' % {'who': who, file_.write(_('%(who)s on %(time)s said: %(message)s\n') % {'who': who,
'time': time_, 'message': message})) 'time': time_, 'message': message})
def _delete_jid_logs(self, liststore, list_of_paths): def _delete_jid_logs(self, liststore, list_of_paths):
paths_len = len(list_of_paths) paths_len = len(list_of_paths)