Lines Matching refs:behavior
179 def SplitBehavior(behavior):
180 """Splits the behavior to compose a message or i18n-content value.
186 return [x for x in re.split('[ ()"-.,]', behavior) if len(x) > 0]
189 def ToMessageName(behavior):
196 segments = [segment.upper() for segment in SplitBehavior(behavior)]
210 def Toi18nContent(behavior):
217 segments = [segment.lower() for segment in SplitBehavior(behavior)]
392 hotkey_cols = ['behavior', 'context', 'kind', 'actionctrlctrlcmdonmac',
398 # (behavior, action)
406 behavior = line['behavior'].strip()
408 result.append((behavior, action, description))
414 return sorted(set((behavior, description) for (behavior, _, description)
459 for (behavior, action, _) in hotkey_data:
460 i18nContent = Toi18nContent(behavior)
482 for (behavior, description) in UniqueBehaviors(hotkey_data):
485 if behavior == 'Show wrench menu':
488 (ToMessageName(behavior), ToMessageDesc(description),
489 behavior))
498 for (behavior, _) in UniqueBehaviors(hotkey_data):
499 message_name = ToMessageName(behavior)
500 output = CC_SNIPPET_TEMPLATE % (Toi18nContent(behavior), message_name)