Popularity
2.7
Declining
Activity
2.7
-
6
4
5

Monthly Downloads: 4
Programming language: Elixir
License: Apache License 2.0

getatrex alternatives and similar packages

Based on the "Translations and Internationalizations" category.
Alternatively, view getatrex alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of getatrex or a related project?

Add another 'Translations and Internationalizations' Package

README

Getatrex circleci

Gettext Automatic Translator Written in Elixir

Translates .PO files generated by gettext in your Elixir/Phoenix project

Demo how it works

IMAGE ALT TEXT HERE

Installation

Install package

The package can be installed by adding getatrex to your list of dependencies in mix.exs:

def deps do
  [{:getatrex, "~> 0.1.0", only: :dev, runtime: false}]
end

This will install goth package as a dependency which you will need to set up in order to use for Google automatic translations.

Add Google Cloud Translation API Key for Goth package

If you don't have API key, you can get it in your Google Cloud Console https://console.cloud.google.com/apis/credentials

Download JSON file with credentials, put it somewhere (not recommending to put in under source control).

Open your config/config.exs file and add following:

# Google credentials
config :goth, json: "goth_credentials.json" |> File.read!

where json is the path to you credentials file.

Getting started

  1. Follow instruction in the Workflow section of the gettext library

  2. Generate new locale, e.g. for Spanish this would be:

    $ mix gettext.merge priv/gettext --locale es
    
  3. IMPORTANT! Do the git commit -a -m 'adding new spanish locale' to have previous version fixed in git with possibility to easily edit and revert.

  4. Translate new Spanish locale with getatrex:

    $ mix getatrex es
    

Now you have new file created translated_default.po with translations, you can now open your IDE to fix silly translations and replace original default.po when you done.

TODO

  1. Write translations to original default.po to avoid this copy-paste step
  2. Implement plurals
  3. Translate errors.po