From a44385063c3156ae2a5074ba5c97488b4183fe46 Mon Sep 17 00:00:00 2001 From: jcasoft Date: Fri, 1 Jun 2018 11:13:56 -0600 Subject: [PATCH] Initial commit --- .gitignore | 3 +++ README.md | 20 ++++++++++++++++++ __init__.py | 16 ++++++++++++++ dialog/en-us/translate.dialog | 2 ++ settingsmeta.json | 40 +++++++++++++++++++++++++++++++++++ vocab/en-us/translate.intent | 2 ++ 6 files changed, 83 insertions(+) create mode 100644 .gitignore create mode 100644 README.md create mode 100644 __init__.py create mode 100644 dialog/en-us/translate.dialog create mode 100644 settingsmeta.json create mode 100644 vocab/en-us/translate.intent diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8958124 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +*.pyc +settings.json + diff --git a/README.md b/README.md new file mode 100644 index 0000000..32e1d81 --- /dev/null +++ b/README.md @@ -0,0 +1,20 @@ +## Translate +Allow to translate phrases into other languages + +## Description +Allow to translate phrases into other languagessupported languages: + +english, spanish, french, italian, portuguese, dutch, german, swedish, hungarian, polish, norwegian, danish, romanian, slovak, catalan, chinese, japanese, korean, greek, vietnamese, turkish, finnish and arabic + +## Examples + - "How use translate" + - "Translate to spanish good night" + - "Translate good morning my dear friends and happy new year to spanish" + - "Repeat" + - "Do you speak other language" + + +## Credits +Juan Carlos Argueta + + diff --git a/__init__.py b/__init__.py new file mode 100644 index 0000000..a0f6bcb --- /dev/null +++ b/__init__.py @@ -0,0 +1,16 @@ +from adapt.intent import IntentBuilder +from mycroft import MycroftSkill, intent_file_handler + + +class Translate(MycroftSkill): + def __init__(self): + MycroftSkill.__init__(self) + + @intent_file_handler('translate.intent') + def handle_translate(self, message): + self.speak_dialog('translate') + + +def create_skill(): + return Translate() + diff --git a/dialog/en-us/translate.dialog b/dialog/en-us/translate.dialog new file mode 100644 index 0000000..849398d --- /dev/null +++ b/dialog/en-us/translate.dialog @@ -0,0 +1,2 @@ +Translate + diff --git a/settingsmeta.json b/settingsmeta.json new file mode 100644 index 0000000..b47307f --- /dev/null +++ b/settingsmeta.json @@ -0,0 +1,40 @@ +{ + "name": "Translate", + "skillMetadata": { + "sections": [ + { + "name": "Options << Name of section", + "fields": [ + { + "name": "internal_python_variable_name", + "type": "text", + "label": "Setting Friendly Display Name", + "value": "", + "placeholder": "demo prompt in the input box" + } + ] + }, + { + "name": "Login << Name of another section", + "fields": [ + { + "type": "label", + "label": "Just a little bit of extra info for the user to understand following settings" + }, + { + "name": "username", + "type": "text", + "label": "Username", + "value": "" + }, + { + "name": "password", + "type": "password", + "label": "Password", + "value": "" + } + ] + } + ] + } +} \ No newline at end of file diff --git a/vocab/en-us/translate.intent b/vocab/en-us/translate.intent new file mode 100644 index 0000000..849398d --- /dev/null +++ b/vocab/en-us/translate.intent @@ -0,0 +1,2 @@ +Translate +