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

Why does the weather skill have the language hardcoded in __init.py__? #58

Closed
JuliaC29 opened this issue Dec 5, 2018 · 2 comments
Closed

Comments

@JuliaC29
Copy link

JuliaC29 commented Dec 5, 2018

Would it be possible for the weather skill to have the language in a configuration file that was not uploaded to GitHub? I am getting conflicts because I changed it to Korean so I could work on Korean, but possibly this value could be in a config file that is in the .gitignore? and default to whatever is in the Mycroft core config file ?

    def __init__(self):
        super(OWMApi, self).__init__("owm")
<<<<<<< HEAD
        self.lang = "ko"
=======
        # This is the language code for the interaction between python and the
        # OpenWeatherMap API. This value does not need to be localized as data is fetched
        # in English from the OWM API and later on translated at the WeatherSkill
        # class:
        self.lang = "en"
>>>>>>> upstream/master
        self.observation = ObservationParser()
        self.forecast = ForecastParser()
@KathyReid
Copy link
Contributor

Good question. Ideally this Skill should get the language from the user's language setting in mycroft.conf. This will take a bit of re-factoring.

@forslund
Copy link
Collaborator

forslund commented Dec 6, 2018

The idea was that the OWM language used was fixed so the weather condition was always fetched in English allowing us to use the mycroft translation system for translating it.

This was changed via #52 to by default try to use the language provided by OWM.

@forslund forslund closed this as completed Dec 6, 2018
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

3 participants