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.') % \
 | 
			
		||||
				command, 'info')
 | 
			
		||||
		elif command == 'me':
 | 
			
		||||
			self.print_conversation(_('Usage: /%s <action>, sends action to the '
 | 
			
		||||
				'current group chat. Use third person. (e.g. /%s explodes.)') % \
 | 
			
		||||
				(command, command), 'info')
 | 
			
		||||
			self.print_conversation(_('Usage: /%(command)s <action>, sends action '
 | 
			
		||||
				'to the current group chat. Use third person. (e.g. /%s explodes.)'
 | 
			
		||||
				) % {'command': command}, 'info')
 | 
			
		||||
		elif command == 'ping':
 | 
			
		||||
			self.print_conversation(_('Usage: /%s, sends a ping to the contact') %\
 | 
			
		||||
				command, 'info')
 | 
			
		||||
| 
						 | 
				
			
			@ -2590,8 +2590,8 @@ class ChatControl(ChatControlBase):
 | 
			
		|||
		self.update_ui()
 | 
			
		||||
		self.parent_win.redraw_tab(self)
 | 
			
		||||
 | 
			
		||||
		self.print_conversation(_('%s is now %s') % (name, uf_show),
 | 
			
		||||
			'status')
 | 
			
		||||
		self.print_conversation(_('%(name)s is now %(status)s') % {'name': name,
 | 
			
		||||
			'status': uf_show}, 'status')
 | 
			
		||||
 | 
			
		||||
		if status:
 | 
			
		||||
			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.')],
 | 
			
		||||
		'version': [ opt_str, defs.version ], # which version created the config
 | 
			
		||||
		'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_wiktionary': [opt_bool, True],
 | 
			
		||||
		'remote_control': [opt_bool, True, _('If checked, Gajim can be controlled remotely using gajim-remote.'), True],
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -269,8 +269,8 @@ class Connection(ConnectionHandlers):
 | 
			
		|||
					# it's a new account
 | 
			
		||||
					if not data[1]: # wrong answer
 | 
			
		||||
						self.dispatch('ACC_NOT_OK', (
 | 
			
		||||
							_('Server %s answered wrongly to register request: %s')\
 | 
			
		||||
							% (data[0], data[3])))
 | 
			
		||||
							_('Server %(name)s answered wrongly to register request: '
 | 
			
		||||
							'%(error)s') % {'name': data[0], 'error': data[3]}))
 | 
			
		||||
						return
 | 
			
		||||
					is_form = data[2]
 | 
			
		||||
					conf = data[1]
 | 
			
		||||
| 
						 | 
				
			
			@ -335,8 +335,8 @@ class Connection(ConnectionHandlers):
 | 
			
		|||
					return
 | 
			
		||||
				if not data[1]: # wrong answer
 | 
			
		||||
					self.dispatch('ERROR', (_('Invalid answer'),
 | 
			
		||||
						_('Transport %s answered wrongly to register request: %s') % \
 | 
			
		||||
						(data[0], data[3])))
 | 
			
		||||
						_('Transport %(name)s answered wrongly to register request: '
 | 
			
		||||
						'%(error)s') % {'name': data[0], 'error': data[3]}))
 | 
			
		||||
					return
 | 
			
		||||
				is_form = data[2]
 | 
			
		||||
				conf = data[1]
 | 
			
		||||
