better transltion strings. see #4166
This commit is contained in:
parent
798c412c85
commit
fa2d983354
8 changed files with 60 additions and 50 deletions
|
@ -1660,9 +1660,9 @@ class ChatControl(ChatControlBase):
|
||||||
self.print_conversation(_('Usage: /%s, hide the chat buttons.') % \
|
self.print_conversation(_('Usage: /%s, hide the chat buttons.') % \
|
||||||
command, 'info')
|
command, 'info')
|
||||||
elif command == 'me':
|
elif command == 'me':
|
||||||
self.print_conversation(_('Usage: /%s <action>, sends action to the '
|
self.print_conversation(_('Usage: /%(command)s <action>, sends action '
|
||||||
'current group chat. Use third person. (e.g. /%s explodes.)') % \
|
'to the current group chat. Use third person. (e.g. /%s explodes.)'
|
||||||
(command, command), 'info')
|
) % {'command': command}, 'info')
|
||||||
elif command == 'ping':
|
elif command == 'ping':
|
||||||
self.print_conversation(_('Usage: /%s, sends a ping to the contact') %\
|
self.print_conversation(_('Usage: /%s, sends a ping to the contact') %\
|
||||||
command, 'info')
|
command, 'info')
|
||||||
|
@ -2590,8 +2590,8 @@ class ChatControl(ChatControlBase):
|
||||||
self.update_ui()
|
self.update_ui()
|
||||||
self.parent_win.redraw_tab(self)
|
self.parent_win.redraw_tab(self)
|
||||||
|
|
||||||
self.print_conversation(_('%s is now %s') % (name, uf_show),
|
self.print_conversation(_('%(name)s is now %(status)s') % {'name': name,
|
||||||
'status')
|
'status': uf_show}, 'status')
|
||||||
|
|
||||||
if status:
|
if status:
|
||||||
self.print_conversation(' (', 'status', simple=True)
|
self.print_conversation(' (', 'status', simple=True)
|
||||||
|
|
|
@ -167,7 +167,7 @@ class Config:
|
||||||
'key_up_lines': [opt_int, 25, _('How many lines to store for Ctrl+KeyUP.')],
|
'key_up_lines': [opt_int, 25, _('How many lines to store for Ctrl+KeyUP.')],
|
||||||
'version': [ opt_str, defs.version ], # which version created the config
|
'version': [ opt_str, defs.version ], # which version created the config
|
||||||
'search_engine': [opt_str, 'http://www.google.com/search?&q=%s&sourceid=gajim'],
|
'search_engine': [opt_str, 'http://www.google.com/search?&q=%s&sourceid=gajim'],
|
||||||
'dictionary_url': [opt_str, 'WIKTIONARY', _("Either custom url with %s in it where %s is the word/phrase or 'WIKTIONARY' which means use wiktionary.")],
|
'dictionary_url': [opt_str, 'WIKTIONARY', _("Either custom url with %%s in it where %%s is the word/phrase or 'WIKTIONARY' which means use wiktionary.")],
|
||||||
'always_english_wikipedia': [opt_bool, False],
|
'always_english_wikipedia': [opt_bool, False],
|
||||||
'always_english_wiktionary': [opt_bool, True],
|
'always_english_wiktionary': [opt_bool, True],
|
||||||
'remote_control': [opt_bool, True, _('If checked, Gajim can be controlled remotely using gajim-remote.'), True],
|
'remote_control': [opt_bool, True, _('If checked, Gajim can be controlled remotely using gajim-remote.'), True],
|
||||||
|
@ -650,4 +650,4 @@ class Config:
|
||||||
self.set_per('defaultstatusmsg', status, 'enabled', default[0])
|
self.set_per('defaultstatusmsg', status, 'enabled', default[0])
|
||||||
self.set_per('defaultstatusmsg', status, 'message', default[1])
|
self.set_per('defaultstatusmsg', status, 'message', default[1])
|
||||||
|
|
||||||
# vim: se ts=3:
|
# vim: se ts=3:
|
||||||
|
|
|
@ -269,8 +269,8 @@ class Connection(ConnectionHandlers):
|
||||||
# it's a new account
|
# it's a new account
|
||||||
if not data[1]: # wrong answer
|
if not data[1]: # wrong answer
|
||||||
self.dispatch('ACC_NOT_OK', (
|
self.dispatch('ACC_NOT_OK', (
|
||||||
_('Server %s answered wrongly to register request: %s')\
|
_('Server %(name)s answered wrongly to register request: '
|
||||||
% (data[0], data[3])))
|
'%(error)s') % {'name': data[0], 'error': data[3]}))
|
||||||
return
|
return
|
||||||
is_form = data[2]
|
is_form = data[2]
|
||||||
conf = data[1]
|
conf = data[1]
|
||||||
|
@ -335,8 +335,8 @@ class Connection(ConnectionHandlers):
|
||||||
return
|
return
|
||||||
if not data[1]: # wrong answer
|
if not data[1]: # wrong answer
|
||||||
self.dispatch('ERROR', (_('Invalid answer'),
|
self.dispatch('ERROR', (_('Invalid answer'),
|
||||||
_('Transport %s answered wrongly to register request: %s') % \
|
_('Transport %(name)s answered wrongly to register request: '
|
||||||
(data[0], data[3])))
|
'%(error)s') % {'name': data[0], 'error': data[3]}))
|
||||||
return
|
return
|
||||||
is_form = data[2]
|
is_form = data[2]
|
||||||
conf = data[1]
|
conf = data[1]
|
||||||
|
@ -1182,7 +1182,8 @@ class Connection(ConnectionHandlers):
|
||||||
if original_message != None:
|
if original_message != None:
|
||||||
log_msg = original_message
|
log_msg = original_message
|
||||||
if subject:
|
if subject:
|
||||||
log_msg = _('Subject: %s\n%s') % (subject, msg)
|
log_msg = _('Subject: %(subject)s\n%(message)s') % \
|
||||||
|
{'subject': subject, 'message': msg}
|
||||||
if log_msg:
|
if log_msg:
|
||||||
if type == 'chat':
|
if type == 'chat':
|
||||||
kind = 'chat_msg_sent'
|
kind = 'chat_msg_sent'
|
||||||
|
|
|
@ -442,7 +442,8 @@ class ConnectionZeroconf(ConnectionHandlersZeroconf):
|
||||||
ji not in no_log_for:
|
ji not in no_log_for:
|
||||||
log_msg = msg
|
log_msg = msg
|
||||||
if subject:
|
if subject:
|
||||||
log_msg = _('Subject: %s\n%s') % (subject, msg)
|
log_msg = _('Subject: %(subject)s\n%(message)s') % \
|
||||||
|
{'subject': subject, 'message': msg}
|
||||||
if log_msg:
|
if log_msg:
|
||||||
if type == 'chat':
|
if type == 'chat':
|
||||||
kind = 'chat_msg_sent'
|
kind = 'chat_msg_sent'
|
||||||
|
@ -554,4 +555,4 @@ class ConnectionZeroconf(ConnectionHandlersZeroconf):
|
||||||
|
|
||||||
# END ConnectionZeroconf
|
# END ConnectionZeroconf
|
||||||
|
|
||||||
# vim: se ts=3:
|
# vim: se ts=3:
|
||||||
|
|
|
@ -3243,10 +3243,10 @@ class AccountCreationWizardWindow:
|
||||||
# An SSL warning occured, show it
|
# An SSL warning occured, show it
|
||||||
hostname = gajim.connections[self.account].new_account_info['hostname']
|
hostname = gajim.connections[self.account].new_account_info['hostname']
|
||||||
self.xml.get_widget('ssl_label').set_markup(_('<b>Security Warning</b>'
|
self.xml.get_widget('ssl_label').set_markup(_('<b>Security Warning</b>'
|
||||||
'\n\nThe authenticity of the %s SSL certificate could be invalid.\n'
|
'\n\nThe authenticity of the %(hostname)s SSL certificate could be '
|
||||||
'SSL Error: %s\n'
|
'invalid.\nSSL Error: %(error)s\n'
|
||||||
'Do you still want to connect to this server?') % (hostname,
|
'Do you still want to connect to this server?') % {
|
||||||
ssl_msg))
|
'hostname': hostname, 'error': ssl_msg})
|
||||||
if ssl_err in (18, 27):
|
if ssl_err in (18, 27):
|
||||||
text = _('Add this certificate to the list of trusted certificates.\nSHA1 fingerprint of the certificate:\n%s') % ssl_fingerprint
|
text = _('Add this certificate to the list of trusted certificates.\nSHA1 fingerprint of the certificate:\n%s') % ssl_fingerprint
|
||||||
self.xml.get_widget('ssl_checkbutton').set_label(text)
|
self.xml.get_widget('ssl_checkbutton').set_label(text)
|
||||||
|
|
|
@ -1591,8 +1591,9 @@ class SubscriptionRequestWindow:
|
||||||
self.account = account
|
self.account = account
|
||||||
self.user_nick = user_nick
|
self.user_nick = user_nick
|
||||||
if len(gajim.connections) >= 2:
|
if len(gajim.connections) >= 2:
|
||||||
prompt_text = _('Subscription request for account %s from %s')\
|
prompt_text = \
|
||||||
% (account, self.jid)
|
_('Subscription request for account %(account)s from %(jid)s')\
|
||||||
|
% {'account': account, 'jid': self.jid}
|
||||||
else:
|
else:
|
||||||
prompt_text = _('Subscription request from %s') % self.jid
|
prompt_text = _('Subscription request from %s') % self.jid
|
||||||
xml.get_widget('from_label').set_text(prompt_text)
|
xml.get_widget('from_label').set_text(prompt_text)
|
||||||
|
@ -2606,11 +2607,13 @@ class PrivacyListWindow:
|
||||||
self.global_rules = {}
|
self.global_rules = {}
|
||||||
for rule in rules:
|
for rule in rules:
|
||||||
if rule.has_key('type'):
|
if rule.has_key('type'):
|
||||||
text_item = _('Order: %s, action: %s, type: %s, value: %s') % \
|
text_item = _('Order: %(order)s, action: %(action)s, type: %(type)s'
|
||||||
(rule['order'], rule['action'], rule['type'], rule['value'])
|
', value: %(value)s') % {'order': rule['order'],
|
||||||
|
'action': rule['action'], 'type': rule['type'],
|
||||||
|
'value': rule['value']}
|
||||||
else:
|
else:
|
||||||
text_item = _('Order: %s, action: %s') % (rule['order'],
|
text_item = _('Order: %(order)s, action: %(action)s') % \
|
||||||
rule['action'])
|
{'order': rule['order'], 'action': rule['action']}
|
||||||
self.global_rules[text_item] = rule
|
self.global_rules[text_item] = rule
|
||||||
self.list_of_rules_combobox.append_text(text_item)
|
self.list_of_rules_combobox.append_text(text_item)
|
||||||
if len(rules) == 0:
|
if len(rules) == 0:
|
||||||
|
@ -3808,7 +3811,7 @@ class ESessionInfoWindow:
|
||||||
self.window.show_all()
|
self.window.show_all()
|
||||||
|
|
||||||
def update_info(self):
|
def update_info(self):
|
||||||
labeltext = _('''Your chat session with %s is encrypted.\n\nThis session's Short Authentication String is: %s''') % (self.session.jid, self.session.sas)
|
labeltext = _('''Your chat session with %(jid)s is encrypted.\n\nThis session's Short Authentication String is: %(sas)s''') % {'jid': self.session.jid, 'sas': self.session.sas}
|
||||||
|
|
||||||
if self.session.verified_identity:
|
if self.session.verified_identity:
|
||||||
labeltext += '\n\n' + _('''You have already verified this contact's identity.''')
|
labeltext += '\n\n' + _('''You have already verified this contact's identity.''')
|
||||||
|
@ -3827,7 +3830,7 @@ class ESessionInfoWindow:
|
||||||
|
|
||||||
def on_verify_now_button_clicked(self, widget):
|
def on_verify_now_button_clicked(self, widget):
|
||||||
pritext = _('''Have you verified the remote contact's identity?''')
|
pritext = _('''Have you verified the remote contact's identity?''')
|
||||||
sectext = _('''To prevent a man-in-the-middle attack, you should speak to %s directly (in person or on the phone) and verify that they see the same Short Authentication String (SAS) as you.\n\nThis session's Short Authentication String: <b>%s</b>''') % (self.session.jid, self.session.sas)
|
sectext = _('''To prevent a man-in-the-middle attack, you should speak to %(jid)s directly (in person or on the phone) and verify that they see the same Short Authentication String (SAS) as you.\n\nThis session's Short Authentication String: <b>%(sas)s</b>''') % {'jid': self.session.jid, 'sas': self.session.sas}
|
||||||
sectext += '\n\n' + _('Did you talk to the remote contact and verify the SAS?')
|
sectext += '\n\n' + _('Did you talk to the remote contact and verify the SAS?')
|
||||||
|
|
||||||
dialog = YesNoDialog(pritext, sectext)
|
dialog = YesNoDialog(pritext, sectext)
|
||||||
|
|
11
src/disco.py
11
src/disco.py
|
@ -735,8 +735,9 @@ class AgentBrowser:
|
||||||
|
|
||||||
def _set_initial_title(self):
|
def _set_initial_title(self):
|
||||||
'''Set the initial window title based on agent address.'''
|
'''Set the initial window title based on agent address.'''
|
||||||
self.window.window.set_title(_('Browsing %s using account %s') % \
|
self.window.window.set_title(_('Browsing %(address)s using account '
|
||||||
(self._get_agent_address(), self.account))
|
'%(account)s') % {'address': self._get_agent_address(),
|
||||||
|
'account': self.account})
|
||||||
self.window._set_window_banner_text(self._get_agent_address())
|
self.window._set_window_banner_text(self._get_agent_address())
|
||||||
|
|
||||||
def _create_treemodel(self):
|
def _create_treemodel(self):
|
||||||
|
@ -1368,8 +1369,8 @@ class ToplevelAgentBrowser(AgentBrowser):
|
||||||
|
|
||||||
fraction = 0
|
fraction = 0
|
||||||
if self._total_items:
|
if self._total_items:
|
||||||
self.window.progressbar.set_text(_("Scanning %d / %d..") %\
|
self.window.progressbar.set_text(_("Scanning %(current)d / %(total)d.."
|
||||||
(self._progress, self._total_items))
|
) % {'current': self._progress, 'total': self._total_items})
|
||||||
fraction = float(self._progress) / float(self._total_items)
|
fraction = float(self._progress) / float(self._total_items)
|
||||||
if self._progress >= self._total_items:
|
if self._progress >= self._total_items:
|
||||||
# We show the progressbar for just a bit before hiding it.
|
# We show the progressbar for just a bit before hiding it.
|
||||||
|
@ -1996,4 +1997,4 @@ class DiscussionGroupsBrowser(AgentBrowser):
|
||||||
# Fill the global agent type info dictionary
|
# Fill the global agent type info dictionary
|
||||||
_agent_type_info = _gen_agent_type_info()
|
_agent_type_info = _gen_agent_type_info()
|
||||||
|
|
||||||
# vim: se ts=3:
|
# vim: se ts=3:
|
||||||
|
|
42
src/gajim.py
42
src/gajim.py
|
@ -463,8 +463,8 @@ class PassphraseRequest:
|
||||||
|
|
||||||
def create_dialog(self, account):
|
def create_dialog(self, account):
|
||||||
title = _('Passphrase Required')
|
title = _('Passphrase Required')
|
||||||
second = _('Enter GPG key passphrase for key %s (account %s).'
|
second = _('Enter GPG key passphrase for key %(keyid)s (account '
|
||||||
) % (self.keyid, account)
|
'%(account)s).') % {'kayid': self.keyid, 'account': account}
|
||||||
|
|
||||||
def _cancel():
|
def _cancel():
|
||||||
# user cancelled, continue without GPG
|
# user cancelled, continue without GPG
|
||||||
|
@ -544,9 +544,9 @@ class Interface:
|
||||||
sec_msg = _('Do you accept this request on account %s?') % account
|
sec_msg = _('Do you accept this request on account %s?') % account
|
||||||
if data[4]:
|
if data[4]:
|
||||||
sec_msg = data[4] + '\n' + sec_msg
|
sec_msg = data[4] + '\n' + sec_msg
|
||||||
self.dialog = dialogs.YesNoDialog(_('HTTP (%s) Authorization for %s (id: %s)') \
|
self.dialog = dialogs.YesNoDialog(_('HTTP (%(method)s) Authorization for '
|
||||||
% (data[0], data[1], data[2]), sec_msg,
|
'%(url)s (id: %(id)s)') % {'method': data[0], 'url': data[1],
|
||||||
on_response_yes=(on_yes, account, data[3]),
|
'id': data[2]}, sec_msg, on_response_yes=(on_yes, account, data[3]),
|
||||||
on_response_no=(response, account, data[3], 'no'))
|
on_response_no=(response, account, data[3], 'no'))
|
||||||
|
|
||||||
def handle_event_error_answer(self, account, array):
|
def handle_event_error_answer(self, account, array):
|
||||||
|
@ -935,11 +935,12 @@ class Interface:
|
||||||
name = nick, show = show)
|
name = nick, show = show)
|
||||||
ctrl = self.new_private_chat(gc_c, account, session)
|
ctrl = self.new_private_chat(gc_c, account, session)
|
||||||
|
|
||||||
ctrl.print_conversation('Error %s: %s' % (array[1], array[2]),
|
ctrl.print_conversation(_('Error %(code)s: %(msg)s') % {
|
||||||
'status')
|
'error': array[1], 'msg': array[2]}, 'status')
|
||||||
return
|
return
|
||||||
|
|
||||||
gc_control.print_conversation('Error %s: %s' % (array[1], array[2]))
|
gc_control.print_conversation(_('Error %(code)s: %(msg)s') % {
|
||||||
|
'error': array[1], 'msg': array[2]}, 'status')
|
||||||
if gc_control.parent_win and gc_control.parent_win.get_active_jid() == jid:
|
if gc_control.parent_win and gc_control.parent_win.get_active_jid() == jid:
|
||||||
gc_control.set_subject(gc_control.subject)
|
gc_control.set_subject(gc_control.subject)
|
||||||
return
|
return
|
||||||
|
@ -948,7 +949,8 @@ class Interface:
|
||||||
jid = jid.replace('@', '')
|
jid = jid.replace('@', '')
|
||||||
msg = array[2]
|
msg = array[2]
|
||||||
if array[3]:
|
if array[3]:
|
||||||
msg = _('error while sending %s ( %s )') % (array[3], msg)
|
msg = _('error while sending %(message)s ( %(error)s )') % {
|
||||||
|
'message': array[3], 'error': msg}
|
||||||
array[5].roster_message(jid, msg, array[4], msg_type='error')
|
array[5].roster_message(jid, msg, array[4], msg_type='error')
|
||||||
|
|
||||||
def handle_event_msgsent(self, account, array):
|
def handle_event_msgsent(self, account, array):
|
||||||
|
@ -960,7 +962,8 @@ class Interface:
|
||||||
|
|
||||||
def handle_event_msgnotsent(self, account, array):
|
def handle_event_msgnotsent(self, account, array):
|
||||||
#('MSGNOTSENT', account, (jid, ierror_msg, msg, time, session))
|
#('MSGNOTSENT', account, (jid, ierror_msg, msg, time, session))
|
||||||
msg = _('error while sending %s ( %s )') % (array[2], array[1])
|
msg = _('error while sending %(message)s ( %(error)s )') % {
|
||||||
|
'message': array[2], 'error': array[1]}
|
||||||
array[4].roster_message(array[0], msg, array[3], account,
|
array[4].roster_message(array[0], msg, array[3], account,
|
||||||
msg_type='error')
|
msg_type='error')
|
||||||
|
|
||||||
|
@ -1231,8 +1234,8 @@ class Interface:
|
||||||
statusCode = array[9]
|
statusCode = array[9]
|
||||||
if '303' in statusCode:
|
if '303' in statusCode:
|
||||||
new_nick = array[10]
|
new_nick = array[10]
|
||||||
ctrl.print_conversation(_('%s is now known as %s') % (nick,
|
ctrl.print_conversation(_('%(nick)s is now known as %(new_nick)s') \
|
||||||
new_nick), 'status')
|
% {'nick': nick, 'new_nick': new_nick}, 'status')
|
||||||
gc_c = gajim.contacts.get_gc_contact(account, room_jid, new_nick)
|
gc_c = gajim.contacts.get_gc_contact(account, room_jid, new_nick)
|
||||||
c = gajim.contacts.contact_from_gc_contact(gc_c)
|
c = gajim.contacts.contact_from_gc_contact(gc_c)
|
||||||
ctrl.gc_contact = gc_c
|
ctrl.gc_contact = gc_c
|
||||||
|
@ -1246,8 +1249,8 @@ class Interface:
|
||||||
contact.show = show
|
contact.show = show
|
||||||
contact.status = status
|
contact.status = status
|
||||||
uf_show = helpers.get_uf_show(show)
|
uf_show = helpers.get_uf_show(show)
|
||||||
ctrl.print_conversation(_('%s is now %s') % (nick, uf_show),
|
ctrl.print_conversation(_('%(nick)s is now %(status)s') % {
|
||||||
'status')
|
'nick': nick, 'status': uf_show}, 'status')
|
||||||
if status:
|
if status:
|
||||||
ctrl.print_conversation(' (', 'status', simple=True)
|
ctrl.print_conversation(' (', 'status', simple=True)
|
||||||
ctrl.print_conversation('%s' % (status), 'status', simple=True)
|
ctrl.print_conversation('%s' % (status), 'status', simple=True)
|
||||||
|
@ -2024,10 +2027,10 @@ class Interface:
|
||||||
self.handle_event_status(account, 'offline')
|
self.handle_event_status(account, 'offline')
|
||||||
pritext = _('SSL certificate error')
|
pritext = _('SSL certificate error')
|
||||||
sectext = _('It seems the SSL certificate has changed or your connection '
|
sectext = _('It seems the SSL certificate has changed or your connection '
|
||||||
'is being hacked.\nOld fingerprint: %s\nNew fingerprint: %s\n\nDo you '
|
'is being hacked.\nOld fingerprint: %(old)s\nNew fingerprint: %(new)s'
|
||||||
'still want to connect and update the fingerprint of the certificate?'\
|
'\n\nDo you still want to connect and update the fingerprint of the '
|
||||||
) % (gajim.config.get_per('accounts', account, 'ssl_fingerprint_sha1'),
|
'certificate?') % {'old': gajim.config.get_per('accounts', account,
|
||||||
data[0])
|
'ssl_fingerprint_sha1'), 'new': data[0]}
|
||||||
dialog = dialogs.YesNoDialog(pritext, sectext, on_response_yes=on_yes,
|
dialog = dialogs.YesNoDialog(pritext, sectext, on_response_yes=on_yes,
|
||||||
on_response_no=on_no)
|
on_response_no=on_no)
|
||||||
|
|
||||||
|
@ -2094,7 +2097,8 @@ class Interface:
|
||||||
# ('PUBSUB_NODE_NOT_REMOVED', account, (jid, node, msg))
|
# ('PUBSUB_NODE_NOT_REMOVED', account, (jid, node, msg))
|
||||||
if data[0] == gajim.get_jid_from_account(account):
|
if data[0] == gajim.get_jid_from_account(account):
|
||||||
dialogs.WarningDialog(_('PEP node was not removed'),
|
dialogs.WarningDialog(_('PEP node was not removed'),
|
||||||
_('PEP node %s was not removed: %s') % (data[1], data[2]))
|
_('PEP node %(node)s was not removed: %(message)s') % {
|
||||||
|
'node': data[1], 'message': data[2]})
|
||||||
|
|
||||||
def register_handlers(self):
|
def register_handlers(self):
|
||||||
self.handlers = {
|
self.handlers = {
|
||||||
|
|
Loading…
Add table
Reference in a new issue