parameters: (msgid, msgstr, line_warns)
return_statement: return 0
docstring: check if accelrator &x is the same in both strings
docstring_summary: check if accelrator &x is the same in both strings
docstring_tokens: check if accelrator &x is the same in both strings
function: def check_accelerator(msgid, msgstr, line_warns):
  	"""check if accelrator &x is the same in both strings"""
  	msgid = msgid.lower()
  	msgstr = msgstr.lower()
  	p1 = msgid.find('&')
  	if p1 >= 0:
  		a1 = msgid[p1:p1 + 2]
  		p2 = msgstr.find('&')
  		if p2 < 0 and len(a1) > 1:
  			if a1[-1] in msgstr:
  				# warn if there is no accelerator in translated version
  				# but "accelerated" letter is available
  				line_warns.append('acc1')
  				return 1
  		else:
  			a2 = msgstr[p2:p2 + 2]
  			if a1 != a2:
  				#line_warns.append('acc2')
  				return 0   # ok they can be different
  	return 0
function_tokens: def check_accelerator ( msgid , msgstr , line_warns ) : msgid = msgid . lower ( ) msgstr = msgstr . lower ( ) p1 = msgid . find ( '&' ) if p1 >= 0 : a1 = msgid [ p1 : p1 + 2 ] p2 = msgstr . find ( '&' ) if p2 < 0 and len ( a1 ) > 1 : if a1 [ - 1 ] in msgstr : # warn if there is no accelerator in translated version # but "accelerated" letter is available line_warns . append ( 'acc1' ) return 1 else : a2 = msgstr [ p2 : p2 + 2 ] if a1 != a2 : #line_warns.append('acc2') return 0 # ok they can be different return 0