Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 

Getting started with Phrase and Github - Ruby on Rails example

This Repository provides examples on how to use Phrase in general and the integration with github.

What we want to achieve

  • You will run a simple app on your machine
  • You will learn how to internationalize that app
  • You will learn how to integrate Phrase

System setup and first steps

Installation of necessary tools

Run the Application on your machine

Get the Source code

We will use this Github Repository as an example

  1. Create a folder via the Terminal on your Desktop

    • $cd Desktop
    • $mkdir phrase_playground
  2. Navigate into the folder

    • $cd phrase_playground
  3. Clone the Lunchroulette Repo from Github

    • $git clone https://github.com/docstun/lunchroulette.git

Get the Web Application up and running

Set up the environment for the App

  1. Install Bundler -> Dependency Manger for Ruby on Rails
    • $gem install bundler
  2. Install all gems
    • $bundle install

Get the App running

  1. Initialize the Database

    • $rails db:setup
  2. Start the Server

    • $rails server
  3. Open App in your browser

Short indroduction to the Ruby on Rails environment

For a short introduction to the Ruby on Rails structure, please view the short video we provided.

For a deeper introduction of Ruby on Rails structure we suggested this video

Localizing the App

Introduction to i18n

Implement I18n into your codebase

  1. Add basic configuration to your ./app/controllers/application_controller.rb application controller

  2. Set the languages in your ./config/initializers/locale.rb setting languages

Connecting the project to Phrase

Install the Phrase CLI

Run the following commands in your Terminal

  1. $brew tap phrase/brewed
  2. $brew install phraseapp

Phrase CLI Setup

Run the following commands in your Terminal

  1. $phraseapp init
  2. You will then be asked to provide an access token, which you can create in the Phrase UI and copy/paste it into your Terminal
  3. Follow further instructions to setup a new project or choose an already existing project.
  4. When you get asked for the path just press enter, in our case the CLI already has got the right path.
  5. All done?! Run your first $phraseapp push
  6. Play around in the Phrase UI and get all the changes with $phraseapp pull

For futher information/ integrations also see our documentation here

About

No description, website, or topics provided.

Resources

Releases

No releases published

Packages

No packages published