This add-on is operated by Dynport GmbH
Edit and share locale files online. In-context copywriting and translation.
Last updated 16 October 2015
PhraseApp is a online editor for all common language file and locale formats including YAML, JSON, Gettext (.po), Properties, XLIFF, Android, iOS, ResX etc. You can always access your locale files and translations from within our online Translation Center.
With PhraseApp your translation workflow will get much easier:
- Add a new feature to your app that requires translations
- Push new keys to PhraseApp or create them manually within our Translation Center
- Deploy your new code to your staging environment and let your copywriters and translators change finalize the content and translations
- Pull the updated locale files from PhraseApp and deploy changed translations to production
PhraseApp comes with an In-Context Editor for Rails, AngularJS, Django and Symfony. You can edit your copy or translations directly on your site without having to deal with localization files at all.
Your copywriters and translators will see the context of a certain text. While changing it they can immediately see if the length of the text fits in the given space or what the intention of a certain piece of text is.
Free your developers from having to deal with the content and structure of localization files by automating translation workflow with our API.
Provisioning the add-on
PhraseApp can be attached to a Heroku application via the heroku command:
$ heroku addons:create phrase -----> Adding phrase to sharp-mountain-4005... done, v18 (free)
Once the add-on has been provisioned, a
PHRASEAPP_ACCESS_TOKEN and a
PHRASEAPP_PROJECT_ID setting will be available in your app configuration.
It contains your oauth access token which allows you to connect to the PhraseApp API:
$ heroku config | grep PHRASEAPP_ACCESS_TOKEN PHRASEAPP_ACCESS_TOKEN => 4bd4474ce91066bb53d23f49d61f8747
It also contains the project id to access your automatically created project in PhraseApp:
$ heroku config | grep PHRASEAPP_PROJECT_ID PHRASEAPP_PROJECT_ID => ba0c61b5346588a9f4109c263572e305
After you have set up a staging environment and provisioned the add-on, you need to prepare your application to connect with PhraseApp:
Add the gem
phraseapp-in-context-editor-ruby gem to your staging environment:
group :development, :staging do gem 'phraseapp-in-context-editor-ruby' end
and install it by executing the bundle command:
$ bundle install
Ruby on Rails
phraseapp-in-context-editor-ruby gem by executing the Rails generator:
$ bundle exec rails generate phraseapp_in_context_editor:install --access-token=YOUR_PHRASEAPP_ACCESS_TOKEN --project-id=YOUR_PHRASEAPP_PROJECT_ID
phraseapp_in_context_editor.rb initializer file in
config/initializers and replace the auth token with a more flexible call to the env setting provided by the Heroku add-on:
PhraseApp::InContextEditor.configure do |config| ... config.enabled = (ENV['RACK_ENV'] == 'staging') config.access_token = ENV['PHRASEAPP_ACCESS_TOKEN'] config.project_id = ENV['PHRASEAPP_PROJECT_ID'] ... end
<head> ... <%= phraseapp_in_context_editor_js %> ... </head>
Set the load path
Your application needs to know that it should use the PhraseApp locales. This can be achieved by setting the i18n load path in your application config.
Pushing existing locale files
Besides managing your projects and locale files through the web interface you can also use the PhraseApp Command Line Client to push your locales:
$ phraseapp push
Deploying the application
You can now deploy your application to your staging system:
$ git push staging master
Once deployed, open it in your browser:
$ heroku open
You should now see your application ready to be translated with the PhraseApp In-Context-Editor.
After you have finished translating you need to deploy the new localization files to your production system:
$ phraseapp pull $ git add ./config/locales $ git commit -m "added new translations"
You can now push the changes to your production repository and deploy your production system with your new translation content:
$ git push heroku master
You can remove the PhraseApp add-on via your Heroku CLI:
This will destroy your PhraseApp account and all associated data!
$ heroku addons:remove phrase -----> Removing PhraseApp from sharp-mountain-4005... done, v20 (free)
Before removing PhraseApp please make sure that you have downloaded all translations from your account. After deprovisioning your account will be shut down and your account data will be deleted.
Additional resources are available at: