Several changes:
* Removed old references to skills/* subdirectories (now skills are not a part of mycroft-core, so unneeded)
* Added includes for mycroft/res files
The restores the initial check on bootup for network connectivity,
prompting the user to plug in the network cable or push the button
to start Wifi setup.
NOTE: This will need to be localized and handled by different
enclosures.
Improved the way the button press is handled. Now the listener gives the rest
of the system a moment to consume the button press before it interprets it
as a request to begin listening.
Also replaced the use of the "buttonPress" signal when "expect_response"
was indicated with an utterance. Now the signal "startListening" is
created, differentiating it from a buttonPress.
This implements the handler for the Mark 1 menu item SSH > BLOCK (the inverse of SSH > ALLOW)
* Added handler for "unit.disable-ssh" on the serial line. This turns around and emits "mycroft.disable.ssh" on the messagebus.
* Removed the automatic reboot, just let the user know it will be different after a restart
* Made the spoken message translatable
* Changed mycroft.dialog.get() to not require the "lang" parameter. It will default to the mycroft.conf value.
* Adding localization mechanism for strings embedded in mycroft-core code
Added mycroft.dialog.get() function. This behaves much like the localization
mechanism for dialogs in Skills. So you can do things like this:
lang = "en-us"
str = mycroft.dialog.get("how are you", lang)
Which will look in mycroft/res/text for the dialog file containing strings to
use as templates for the actual output. This depends on the language being
currently used. When operating in English this would be:
mycroft/res/text/en-us/how are you.dialog
This function will pick a random line from that file to assign to str.
A more advanced use is to embed placeholders in the strings within the
template file.
lang = "en-us"
ctx = {"time" : "noon"}
str = mycroft.dialog.get("current time", lang, ctx)
And the random template line picked was "the current time is {{time}} ", then
the output would be:
"the current time is noon"
Developers do not expect a function called "find" to execute an API request, this is a "get". (I verified this with several other devs.) Renamed and added a Deprecated comment for now. Also:
* Added missing standard mycroft-core copyright.
* Added docstrings for basic objects and the STTApi in particular.