Skip to content

Commit

Permalink
Merge branch 'main' into fix-type-error-when-slicing-locale
Browse files Browse the repository at this point in the history
  • Loading branch information
EvanHahn authored Apr 25, 2024
2 parents 3a4ce00 + e2f9d19 commit e63bec2
Show file tree
Hide file tree
Showing 78 changed files with 3,662 additions and 946 deletions.
69 changes: 69 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: CI

on:
push:
branches: [main]
pull_request:
# By default, a workflow only runs when a pull_request's activity type is
# opened, synchronize, or reopened. Adding ready_for_review here ensures
# that CI runs when a PR is marked as not a draft, since we skip CI when a
# PR is draft
types: [opened, synchronize, reopened, ready_for_review]

jobs:
all:
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
- name: Install deps
run: npm ci
- name: Check formatting
run: npm run lint:prettier

backend:
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
fail-fast: false
defaults:
run:
working-directory: './src/backend'
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
- name: Install deps
run: |
npm ci --ignore-scripts
npm run postinstall
- name: Check types
run: npm run lint:types

frontend:
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
- name: Install deps
run: npm ci
- name: Build translations
run: npm run build:translations
- name: Build Intl polyfills
run: npm run build:intl-polyfills
- name: Run unit tests
run: npm test
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,14 @@ The next version of Mapeo Mobile
npm install
```
2. (optional) Start the Metro bundler process
2. Start the Metro bundler process
```sh
npm start
```
Leave this running in a separate terminal window.
3. Build and run the app (Android)
- For this project, using a physical device is more convenient and reliable to work with. It is recommended that you follow React Native's [setup instructions](https://reactnative.dev/docs/running-on-device) for running an app on a device.
Expand Down
6 changes: 6 additions & 0 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_LOCATION" />

<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

<!-- Required for react-native-zeroconf -->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
Expand Down
12 changes: 11 additions & 1 deletion app.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
{
"name": "CoMapeo",
"plugins": ["expo-localization", "expo-secure-store"]
"plugins": [
"expo-localization",
"expo-secure-store",
[
"expo-location",
{
"isIosBackgroundLocationEnabled": true,
"isAndroidBackgroundLocationEnabled": true
}
]
]
}
1 change: 1 addition & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module.exports = {
presets: ['module:@react-native/babel-preset'],
plugins: [
'transform-inline-environment-variables',
// react-native-reanimated/plugin has to be last
'react-native-reanimated/plugin',
],
Expand Down
90 changes: 90 additions & 0 deletions messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,27 @@
"description": "Title of dialog that shows when cancelling a new observation",
"message": "Discard observation?"
},
"Modal.GPSDisable.button": {
"message": "Enable"
},
"Modal.GPSDisable.description": {
"message": "To create a Track CoMapeo needs access to your location and GPS."
},
"Modal.GPSDisable.title": {
"message": "GPS Disabled"
},
"Modal.GPSEnable.button.default": {
"message": "Start Tracks"
},
"Modal.GPSEnable.button.loading": {
"message": "Loading..."
},
"Modal.GPSEnable.button.stop": {
"message": "Stop Tracks"
},
"Modal.GPSEnable.trackingDescription": {
"message": "You’ve been recording for"
},
"Screens.Settings.AppSettings.coordinateSystem": {
"message": "Coordinate System"
},
Expand Down Expand Up @@ -564,6 +585,21 @@
"screens.Settings.CreateOrJoinProject.whatIsAProject": {
"message": "What is a Project"
},
"screens.Settings.YourTeam.InviteDeclined": {
"message": "Invitation Declined"
},
"screens.Settings.YourTeam.close": {
"message": "Close"
},
"screens.Settings.YourTeam.deviceHasJoined": {
"message": "Device Has Joined {projectName}"
},
"screens.Settings.YourTeam.inviteDeclinedDes": {
"message": "This device has declined your invitation. They have not joined the project."
},
"screens.Settings.YourTeam.unableToCancel": {
"message": "Unable to Cancel Invitation"
},
"screens.Settings.aboutMapeo": {
"description": "Primary text for 'About Mapeo' link (version info)",
"message": "About Mapeo"
Expand Down Expand Up @@ -596,6 +632,57 @@
"description": "Title of settings screen",
"message": "Settings"
},
"screens.Sync.CreateOrJoinProjectDisplay.buttonText": {
"message": "Create or Join Project"
},
"screens.Sync.CreateOrJoinProjectDisplay.description": {
"message": "Create or Join a Project to sync with other devices"
},
"screens.Sync.HeaderTitle.noWiFi": {
"message": "No WiFi"
},
"screens.Sync.NoWifiDisplay.buttonText": {
"message": "Open Settings"
},
"screens.Sync.NoWifiDisplay.description": {
"message": "Open your phone settings and connect to a WiFi network to synchronize"
},
"screens.Sync.NoWifiDisplay.title": {
"message": "No WiFi"
},
"screens.Sync.ProjectSyncDisplay.buttonTextDone": {
"message": "You're all caught up"
},
"screens.Sync.ProjectSyncDisplay.buttonTextStop": {
"message": "Stop"
},
"screens.Sync.ProjectSyncDisplay.buttonTextSync": {
"message": "Sync"
},
"screens.Sync.ProjectSyncDisplay.deviceName": {
"message": "Your device name is {name}"
},
"screens.Sync.ProjectSyncDisplay.devicesNearby": {
"message": "{count} {count, plural, one {device} other {devices}} nearby/connected"
},
"screens.Sync.ProjectSyncDisplay.devicesSyncing": {
"message": "Syncing with {count} {count, plural, one {Device} other {Devices}}"
},
"screens.Sync.ProjectSyncDisplay.devicesWaitingToSync": {
"message": "{count} {count, plural, one {Device} other {Devices}} Waiting to Sync with you"
},
"screens.Sync.ProjectSyncDisplay.noDevicesSyncing": {
"message": "No Devices are Syncing"
},
"screens.Sync.ProjectSyncDisplay.syncProgress": {
"message": "{value}%"
},
"screens.Sync.ProjectSyncDisplay.syncing": {
"message": "Syncing…"
},
"screens.Sync.ProjectSyncDisplay.upToDate": {
"message": "Up to Date! No data to Sync"
},
"sharedComponents.DeviceCard.ThisDevice": {
"message": "This Device!"
},
Expand Down Expand Up @@ -626,6 +713,9 @@
"sharedComponents.ProjectInviteBottomSheet.goToMap": {
"message": "Go To Map"
},
"sharedComponents.ProjectInviteBottomSheet.goToSync": {
"message": "Go To Sync"
},
"sharedComponents.ProjectInviteBottomSheet.invitedToJoin": {
"message": "You've been invited to join {projName}"
},
Expand Down
Loading

0 comments on commit e63bec2

Please sign in to comment.