Configuration files for managing the project's translation server.
Note: For now, this is just a demo.
Mojito is an automation platform that enabled continuous localization.
Heroku is a platform for easily deploying applications.
Heroku CLI is a command-line tool to manage Heroku apps directly from the terminal.
Heroku CLI Plugin: Java is for working with Java applications on Heroku.
We use make
to run helper tasks. To see the available tasks, run make
without any arguments:
$ make
Usage: make <command>
where <command> is one of the following:
setup Prepare local workstation and download deployable files
config-pull Override local .env with heroku envvvars
local Run webapp locally using local .env
deploy Deploy the app to Heroku
console Run a remote shell console on Heroku
delete-db Delete the remote Heroku database
db Create the remote Heroku database
project Create a new translation project (AKA repo)
import Import initial strings to populate project
reset-db Delete and recreate the remote Heroku database
stop Stop the Heroku webapp
start Start the Heroku webapp
logs Tail the remote Heroku logs
fresh Purge and recreate the database and deploy the current app fresh
fresh-tail Start fresh, and immediately tail the logs
Requirement: Install the Heroku CLI.
On initial setup on your workstation, run:
make setup
# Edit to facilitate GitHub login.
cp .env.sample .env
make local
Then visit http://localhost:5000
Note: You'll need contributor access on the Heroku repo.
heroku addons:create jawsdb:kitefin --version=5.7
heroku config:set GITHUB_CLIENT_ID=xxxxxxxxxx
heroku config:set GITHUB_CLIENT_SECRET=xxxxxxxxxxx
heroku config:set MOJITO_CLI_USERNAME=admin
heroku config:set MOJITO_CLI_PASSWORD=xxxxxxxxxx
make deploy
Then visit https://polis-translations.herokuapp.com
Translation projects are known as "repositories" in Mojito. We will call them projects in the documentation, to distinguish them from Git repositories.
make project
make SRC_PATH=path/to/polis/client-participation/js/strings/ import
- Authentication to the webapp is done via GitHub account login. (docs)
- You'll need to create a GitHub app if you're creating a new translation server.
- Any GitHub user can sign in.
- There's currently no way to control user's access levels -- everyone gets full authorization. chat context.
- Any MySQL or MariaDB addon within Heroku can be used.
- ClearDB seems to not work, as the
--version
flag isn't respected, and MySQL 5.7 can't be used.
- ClearDB seems to not work, as the