Docs, guidelines and compromising photos
To make changes to these pages, checkout the wego.github.io project and the GitHub Pages docs.
Most of you will probably only need to care about the Daily Usage section of this guide. You do not need to add Phrase to your app - it has already been done. You need only follow the Daily Usage instructions.
phrase push
- we will only be pulling down translations from Phrase.phrase pull
.Do not follow these instructions unless you've been asked to.
gem 'phrase'
to the Gemfile under the :development
group and do a bundle install
.rails generate phrase:install --auth-token=PROJECT-AUTH-TOKEN
.phrase
and config/intializers/phrase.rb
will be generated.Configure .phrase according to the sample below:
{
"secret": "project-auth-token",
"default_locale": "en",
"format": null,
"target_directory": "./",
"domain": null,
"locale_directory": "./config/locales/",
"locale_filename": "<locale.name>.yml"
}
Disable context editor in config/initializers/phrase.rb
- we will not be using the context editor.
Phrase should only be available in development mode.
Phrase.configure do |config|
config.enabled = true
config.auth_token = "project-auth-token"
config.ignored_keys = []
config.prefix = ""
config.suffix = ""
end if Rails.env.development?
phrase push /config/locales
to push your app's I18n files to the Phrase.
Note that phrase push
should only be used for initial import to Phrase, so that we can safely assume Phrase has the most updated keys and translations.