| 
						 | 
				
			
			@ -1182,7 +1182,8 @@ class Connection(ConnectionHandlers):
 | 
			
		|||
				if original_message != None:
 | 
			
		||||
					log_msg = original_message
 | 
			
		||||
				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 type == 'chat':
 | 
			
		||||
						kind = 'chat_msg_sent'
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -442,7 +442,8 @@ class ConnectionZeroconf(ConnectionHandlersZeroconf):
 | 
			
		|||
			ji not in no_log_for:
 | 
			
		||||
				log_msg = msg
 | 
			
		||||
				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 type == 'chat':
 | 
			
		||||
						kind = 'chat_msg_sent'
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -3243,10 +3243,10 @@ class AccountCreationWizardWindow:
 | 
			
		|||
			# An SSL warning occured, show it
 | 
			
		||||
			hostname = gajim.connections[self.account].new_account_info['hostname']
 | 
			
		||||
			self.xml.get_widget('ssl_label').set_markup(_('<b>Security Warning</b>'
 | 
			
		||||
				'\n\nThe authenticity of the %s SSL certificate could be invalid.\n'
 | 
			
		||||
				'SSL Error: %s\n'
 | 
			
		||||
				'Do you still want to connect to this server?') % (hostname,
 | 
			
		||||
				ssl_msg))
 | 
			
		||||
				'\n\nThe authenticity of the %(hostname)s SSL certificate could be '
 | 
			
		||||
				'invalid.\nSSL Error: %(error)s\n'
 | 
			
		||||
				'Do you still want to connect to this server?') % {
 | 
			
		||||
				'hostname': hostname, 'error': ssl_msg})
 | 
			
		||||
			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
 | 
			
		||||
				self.xml.get_widget('ssl_checkbutton').set_label(text)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1591,8 +1591,9 @@ class SubscriptionRequestWindow:
 | 
			
		|||
		self.account = account
 | 
			
		||||
		self.user_nick = user_nick
 | 
			
		||||
		if len(gajim.connections) >= 2:
 | 
			
		||||
			prompt_text = _('Subscription request for account %s from %s')\
 | 
			
		||||
				% (account, self.jid)
 | 
			
		||||
			prompt_text = \
 | 
			
		||||
				_('Subscription request for account %(account)s from %(jid)s')\
 | 
			
		||||
				% {'account': account, 'jid': self.jid}
 | 
			
		||||
		else:
 | 
			
		||||
			prompt_text = _('Subscription request from %s') % self.jid
 | 
			
		||||
		xml.get_widget('from_label').set_text(prompt_text)
 | 
			
		||||
| 
						 | 
				
			
			@ -2606,11 +2607,13 @@ class PrivacyListWindow:
 | 
			
		|||
		self.global_rules = {}
 | 
			
		||||
		for rule in rules:
 | 
			
		||||
			if rule.has_key('type'):
 | 
			
		||||
				text_item = _('Order: %s, action: %s, type: %s, value: %s') % \
 | 
			
		||||
					(rule['order'], rule['action'], rule['type'], rule['value'])
 | 
			
		||||
				text_item = _('Order: %(order)s, action: %(action)s, type: %(type)s'
 | 
			
		||||
				', value: %(value)s') % {'order': rule['order'],
 | 
			
		||||
				'action': rule['action'], 'type': rule['type'],
 | 
			
		||||
				'value': rule['value']}
 | 
			
		||||
			else:
 | 
			
		||||
				text_item = _('Order: %s, action: %s') % (rule['order'],
 | 
			
		||||
					rule['action'])
 | 
			
		||||
				text_item = _('Order: %(order)s, action: %(action)s') % \
 | 
			
		||||
				{'order': rule['order'], 'action': rule['action']}
 | 
			
		||||
			self.global_rules[text_item] = rule
 | 
			
		||||
			self.list_of_rules_combobox.append_text(text_item)
 | 
			
		||||
		if len(rules) == 0:
 | 
			
		||||
| 
						 | 
				
			
			@ -3808,7 +3811,7 @@ class ESessionInfoWindow:
 | 
			
		|||
		self.window.show_all()
 | 
			
		||||
 | 
			
		||||
	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:
 | 
			
		||||
			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):
 | 
			
		||||
		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?')
 | 
			
		||||
 | 
			
		||||
		dialog = YesNoDialog(pritext, sectext)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -735,8 +735,9 @@ class AgentBrowser:
 | 
			
		|||
 | 
			
		||||
	def _set_initial_title(self):
 | 
			
		||||
		'''Set the initial window title based on agent address.'''
 | 
			
		||||
		self.window.window.set_title(_('Browsing %s using account %s') % \
 | 
			
		||||
			(self._get_agent_address(), self.account))
 | 
			
		||||
		self.window.window.set_title(_('Browsing %(address)s using account '
 | 
			
		||||
			'%(account)s') % {'address': self._get_agent_address(),
 | 
			
		||||
			'account': self.account})
 | 
			
		||||
		self.window._set_window_banner_text(self._get_agent_address())
 | 
			
		||||
 | 
			
		||||
	def _create_treemodel(self):
 | 
			
		||||
| 
						 | 
				
			
			@ -1368,8 +1369,8 @@ class ToplevelAgentBrowser(AgentBrowser):
 | 
			
		|||
 | 
			
		||||
		fraction = 0
 | 
			
		||||
		if self._total_items:
 | 
			
		||||
			self.window.progressbar.set_text(_("Scanning %d / %d..") %\
 | 
			
		||||
				(self._progress, self._total_items))
 | 
			
		||||
			self.window.progressbar.set_text(_("Scanning %(current)d / %(total)d.."
 | 
			
		||||
				) % {'current': self._progress, 'total': self._total_items})
 | 
			
		||||
			fraction = float(self._progress) / float(self._total_items)
 | 
			
		||||
			if self._progress >= self._total_items:
 | 
			
		||||
				# We show the progressbar for just a bit before hiding it.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										42
									
								
								src/gajim.py
									
										
									
									
									
								
							
							
						
						
									
										42
									
								
								src/gajim.py
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -463,8 +463,8 @@ class PassphraseRequest:
 | 
			
		|||
 | 
			
		||||
	def create_dialog(self, account):
 | 
			
		||||
		title = _('Passphrase Required')
 | 
			
		||||
		second = _('Enter GPG key passphrase for key %s (account %s).'
 | 
			
		||||
			) % (self.keyid, account)
 | 
			
		||||
		second = _('Enter GPG key passphrase for key %(keyid)s (account '
 | 
			
		||||
			'%(account)s).') % {'kayid': self.keyid, 'account': account}
 | 
			
		||||
 | 
			
		||||
		def _cancel():
 | 
			
		||||
			# user cancelled, continue without GPG
 | 
			
		||||
| 
						 | 
				
			
			@ -544,9 +544,9 @@ class Interface:
 | 
			
		|||
			sec_msg = _('Do you accept this request on account %s?') % account
 | 
			
		||||
		if data[4]:
 | 
			
		||||
			sec_msg = data[4] + '\n' + sec_msg
 | 
			
		||||
		self.dialog = dialogs.YesNoDialog(_('HTTP (%s) Authorization for %s (id: %s)') \
 | 
			
		||||
			% (data[0], data[1], data[2]), sec_msg,
 | 
			
		||||
			on_response_yes=(on_yes, account, data[3]),
 | 
			
		||||
		self.dialog = dialogs.YesNoDialog(_('HTTP (%(method)s) Authorization for '
 | 
			
		||||
			'%(url)s (id: %(id)s)') % {'method': data[0], 'url': data[1],
 | 
			
		||||
			'id': data[2]}, sec_msg, on_response_yes=(on_yes, account, data[3]),
 | 
			
		||||
			on_response_no=(response, account, data[3], 'no'))
 | 
			
		||||
 | 
			
		||||
	def handle_event_error_answer(self, account, array):
 | 
			
		||||
| 
						 | 
				
			
			@ -935,11 +935,12 @@ class Interface:
 | 
			
		|||
						name = nick, show = show)
 | 
			
		||||
					ctrl = self.new_private_chat(gc_c, account, session)
 | 
			
		||||
 | 
			
		||||
				ctrl.print_conversation('Error %s: %s' % (array[1], array[2]),
 | 
			
		||||
							'status')
 | 
			
		||||
				ctrl.print_conversation(_('Error %(code)s: %(msg)s') % {
 | 
			
		||||
					'error': array[1], 'msg': array[2]}, 'status')
 | 
			
		||||
				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:
 | 
			
		||||
				gc_control.set_subject(gc_control.subject)
 | 
			
		||||
			return
 | 
			
		||||
