skill-weather icon indicating copy to clipboard operation
skill-weather copied to clipboard

wrong output in build_condition_dialog with non-english language

Open lcipria opened this issue 3 years ago • 1 comments

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 #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 avatar Aug 31 '22 10:08 lcipria

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.

krisgesling avatar Sep 29 '22 06:09 krisgesling