Skip to content
This repository has been archived by the owner on Sep 8, 2024. It is now read-only.

Fallback to en-us when locale (intent, vocab) not found #2120

Closed
domcross opened this issue May 13, 2019 · 3 comments
Closed

Fallback to en-us when locale (intent, vocab) not found #2120

domcross opened this issue May 13, 2019 · 3 comments

Comments

@domcross
Copy link
Contributor

When Skill-service starts up it loads all intents that are specified for a skill by looking into folders vocab/intent/locale for the configured language.

Problem: In case a intent/vocab-file is not found the skill is not loaded.

Example: recently the mycroft-stop skill was enhanced with the "reboot" intent. The "reboot.intent" file is currently only available for "en-us". I run Mycroft with language="de-de"and get following error:

mycroft.skills.core:load_skill:165 - ERROR - Failed to load mycroft-stop.mycroftai 
due to a missing file: Unable to find "reboot.intent"

This renders the whole skill unusable for me...

Suggestion: when load_skillfails to load a intent/vocab-file fall back to "en-us" and try to load the intent again. As in 99.99% of all cases there is a english intent file this will not break the loading of the intent.

@forslund
Copy link
Collaborator

I agree that this should probably be done. I do think we should keep a mode where it'll error if not all translations are found to make it easy to see which ones aren't 100 % operational.

I started the work on something like this this morning. hopefully a PR soonish :)

@domcross
Copy link
Contributor Author

This issue from mycroft-skills repo is related.

domcross added a commit to domcross/mycroft-core that referenced this issue Nov 22, 2019
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
domcross added a commit to domcross/mycroft-core that referenced this issue Nov 22, 2019
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
@forslund
Copy link
Collaborator

forslund commented Dec 5, 2019

Closed thanks to work by @domcross (probably got tired of waiting for the fix I was doing, I wonder where that branch went)

@forslund forslund closed this as completed Dec 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants