Public is an app that helps you manage your Ruby on Rails translations.
Icons/chart bar
Used 24 times
â€ĸ Created by
A Andrea Fomera

Sign up for an account at

Check out the gem:

Run this command in your Rails app directory in the terminal:

rails app:template LOCATION=""
Template Source

Review the code before running this template on your machine.

run "spring stop"

puts "👋 Welcome to AppLocale's installation process"

puts ""
puts "ℹī¸   You'll need to open up in your browser."
puts "     - Login"
puts "     - Click the avatar and open the dropdown"
puts "     - Click API Tokens"
puts "     - Create a new API Token"

puts " "
puts "ℹī¸  If you don't yet have a project, make sure you create one and setup your languages first!"
puts ""

puts "🙌 Okay next up we'll ask for the API Token, and Project ID which you can find on the API Tokens page."

puts ""

api_token = ask("What is your AppLocale API Token?")
project_id = ask("What is your Project ID?")
puts ""

puts "🙌 Great! Thanks for that. We'll go ahead and install the applocale-ruby gem in the development group."

run "bundle add applocale-ruby -g development"

puts ""
puts ""
puts "✅ Installed applocale-ruby"

puts "✨ Now we're going to generate your configuration file. We're putting it inside of config/applocale.yml"

config_file = <<-CONFIG
# configuration file
  api_key: #{api_token}
  project_id: #{project_id}

create_file "config/applocale.yml", config_file

puts ""
puts ""

puts "✅ Generated config/applocale.yml"

puts "🙌 You did it! The configuration is setup and you're all set for using the gem"
puts ""

puts "  - Pull your translations down with 'bundle exec applocale pull'"

puts " "
puts "See usage instructions:"

Sign up or Login to leave a comment.