| 
						 | 
				
			
			@ -948,7 +949,8 @@ class Interface:
 | 
			
		|||
			jid = jid.replace('@', '')
 | 
			
		||||
		msg = array[2]
 | 
			
		||||
		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')
 | 
			
		||||
 | 
			
		||||
	def handle_event_msgsent(self, account, array):
 | 
			
		||||
| 
						 | 
				
			
			@ -960,7 +962,8 @@ class Interface:
 | 
			
		|||
 | 
			
		||||
	def handle_event_msgnotsent(self, account, array):
 | 
			
		||||
		#('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,
 | 
			
		||||
			msg_type='error')
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1231,8 +1234,8 @@ class Interface:
 | 
			
		|||
			statusCode = array[9]
 | 
			
		||||
			if '303' in statusCode:
 | 
			
		||||
				new_nick = array[10]
 | 
			
		||||
				ctrl.print_conversation(_('%s is now known as %s') % (nick,
 | 
			
		||||
					new_nick), 'status')
 | 
			
		||||
				ctrl.print_conversation(_('%(nick)s is now known as %(new_nick)s') \
 | 
			
		||||
					% {'nick': nick, 'new_nick': new_nick}, 'status')
 | 
			
		||||
				gc_c = gajim.contacts.get_gc_contact(account, room_jid, new_nick)
 | 
			
		||||
				c = gajim.contacts.contact_from_gc_contact(gc_c)
 | 
			
		||||
				ctrl.gc_contact = gc_c
 | 
			
		||||
| 
						 | 
				
			
			@ -1246,8 +1249,8 @@ class Interface:
 | 
			
		|||
				contact.show = show
 | 
			
		||||
				contact.status = status
 | 
			
		||||
				uf_show = helpers.get_uf_show(show)
 | 
			
		||||
				ctrl.print_conversation(_('%s is now %s') % (nick, uf_show),
 | 
			
		||||
					'status')
 | 
			
		||||
				ctrl.print_conversation(_('%(nick)s is now %(status)s') % {
 | 
			
		||||
					'nick': nick, 'status': uf_show}, 'status')
 | 
			
		||||
				if status:
 | 
			
		||||
					ctrl.print_conversation(' (', 'status', simple=True)
 | 
			
		||||
					ctrl.print_conversation('%s' % (status), 'status', simple=True)
 | 
			
		||||
| 
						 | 
				
			
			@ -2024,10 +2027,10 @@ class Interface:
 | 
			
		|||
			self.handle_event_status(account, 'offline')
 | 
			
		||||
		pritext = _('SSL certificate error')
 | 
			
		||||
		sectext = _('It seems the SSL certificate has changed or your connection '
 | 
			
		||||
			'is being hacked.\nOld fingerprint: %s\nNew fingerprint: %s\n\nDo you '
 | 
			
		||||
			'still want to connect and update the fingerprint of the certificate?'\
 | 
			
		||||
			) % (gajim.config.get_per('accounts', account, 'ssl_fingerprint_sha1'),
 | 
			
		||||
			data[0])
 | 
			
		||||
			'is being hacked.\nOld fingerprint: %(old)s\nNew fingerprint: %(new)s'
 | 
			
		||||
			'\n\nDo you still want to connect and update the fingerprint of the '
 | 
			
		||||
			'certificate?') % {'old': gajim.config.get_per('accounts', account,
 | 
			
		||||
			'ssl_fingerprint_sha1'), 'new': data[0]}
 | 
			
		||||
		dialog = dialogs.YesNoDialog(pritext, sectext, on_response_yes=on_yes,
 | 
			
		||||
			on_response_no=on_no)
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -2094,7 +2097,8 @@ class Interface:
 | 
			
		|||
		# ('PUBSUB_NODE_NOT_REMOVED', account, (jid, node, msg))
 | 
			
		||||
		if data[0] == gajim.get_jid_from_account(account):
 | 
			
		||||
			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):
 | 
			
		||||
		self.handlers = {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue