Code Monkey home page Code Monkey logo

deepl-translation's Introduction

DeepL App for Slack

Deploy

If the above button does not work for you (due to "We couldn't deploy your app because the source code violates the Salesforce Acceptable Use and External-Facing Services Policy." error), you can fork this repository and use your own URL like https://heroku.com/deploy?template=https://github.com/{your GitHub account here}/deepl-for-slack/tree/master.

Features

Shortcut to run DeepL Translate API

Slack users can run DeepL Translate API in a modal.

Post a translated text in thread

This works mostly the same as reacjilator.

Prerequisites

To run this app, the following accounts are required.

  • DeepL Pro (for Developers) account
  • Slack workspace and user account
  • Heroku account

If you already have all of them, setting up this app requires only 5 minutes.

Set up

Create your DeepL Pro (for Developers) account

Refer to the following resources for more details:

Create your Slack App

Use the App Manifest file to configure a new app!

  • Got to Settings > Install App in the left pane

    • Click Install App to Workspace button
    • Click Allow button in the OAuth confirmation page
    • Save the Bot User OAuth Access Token value (xoxb-***)
  • Go to Settings > Basic Information in the left pane

    • Scroll down to App Credentials section
    • Click Show button in Signing Secret section
    • Save the Signing Secret value

Deploy to Heroku

Deploy

  • Confirm your billing settings
  • Deploy this app with the following env variables
    • SLACK_SIGNING_SECRET: Settings > Basic Information > App Credentials > Signing Secret in the Slack app config page
    • SLACK_BOT_TOKEN: Settings > Install App > Bot User OAuth Access Token in the Slack app config page
    • DEEPL_AUTH_KEY: Authentication Key for DeepL API in the DeepL Pro account page
    • DEEPL_FREE_API_PLAN: Set to "1" if you are using the DeepL API Free Plan (the default is "0" for Pro Plan)
  • You may need to change the "Dyno Type" to enable the app

Slack App (Step 2)

  • Go to Features > Event Subscriptions in the left pane

    • Set the Request URL to https://{your app's Heroku domain}/slack/events
    • Click Save Changes button at the bottom for sure
  • Go to Features > Interactivity & Shortcuts in the left pane

    • Set the Request URL to https://{your app's Heroku domain}/slack/events
    • Click Save Changes button at the bottom for sure

Verify it works in Slack

  • Go to your Slack workspace

  • Run /invite @deepl_translation in a channel

  • Post a message saying In functional programming, a monad is a design pattern that allows structuring programs generically while automating away boilerplate code needed by the program logic. Monads achieve this by providing their own data type (a particular type for each type of monad), which represents a specific form of computation, along with one procedure to wrap values of any basic type within the monad (yielding a monadic value) and another to compose functions that output monadic values (called monadic functions).

  • Add a reaction :flag-jp: to the message

  • Check a new message in its thread

  • Click โšก (Shortcuts) button

  • Click Open DeepL Tool

  • Enter a text and the language on the modal

License

The MIT License

Related Projects

If you are looking for more functionalities, take a look at the following awesome projects:

deepl-translation's People

Contributors

dependabot[bot] avatar krmax44 avatar seratch avatar

Watchers

 avatar

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.