Response formatting for German language ordinals depending on cases/prepositions for dates
"am 1. März" -> "am ersten März" (on the first of March)
"der 1. März" -> "der erste März" (the first of March)
"1. März" -> "erster März" (first of March)
Response formatting for mathematical results
"10 ^ 2" -> "10 hoch 2" (ten to the power of two)
Can be tested via the corresponding test_format_de or by using wolfram alpha skill:
"Was ist die Fläche von Canada"
"Wann ist George Washington geboren"
The pronunciation of English date-time was awkward without the word "the"
for dates like "Monday, the 16th at eight a.m."
Also corrected the tests to use the newer lower case "a.m." instead of "AM"
New function allows simple yes/no queries to be asked, capturing common
affirmations (e.g. "yes", "yeah", "yep", "sure", ...) and rejections
("no", "nope", ...) that are consistent across all skills.
The method will return a normalized 'yes', 'no' or whatever else is spoken
for further parsing. None is also possible.
This also adds the MycroftSkill.is_match() method to assist in matching
translated synonyms within an utterance.
Withe the NTP checks in place, the sequence of visual and audio queues
was a little clunky. This refines it slightly for normal use and to
play better with the pairing process.
Raspberry Pi's don't have a built-in clock, so at boot-up the clock just picks up from when they were last running. Normally this is corrected very quickly by NTP from an internet server, but if there is no network connection that cannot happen.
When an out-of-the-box Mark 1 or Picroft is being setup, the clock is set to whenever the image was created. Upon completing the Wifi setup step the NTP service can finally sync with the internet, so time suddenly "jumps" to weeks later -- usually. In either case (when the date jumps or when the date is erronously months old), there is potential for havoc.
These changes deal with that situation. Upon network connection, an NTP synchonization is forced. If it is detected that a major time jump happened
(more than 1 hour), then the user is notified that the clock change requires
a reboot and the system restarts.
Other changes:
* use the new "system." message namespace
* add pause before the system.reboot during a WIPE, allowing reset to totally complete
*
Fixes a misspelling and removes the "i am awake.dialog" which is
no longer used. (The dialog is handled by the (Sleep skill)[https://github.com/MycroftAI/skill-naptime] instead.
The prompt during skill downloads was occurring even when the "speak" flag was
set to False. Now it is honored.
Also removed the "no network connection.dialog" which essentially was a copy of
the "not connected to the internet.dialog" file.
Significantly reworked the loading/updating of Skills. Unified
all management under a single SkillManager class. This class
runs as a thread that initially loads, upgrades (via MSM)
and reloads skills.
Removed the independent threads that were being run. The skill
updating still happens once an hour, but works in conjunction
with the scan to reload modified skills. Also added messagebus
notifications from MSM so mycroft-core can pause reloading
skills until the installation is complete.
Added a new mycroft.messagebus.send module to allow command
line interaction with the messagebus, e.g.:
python -m mycroft.messagebus.send mycroft.wifi.start
python -m mycroft.messagebus.send speak '{"utterance":"hello"}'
==== Fixed Issues ====
MSM installs that have PIP dependencies were failing, as the
load would occur after code was retrieved but before PIP install
completed. Restart was required to load new skills.
==== Tech Notes ====
TODO: Change the way we manage modules. The auto-load of the
remote configuration for the module is silly, slow and wasteful.
I made the WebsocketClient.build_url() method static in
anticipation of being able to do this more efficiently when the
submodule load doesn't hit the remove API automatically.
==== Localization Notes ====
Modified 'sorry I couldn't install default skills' message.
==== Protocol Notes ====
MSM now generates:
msm.updating
msm.installing
msm.install.succeeded { "skill" : name }
msm.install.failed { "skill" : name, "error" : code }
msm.installed
msm.updated
msm.removing
msm.remove.succeeded { "skill" : name }
msm.remove.failed { "skill" : name, "error" : code }
msm.removed
An update can now be forced by posting 'skillmanager.update' to the
messagebus.