/translate
command for Slack
This is a small Slack application to be deployed on Google App Engine. It
offers a simple /translate
command to translate phrases into english.
It was initially developed for a talk on DevFest London in 2016.
Requirements
In order to run this app, you need to:
- Install Go.
- Install the Go App Engine SDK.
- Have a Google Cloud account with billing enabled.
- Have a Slack team you can install apps on.
Deploying and installing the application
- Create a project on Google Cloud and save the project ID.
- Create an API Key for Google Translate and save it.
- Create a Slash Command integration in Slack and pointing to
https://[ YOUR PROJECT ID].appspot.com
and save the token. - Deploy the application
# Download the app's code
$ go get github.com/ernesto-jimenez/devfest-london-2016
# Go to the app's folder
$ cd $GOPATH/src/github.com/ernesto-jimenez/devfest-london-2016
# Deploy your app using appcfg.py from the App Engine SDK
$ appcfg.py update \
--application [ YOUR PROJECT ID ] \
-E TOKEN:[ YOUR SLACK TOKEN ] \
-E TRANSLATE_KEY:[ YOUR TRANSLATE API KEY ] \
app.yaml
You are ready to go.