Skip to content

async-la/ttn-mobile

Folders and files

NameName
Last commit message
Last commit date

Latest commit

2ca15e0 · Apr 8, 2018
Apr 8, 2018
Mar 28, 2017
Apr 8, 2018
Aug 15, 2017
Apr 15, 2017
Apr 8, 2018
Mar 28, 2017
Mar 25, 2017
May 4, 2017
May 15, 2017
Mar 25, 2017
Aug 14, 2017
Mar 25, 2017
Aug 5, 2017
Aug 15, 2017
Aug 4, 2017
Aug 4, 2017
Apr 8, 2018
Jul 28, 2017
Mar 31, 2017
Jul 22, 2017

Repository files navigation

TTN Mobile

iOS

Android

Prerequisites

1. Setup React Native (required)

TTN Mobile is built using Facebooks React Native framework. Please follow the getting started guide located here. We suggest following the "Building Projects with Native Code" section alongside "Quick Start".

2. Globally install sentry-cli (required)

3. Install ESlint and Flow IDE plugin (recommended)

Setup

1. Clone repository

2. Run yarn setup

This script will properly install all dependencies.

3. Add your Oauth client id and secret in src/config.env.js

This file is auto generated from the setup script. You can enter these values manually or set TTN_CLIENT_ID and TTN_CLIENT_SECRET as environment variables before running the script.

Internationalization

We're using react-intl. It provides React components and an API to format dates, numbers, and strings, including pluralization and handling translations.

<FormattedMessage
  id='app.general.yes'
  defaultMessage='Yes'
/>
---
<Text>Yes</Text>

babel-plugin-react-intl extracts all of the defaultMessages we have and puts it in build/messages. Our script file scripts/translations.js then takes all of those ids and default messages and writes a flat json object in build/lang/en.json. The translator would then create a new locale with the same keys and input the translations.