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

Weather skill does not allow condition to be localised #49

Open
JuliaC29 opened this issue Nov 5, 2018 · 4 comments
Open

Weather skill does not allow condition to be localised #49

JuliaC29 opened this issue Nov 5, 2018 · 4 comments

Comments

@JuliaC29
Copy link

JuliaC29 commented Nov 5, 2018

When we translate the weather skill, there are strings in the output that don't seem to be localisable.

History ========================================================    
 날씨가 어때요                                                              
 >> 현재 날씨는 overcast clouds고 기온은 54도입니다. 오늘의 최고 기온은 54도, 최저 기온은  44도입니다.                                                                                                                        

We searched for the string:

juyeon@juyeonubuntu:/opt/mycroft/skills/mycroft-weather.mycroftai$ grep -nHri -e "overcast" -e "cloudy" .
./__init__.py:125:        self.CODES['02d', '02n', '03d', '03n'] = 1  # partly cloudy
./__init__.py:126:        self.CODES['04d', '04n'] = 2                # cloudy

But it seems like there is no way to localise this. Any thoughts?

@forslund
Copy link
Collaborator

forslund commented Nov 6, 2018

These are used to select the icon to show on the Mark-1 display.

I believe the condition is handled like on L219

and calls the __translate() method. This method will load the <condition>.dialog or <condition>.future.dialog depending on if it's the present or future that's reported. If no match is found the english words will be used.

In the example you provide condition would be overcast clouds so if you create a file in the dialog/LANG/ folder called overcast clouds.dialog and overcast clouds.future.dialog this should be translated.

@domcross
Copy link
Contributor

OpenWeatherMap currently supports more than 30 languages - see multilingual support. At least for these 30+ languages the translation work for the over 50 possible weather-codes that OWM provides can be avoided. I will have a look into it shortly...

@domcross
Copy link
Contributor

domcross commented Nov 17, 2018

...see PR #52

@chrisveilleux
Copy link
Member

Is this still an issue? the weather api call attempts to use the device's language setting to return results in the right language

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

No branches or pull requests

4 participants