This documentation is a work in progress.
- Make sure you have node.js installed
// Fork the repo in GitHub
git clone git@github.com:[your git username]/mobile.git
cd mobile
git remote add upstream git@github.com:binary-com/mobile.git
npm install -g bower gulp cordova ionic ios-sim
npm install
// In project root
git pull upstream master
bower update
ionic serve
ionic emulate ios
cordova run ios --device
ionic emulate android
cordova run android --device
git push origin master
// Create a pull request from your fork in GitHub
To update SCSS files, run the following command in another terminal
gulp sass // compiles scss files to css
gulp watch // compiles scss files to css everytime a scss file gets changed
We build with Gulp and deploy to GitHub Pages
cd build
npm install or npm update (may need sudo)
gulp deploy
sudo apt-get install translate-toolkit
You need to have Homebrew installed.
sudo echo &&
(brew install coreutils gettext python
curl -Lo translate.tgz https://github.com/translate/translate/archive/1.10.0.tar.gz
tar xf translate.tgz
pushd translate-1.10.0/ && sudo python setup.py install && popd
sudo rm -rf translate-1.10.0 translate.tgz)
Adding a new language is as simple as copying en.json to the [new language basename].json, then commiting this change and running json2po in the translation branch.
cp en.json [new language basename].json
git commit -am 'Language added'
git checkout translation
gulp json2po
You need to update the translation branch every time you make a change in the dev branch in order to deliver those changes to the translators to translate. This process is as simple as running json2po in the translation branch.
vim en.json # Change the language file
git commit -am 'Language file updated'
git checkout translation
gulp json2po
In order to update the language files with the most recent translations run po2json. Please be aware that the script needs to know about the completed translations, to do so it will find the commits after a commit with message Updated translation files with the recent changes with 100.0% in their message and assumes the files changed in those commits as completed translations. If you changed any language file manually in a commit and you want po2json to only translate commits after your change (e.g. corrected a mistake and waited till translations are corrected too), you need to set Updated translation files with the recent changes as the message for your commit (Or create an empty commit with this message after your commit).
git checkout translation
gulp po2json