Skip to content

Commit

Permalink
Fix Padatious intent handler registration with multiple native langua…
Browse files Browse the repository at this point in the history
…ges (#148)

Co-authored-by: Daniel McKnight <daniel@neon.ai>
  • Loading branch information
NeonDaniel and NeonDaniel authored Nov 16, 2023
1 parent efe2510 commit ad9b0c2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ovos_workshop/skills/ovos.py
Original file line number Diff line number Diff line change
@@ -1256,17 +1256,17 @@ def register_intent_file(self, intent_file: str, handler: callable):
'.intent'
handler: function to register with intent
"""
name = f'{self.skill_id}:{intent_file}'
for lang in self.native_langs:
name = f'{self.skill_id}:{intent_file}'
resources = self.load_lang(self.res_dir, lang)
resource_file = ResourceFile(resources.types.intent, intent_file)
if resource_file.file_path is None:
self.log.error(f'Unable to find "{intent_file}"')
continue
filename = str(resource_file.file_path)
self.intent_service.register_padatious_intent(name, filename, lang)
if handler:
self.add_event(name, handler, 'mycroft.skill.handler')
if handler:
self.add_event(name, handler, 'mycroft.skill.handler')

def register_entity_file(self, entity_file: str):
"""

0 comments on commit ad9b0c2

Please sign in to comment.