5ykq1g
Last Updated: February 25, 2016
·
172
· iilei

Provisioning a CI-Server with phraseapp client

If you don't know Phraseapp yet: it is a handy Translation management solution. If your application needs to be localized, it is worth to give it a try.

The phraseapp client provides a convenient interface for syncing localized messages using their API.

At epsum, we incorporate the phraseapp client in our build process, so we decided to provision our CI-Server (codeship) with the client for convenience.

This is done by executing a little script that resides at ./bin/install_phraseapp_client.sh:

#!/usr/bin/env bash

mkdir phraseapp_cli
cd phraseapp_cli
wget https://github.com/phrase/phraseapp-client/releases/download/1.1.8/phraseapp_linux_amd64
mv phraseapp_linux_amd64 phraseapp
chmod +x phraseapp
PATH=$PATH:$(pwd)
cd ..

This is executed as a Setup Command:

. ./bin/install_phraseapp_client.sh

NB.: the leading dot is important here.

Given you have provided the PHRASEAPP_ACCESS_TOKEN in your build environment vars, and everything else provided via .phraseapp.yml you are able to run for example phraseapp pull to fetch the localized messages as a pre-build step.