Giter Site home page Giter Site logo

slack-translator's Introduction

Slack Translator

Deploy Build Status Coverage Status

You can translate your chat using slack translator.

2015-11-07 12 19 14

How to Setup

You need to setup the following environment variables to integrate with Slack:

  • SLACK_API_TOKEN: You can get the API Token from Slack Web API
  • SLACK_WEBHOOK_URL: You can get the Incoming Webhook URL from here

Also, you need to choose a translator vendor to use:

  • TRANSLATE_ENGINE: The handle name of the translator vendor. Currently only support google and naver. google by default.

Google translator

If you choose google as your TRANSLATE_ENGINE, you need to add one more environment variable for Google Translate API as well:

Naver translator

If you choose naver as your TRANSLATE_ENGINE, you need to add two more environment variable for Naver Translator API as well:

Then you can add Slash Commands to use translator.

  1. Commands: /[target language]
  2. URL: https://[host]/[source language]/[target language]
  3. Method: POST

For example, if you are using Korean, and you want to add Korean->Japanese translation command, try to add Slash command like this.

  1. Commands: /ja
  2. URL: https://[host]/ko/ja
  3. Method: POST

Meeting mode

Translate every messages in a channel without the need to type in commands with "Meeting Mode". This feature makes uninterrupted flow of communication possible, and integrates into normal conversation smoothly.

To use this feature additional setup is required.

Installation

You'll need to set up a Slack App in addition to to setting up slash commands above.

  1. Create a Slack App
  2. Set up Event Subscriptions
  3. Add Slack Commands for starting meeting mode.
    • example) Command to translate every japanese in this channel to korean.
    • Commands: /会議開始
    • URL: http://your-app.herokuapp.com/start_meeting_mode/ja/ko
    • example) Command to stop meeting mode in this channel.
    • Commands: /会議終了
    • URL: http://your-app.herokuapp.com/stop_meeting_mode/

slack-translator's People

Contributors

dahlia avatar jckdotim avatar qria avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

slack-translator's Issues

Speed up response

In case of late response, slack shows timeout warning to user who invoked the command and it's quiet annoying.

I guess we can remove those warnings by posting translated message lazily in async

Automatic Heroku build fails

-----> Python app detected
-----> Installing runtime (python-2.7.11)
-----> Installing dependencies with pip
       Collecting Flask==0.10.1 (from -r requirements.txt (line 1))
       Downloading Flask-0.10.1.tar.gz (544kB)
       Collecting Flask-Cache==0.13.1 (from -r requirements.txt (line 2))
       Downloading Flask-Cache-0.13.1.tar.gz (45kB)
       Collecting Jinja2==2.7.3 (from -r requirements.txt (line 3))
       Downloading Jinja2-2.7.3.tar.gz (378kB)
       Collecting MarkupSafe==0.23 (from -r requirements.txt (line 4))
       Downloading MarkupSafe-0.23.tar.gz
       Collecting Werkzeug==0.10.4 (from -r requirements.txt (line 5))
       Downloading Werkzeug-0.10.4-py2.py3-none-any.whl (293kB)
       Collecting flake8==2.5.0 (from -r requirements.txt (line 6))
       Downloading flake8-2.5.0-py2.py3-none-any.whl
       Collecting gunicorn==19.3.0 (from -r requirements.txt (line 7))
       Downloading gunicorn-19.3.0-py2.py3-none-any.whl (110kB)
       Collecting itsdangerous==0.24 (from -r requirements.txt (line 8))
       Downloading itsdangerous-0.24.tar.gz (46kB)
       Collecting mccabe==0.3.1 (from -r requirements.txt (line 9))
       Downloading mccabe-0.3.1-py2.py3-none-any.whl
       Collecting pep8==1.5.7 (from -r requirements.txt (line 10))
       Downloading pep8-1.5.7-py2.py3-none-any.whl
       Collecting py==1.4.30 (from -r requirements.txt (line 11))
       Downloading py-1.4.30-py2.py3-none-any.whl (81kB)
       Collecting pyflake==0.1.9 (from -r requirements.txt (line 12))
  Could not find a version that satisfies the requirement pyflake==0.1.9 (from -r requirements.txt (line 12)) (from versions: )
No matching distribution found for pyflake==0.1.9 (from -r requirements.txt (line 12))
 !     Push rejected, failed to compile Python app

pyflake==0.1.9 is throwing an error

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.