Skip to content

Commit

Permalink
Fallback to 'en-us' when resource fails
Browse files Browse the repository at this point in the history
When mycroft_skill.find_resource fails to load a resource for self.lang
fall back to lang 'en-us'
as most skills/resources are available in english by default.

==== Fixed Issues ====
MycroftAI#2120
  • Loading branch information
domcross committed Nov 22, 2019
1 parent 79f00e3 commit 9c66d33
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mycroft/skills/mycroft_skill/mycroft_skill.py
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@ def find_resource(self, res_name, res_dirname=None):
return result

def _find_resource(self, res_name, lang, res_dirname=None):
"""Find resource by name, lang and dir
"""Finds a resource by name, lang and dir
"""
if res_dirname:
# Try the old translated directory (dialog/vocab/regex)
Expand Down

0 comments on commit 9c66d33

Please sign in to comment.