Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrong output in build_condition_dialog with non-english language #204

Open
lcipria opened this issue Aug 31, 2022 · 1 comment
Open

wrong output in build_condition_dialog with non-english language #204

lcipria opened this issue Aug 31, 2022 · 1 comment
Labels

Comments

@lcipria
Copy link
Contributor

lcipria commented Aug 31, 2022

Describe the bug
Mycroft answers with "condition-not-expected" dialog if condition matches the weather

To Reproduce
Steps to reproduce the behavior:

  1. Apply PR fix "do-i-need-an-umbrella.intent" in various languages #203
  2. Set Mycroft languate to Italian
  3. Ask for "Piove?" (it rains?) in a rainy day or similar behavior

Expected behavior
Output should be "condition-expected"

Log files
...

Environment (please complete the following information):

  • Device type: Desktop
  • OS: Ubuntu WSL
  • Mycroft-core version: 21.02

Additional context
The problem seems to be related to this row:

intent_match = self.voc_match(weather.condition.category.lower(), condition)

  • weather.condition.category is set to "Rain" (or similar value), condition is set to "rain"
  • voc_match looks for "rain.voc" in locale/it-it/vocabulary/condition/rain.voc but can't match the "rain" word (because of the file's content it's translated in italian)
@lcipria lcipria added the bug label Aug 31, 2022
@krisgesling
Copy link
Contributor

Hey, thanks for the detective work.

Will need to check what languages OpenWeather handles. Alternatively we do all the API interaction in english and translate the localized condition term to the base english condition for comparison.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants