The first developer-oriented translation tool. True asynchronous flow between translators and your team.
Go to file
2018-09-10 07:54:21 -04:00
config Add tests for hook consumers 2018-04-11 06:02:16 -04:00
lib Add Go i18n JSON document format 2018-09-10 07:54:21 -04:00
priv Add plural forms support for gettext serializer 2018-07-06 16:33:34 -04:00
test Add Go i18n JSON document format 2018-09-10 07:54:21 -04:00
webapp Confirm before deleting a project. 2018-06-29 10:03:44 -04:00
.credo.exs Remove undefined checksfrom .credo.exs 2018-04-06 05:22:38 -04:00
.formatter.exs Count translations in DB instead 2018-05-11 07:32:46 -04:00
.gitignore laravel_php - Redone job in new branch 2018-06-08 16:59:28 -04:00
.hanzo.yml Remove after_deploy hook on hanzo in favor of release entry in Procfile 2018-05-11 07:35:12 -04:00
.travis.yml Remove blank lines from Travis.yml 2018-04-06 05:23:03 -04:00
app.json Add canonical host in app.json 2018-07-02 10:17:48 -04:00
Aptfile Initial commit 💥 2018-04-05 16:47:36 -04:00
CODE_OF_CONDUCT.md Initial commit 💥 2018-04-05 16:47:36 -04:00
compile Initial commit 💥 2018-04-05 16:47:36 -04:00
elixir_buildpack.config Initial commit 💥 2018-04-05 16:47:36 -04:00
Gemfile Initial commit 💥 2018-04-05 16:47:36 -04:00
Gemfile.lock Initial commit 💥 2018-04-05 16:47:36 -04:00
LICENSE.md Rename LICENSE to LICENSE.md 2018-05-05 14:11:28 -04:00
logo.svg Initial commit 💥 2018-04-05 16:47:36 -04:00
mix.exs laravel_php - Redone job in new branch 2018-06-08 16:59:28 -04:00
mix.lock laravel_php - Redone job in new branch 2018-06-08 16:59:28 -04:00
phoenix_static_buildpack.config Initial commit 💥 2018-04-05 16:47:36 -04:00
Procfile Update Procfile to update database on deployment 2018-05-11 07:34:23 -04:00
README.md Fix single quote typo in README 2018-07-02 10:18:51 -04:00

Accent Logo

WebsiteGraphiQL

Build Status Coverage Status Join the chat at https://gitter.im/mirego/accent

The first developer-oriented translation tool. Accents engine coupled with the asynchronous flow between the translator and the developer is what makes Accent the most awesome tool of all.

The Accent API provides a powerful abstraction around the process of translating and maintaining the translations of an app.

  • Collaboration. Centralize your discussions around translations.
  • History. Full history control and actions rollback. Who did what, when.
  • UI. Simple yet powerful UI to enable translator and developer to be productive.
  • GraphQL. The API that powers the UI is open and documented. Its easy to build a plugin/cli/library around Accent.

Contents

Requirements

  • erlang ~> 20.1
  • elixir ~> 1.6.0
  • postgres >= 9.4
  • node.js >= 8.5.0
  • libyaml >= 0.1.7

Executing mix commands

The app is modeled with the Twelve-Factor App architecture, all configurations are stored in the environment.

When executing mix commands, you should always make sure that the required environment variables are present. You can source, use nv or a custom l33t bash script.

Every following steps assume you have this kind of system.

But Accent can be run with default environment variables if you have a PostgreSQL user named postgres listening on port 5432 on localhost.

Example

With nv you inject the environment keys in the context with:

$ nv .env mix <mix command>

Quickstart

  1. If you dont already have it, install nodejs with brew install nodejs
  2. If you dont already have it, install elixir with brew install elixir
  3. If you dont already have it, install libyaml with brew install libyaml
  4. If you dont already have it, install postgres with brew install postgres or the macOS app
  5. Install dependencies with mix deps.get and npm --prefix webapp install
  6. Create and migrate your database with mix ecto.setup
  7. Start Phoenix endpoint with mix phx.server
  8. Start Ember server with npm --prefix webapp run start
  9. Thats it!

Environment variables

Accent provides a default value for every required environment variable. This means that with the right PostgreSQL setup, you can just run mix phx.server.

Variable Default Description
MIX_ENV dev The application environment (dev, prod, or test)
DATABASE_URL postgres://localhost/accent_development A valid database URL
CANONICAL_HOST localhost The host that will be used to build internal URLs
PORT 4000 A port to run the API on
WEBAPP_PORT 4200 A port to run the Webapp on (only used in dev environment)
API_HOST http://localhost:4000 The API host
API_WS_HOST ws://localhost:4000 The API Websocket host

Production setup

Variable Default Description
SENTRY_DSN none The secret Sentry DSN used to collect API runtime errors
WEBAPP_SENTRY_DSN none The public Sentry DSN used to collect Webapp runtime errors
GOOGLE_API_CLIENT_ID none When deploying in a prod environment, the Google login is the only way to authenticate user. In dev environment, a fake login provider is used so you dont have to setup a Google app.
RESTRICTED_DOMAIN none If specified, only authenticated users from this domain name will be able to create new projects.

Email setup

If you want to send emails, youll have to configure the following environment variables:

Variable Default Description
WEBAPP_EMAIL_HOST none The Web clients hostname. Used in the sent emails to link to the right URL.
MAILER_FROM none The email address used to send emails.
SMTP_ADDRESS none The SMTP server address you want to use to send your emails.
SMTP_PORT none The port ex: (25, 465, 587).
SMTP_USERNAME none The username for authentification.
SMTP_PASSWORD none The password for authentification.
SMTP_API_HEADER none An optional API header that will be added to sent emails.

Tests

API

Accent provides a default value for every required environment variable. This means that with the right PostgreSQL setup (and a few setup commands), you can just run mix test.

$ npm --prefix webapp run build
$ mix run ./priv/repo/seeds.exs
$ mix test

Deploy on Heroku

An Heroku-compatible app.json makes it easy to deploy the application on Heroku.

Deploy on Heroku

Contribute

Before opening a pull request, please open an issue first.

Once youve made your additions and the test suite passes, go ahead and open a PR!

Dont forget to run the ./priv/scripts/ci-check.sh script to make sure that the CI build will pass :)

Contributors

License

Accent is © 2015-2018 Mirego and may be freely distributed under the New BSD license. See the LICENSE.md file.

About Mirego

Mirego is a team of passionate people who believe that work is a place where you can innovate and have fun. Were a team of talented people who imagine and build beautiful Web and mobile applications. We come together to share ideas and change the world.

We also love open-source software and we try to give back to the community as much as we can.